From e519eda25826516f1dcd4d6e7608940e1988371e Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Tue, 31 Jul 2018 18:27:01 -0700 Subject: [PATCH] Remove non fluent modules --- azure-mgmt-apimanagement/pom.xml | 122 - .../AccessInformationUpdateParameters.java | 43 - .../apimanagement/AdditionalLocation.java | 127 - .../apimanagement/ApiContractProperties.java | 151 - ...iCreateOrUpdatePropertiesWsdlSelector.java | 69 - .../apimanagement/ApiEntityBaseContract.java | 230 - ...ceApplyNetworkConfigurationParameters.java | 45 - .../ApiManagementServiceBaseProperties.java | 374 -- ...erviceCheckNameAvailabilityParameters.java | 43 - .../ApiManagementServiceIdentity.java | 82 - .../ApiManagementServiceSkuProperties.java | 71 - .../ApiRevisionInfoContract.java | 122 - .../ApiTagResourceContractProperties.java | 151 - .../management/apimanagement/ApiType.java | 41 - .../ApiVersionSetContractDetails.java | 153 - .../ApiVersionSetEntityBase.java | 97 - .../apimanagement/ApimResource.java | 90 - .../apimanagement/AsyncOperationStatus.java | 59 - .../AuthenticationSettingsContract.java | 43 - .../apimanagement/AuthorizationMethod.java | 71 - ...orizationServerContractBaseProperties.java | 318 -- ...BackendAuthorizationHeaderCredentials.java | 69 - .../apimanagement/BackendBaseParameters.java | 200 - .../BackendCredentialsContract.java | 123 - .../apimanagement/BackendProperties.java | 43 - .../apimanagement/BackendProtocol.java | 41 - .../apimanagement/BackendProxyContract.java | 96 - ...BackendServiceFabricClusterProperties.java | 149 - .../apimanagement/BackendTlsProperties.java | 71 - .../BearerTokenSendingMethod.java | 41 - .../CertificateConfiguration.java | 114 - .../ClientAuthenticationMethod.java | 41 - .../apimanagement/Confirmation.java | 41 - .../ConnectivityStatusContract.java | 158 - .../apimanagement/ConnectivityStatusType.java | 44 - .../apimanagement/ContentFormat.java | 53 - ...lTemplateParametersContractProperties.java | 95 - .../apimanagement/ErrorFieldContract.java | 95 - .../apimanagement/ErrorResponse.java | 97 - .../apimanagement/ErrorResponseException.java | 44 - .../apimanagement/ExportFormat.java | 44 - .../management/apimanagement/GrantType.java | 47 - .../GroupContractProperties.java | 140 - .../management/apimanagement/GroupType.java | 56 - .../apimanagement/HostnameConfiguration.java | 225 - .../HostnameConfigurationOld.java | 97 - .../apimanagement/HostnameType.java | 59 - .../IdentityProviderBaseParameters.java | 175 - .../apimanagement/IdentityProviderType.java | 53 - .../management/apimanagement/KeyType.java | 53 - .../management/apimanagement/LoggerType.java | 41 - .../apimanagement/NameAvailabilityReason.java | 56 - .../apimanagement/NotificationName.java | 56 - .../OAuth2AuthenticationSettingsContract.java | 69 - .../apimanagement/OperationDisplay.java | 121 - .../OperationEntityBaseContract.java | 148 - .../OperationResultLogItemContract.java | 95 - ...perationTagResourceContractProperties.java | 151 - .../apimanagement/ParameterContract.java | 174 - .../apimanagement/PolicyContentFormat.java | 41 - .../apimanagement/PolicyScopeContract.java | 62 - .../apimanagement/PolicySnippetContract.java | 77 - .../ProductEntityBaseParameters.java | 192 - .../apimanagement/ProductState.java | 53 - .../ProductTagResourceContractProperties.java | 69 - .../PropertyEntityBaseParameters.java | 72 - .../management/apimanagement/Protocol.java | 53 - .../QuotaCounterValueContract.java | 71 - .../RecipientsContractProperties.java | 70 - ...istrationDelegationSettingsProperties.java | 43 - .../apimanagement/RepresentationContract.java | 153 - .../apimanagement/RequestContract.java | 122 - .../apimanagement/ResponseContract.java | 122 - .../management/apimanagement/SkuType.java | 47 - .../management/apimanagement/SoapApiType.java | 41 - ...SubscriptionKeyParameterNamesContract.java | 69 - .../apimanagement/SubscriptionState.java | 65 - ...criptionsDelegationSettingsProperties.java | 43 - .../TagCreateUpdateParameters.java | 45 - .../TagTagResourceContractProperties.java | 69 - .../apimanagement/TemplateName.java | 77 - .../TermsOfServiceProperties.java | 95 - .../TokenBodyParameterContract.java | 69 - .../UserEntityBaseParameters.java | 89 - .../management/apimanagement/UserState.java | 47 - .../apimanagement/VersioningScheme.java | 44 - .../VirtualNetworkConfiguration.java | 76 - .../apimanagement/VirtualNetworkType.java | 44 - .../apimanagement/X509CertificateName.java | 69 - .../AccessInformationContractInner.java | 121 - .../implementation/ApiContractInner.java | 372 -- .../ApiCreateOrUpdateHeadersInner.java | 44 - .../ApiCreateOrUpdateParameterInner.java | 483 --- ...ApiDiagnosticGetEntityTagHeadersInner.java | 44 - .../ApiDiagnosticGetHeadersInner.java | 44 - .../ApiDiagnosticLoggersInner.java | 823 ---- .../implementation/ApiDiagnosticsInner.java | 1119 ----- .../implementation/ApiExportResultInner.java | 44 - .../implementation/ApiExportsInner.java | 162 - .../ApiGetEntityTagHeadersInner.java | 44 - .../implementation/ApiGetHeadersInner.java | 44 - .../ApiManagementClientImpl.java | 966 ----- .../implementation/ApiManagementManager.java | 89 - .../ApiManagementOperationsInner.java | 283 -- ...ntServiceBackupRestoreParametersInner.java | 124 - ...nagementServiceGetSsoTokenResultInner.java | 43 - ...entServiceNameAvailabilityResultInner.java | 83 - .../ApiManagementServiceResourceInner.java | 529 --- ...tServiceUpdateHostnameParametersInner.java | 72 - ...anagementServiceUpdateParametersInner.java | 503 --- ...rviceUploadCertificateParametersInner.java | 98 - .../ApiManagementServicesInner.java | 2222 ---------- .../ApiOperationGetEntityTagHeadersInner.java | 44 - .../ApiOperationGetHeadersInner.java | 44 - ...erationPolicyGetEntityTagHeadersInner.java | 44 - .../ApiOperationPolicyGetHeadersInner.java | 44 - .../ApiOperationPolicysInner.java | 708 --- .../implementation/ApiOperationsInner.java | 1141 ----- .../ApiPolicyGetEntityTagHeadersInner.java | 44 - .../ApiPolicyGetHeadersInner.java | 44 - .../ApiPolicyListByApiHeadersInner.java | 44 - .../implementation/ApiPolicysInner.java | 666 --- .../implementation/ApiProductsInner.java | 463 -- .../ApiReleaseContractInner.java | 104 - .../ApiReleaseGetEntityTagHeadersInner.java | 44 - .../implementation/ApiReleasesInner.java | 1025 ----- .../ApiRevisionContractInner.java | 142 - .../implementation/ApiRevisionsInner.java | 463 -- .../ApiSchemaGetEntityTagHeadersInner.java | 44 - .../ApiSchemaGetHeadersInner.java | 44 - .../ApiSchemaListByApiHeadersInner.java | 44 - .../implementation/ApiSchemasInner.java | 855 ---- .../ApiUpdateContractInner.java | 344 -- .../ApiVersionSetContractInner.java | 155 - ...ApiVersionSetGetEntityTagHeadersInner.java | 44 - .../ApiVersionSetGetHeadersInner.java | 44 - .../ApiVersionSetUpdateParametersInner.java | 154 - .../implementation/ApiVersionSetsInner.java | 1098 ----- .../implementation/ApisInner.java | 1613 ------- .../AuthorizationServerContractInner.java | 460 -- ...izationServerGetEntityTagHeadersInner.java | 44 - .../AuthorizationServerGetHeadersInner.java | 44 - ...uthorizationServerUpdateContractInner.java | 460 -- .../AuthorizationServersInner.java | 1074 ----- .../implementation/BackendContractInner.java | 260 -- .../BackendGetEntityTagHeadersInner.java | 44 - .../BackendGetHeadersInner.java | 44 - .../BackendReconnectContractInner.java | 48 - .../BackendUpdateParametersInner.java | 259 -- .../implementation/BackendsInner.java | 1268 ------ .../CertificateContractInner.java | 100 - ...tificateCreateOrUpdateParametersInner.java | 72 - .../CertificateGetEntityTagHeadersInner.java | 44 - .../CertificateGetHeadersInner.java | 44 - .../CertificateInformationInner.java | 97 - .../implementation/CertificatesInner.java | 971 ----- ...ationSettingsGetEntityTagHeadersInner.java | 44 - .../DelegationSettingsGetHeadersInner.java | 44 - .../DelegationSettingsInner.java | 444 -- .../DeployConfigurationParametersInner.java | 71 - .../DiagnosticContractInner.java | 46 - .../DiagnosticGetEntityTagHeadersInner.java | 44 - .../DiagnosticGetHeadersInner.java | 44 - .../DiagnosticLoggersInner.java | 786 ---- .../implementation/DiagnosticsInner.java | 1061 ----- .../EmailTemplateContractInner.java | 168 - ...EmailTemplateGetEntityTagHeadersInner.java | 44 - .../EmailTemplateGetHeadersInner.java | 44 - .../EmailTemplateUpdateParametersInner.java | 151 - .../implementation/EmailTemplatesInner.java | 1047 ----- .../GenerateSsoUrlResultInner.java | 43 - .../implementation/GroupContractInner.java | 144 - .../GroupCreateParametersInner.java | 127 - .../GroupGetEntityTagHeadersInner.java | 44 - .../implementation/GroupGetHeadersInner.java | 44 - .../GroupUpdateParametersInner.java | 127 - .../implementation/GroupUsersInner.java | 811 ---- .../implementation/GroupsInner.java | 1084 ----- .../IdentityProviderContractInner.java | 235 - ...ntityProviderGetEntityTagHeadersInner.java | 44 - .../IdentityProviderGetHeadersInner.java | 44 - ...IdentityProviderUpdateParametersInner.java | 234 - .../IdentityProvidersInner.java | 925 ---- .../implementation/LoggerContractInner.java | 130 - .../LoggerGetEntityTagHeadersInner.java | 44 - .../implementation/LoggerGetHeadersInner.java | 44 - .../LoggerUpdateContractInner.java | 127 - .../implementation/LoggersInner.java | 1073 ----- .../NetworkStatusContractByLocationInner.java | 69 - .../NetworkStatusContractInner.java | 72 - .../implementation/NetworkStatusInner.java | 244 -- .../NotificationContractInner.java | 99 - .../NotificationRecipientEmailsInner.java | 471 -- .../NotificationRecipientUsersInner.java | 471 -- .../implementation/NotificationsInner.java | 720 ---- ...nnectProviderGetEntityTagHeadersInner.java | 44 - .../OpenIdConnectProviderGetHeadersInner.java | 44 - .../OpenIdConnectProvidersInner.java | 1074 ----- .../OpenidConnectProviderContractInner.java | 150 - ...nidConnectProviderUpdateContractInner.java | 149 - .../OperationContractInner.java | 235 - .../implementation/OperationInner.java | 122 - .../OperationResultContractInner.java | 200 - .../OperationUpdateContractInner.java | 234 - .../implementation/OperationsInner.java | 488 --- .../implementation/PageImpl.java | 75 - .../implementation/PageImpl1.java | 75 - .../implementation/PolicyCollectionInner.java | 70 - .../implementation/PolicyContractInner.java | 73 - .../PolicyGetEntityTagHeadersInner.java | 44 - .../implementation/PolicyGetHeadersInner.java | 44 - .../PolicySnippetsCollectionInner.java | 45 - .../implementation/PolicySnippetsInner.java | 231 - .../implementation/PolicysInner.java | 617 --- .../PortalDelegationSettingsInner.java | 127 - .../PortalSigninSettingsInner.java | 46 - .../PortalSignupSettingsInner.java | 73 - .../implementation/ProductApisInner.java | 801 ---- .../implementation/ProductContractInner.java | 222 - .../ProductGetEntityTagHeadersInner.java | 44 - .../ProductGetHeadersInner.java | 44 - .../implementation/ProductGroupsInner.java | 796 ---- ...ProductPolicyGetEntityTagHeadersInner.java | 44 - .../ProductPolicyGetHeadersInner.java | 44 - ...roductPolicyListByProductHeadersInner.java | 44 - .../implementation/ProductPolicysInner.java | 666 --- .../ProductSubscriptionsInner.java | 488 --- .../ProductUpdateParametersInner.java | 221 - .../implementation/ProductsInner.java | 1191 ----- .../implementation/PropertyContractInner.java | 129 - .../PropertyGetEntityTagHeadersInner.java | 44 - .../PropertyGetHeadersInner.java | 44 - .../PropertyUpdateParametersInner.java | 128 - .../implementation/PropertysInner.java | 1074 ----- .../QuotaByCounterKeysInner.java | 260 -- .../QuotaByPeriodKeysInner.java | 274 -- .../QuotaCounterCollectionInner.java | 96 - .../QuotaCounterContractInner.java | 153 - ...taCounterValueContractPropertiesInner.java | 69 - .../RecipientEmailCollectionInner.java | 70 - .../RecipientEmailContractInner.java | 46 - .../RecipientUserCollectionInner.java | 70 - .../RecipientUserContractInner.java | 46 - .../implementation/RegionContractInner.java | 84 - .../implementation/RegionsInner.java | 303 -- .../ReportRecordContractInner.java | 682 --- .../implementation/ReportsInner.java | 2946 ------------- .../RequestReportRecordContractInner.java | 470 -- .../SaveConfigurationParameterInner.java | 72 - .../implementation/SchemaContractInner.java | 74 - ...ignInSettingsGetEntityTagHeadersInner.java | 44 - .../SignInSettingsGetHeadersInner.java | 44 - .../implementation/SignInSettingsInner.java | 609 --- ...ignUpSettingsGetEntityTagHeadersInner.java | 44 - .../SignUpSettingsGetHeadersInner.java | 44 - .../implementation/SignUpSettingsInner.java | 444 -- .../SubscriptionContractInner.java | 350 -- .../SubscriptionCreateParametersInner.java | 190 - .../SubscriptionGetEntityTagHeadersInner.java | 44 - .../SubscriptionGetHeadersInner.java | 44 - .../SubscriptionUpdateParametersInner.java | 241 -- .../implementation/SubscriptionsInner.java | 1412 ------ .../implementation/TagContractInner.java | 46 - .../TagDescriptionContractInner.java | 124 - .../TagDescriptionCreateParametersInner.java | 97 - ...DescriptionGetEntityStateHeadersInner.java | 44 - .../TagDescriptionGetHeadersInner.java | 44 - .../implementation/TagDescriptionsInner.java | 1012 ----- .../TagGetByApiHeadersInner.java | 44 - .../TagGetByOperationHeadersInner.java | 44 - .../TagGetByProductHeadersInner.java | 44 - .../TagGetEntityStateByApiHeadersInner.java | 44 - ...GetEntityStateByOperationHeadersInner.java | 44 - ...agGetEntityStateByProductHeadersInner.java | 44 - .../TagGetEntityStateHeadersInner.java | 44 - .../implementation/TagGetHeadersInner.java | 44 - .../TagResourceContractInner.java | 125 - .../implementation/TagResourcesInner.java | 507 --- .../implementation/TagsInner.java | 3827 ----------------- .../TenantAccessGetHeadersInner.java | 44 - .../TenantAccessGitGetHeadersInner.java | 44 - .../implementation/TenantAccessGitsInner.java | 329 -- .../implementation/TenantAccessInner.java | 525 --- ...ntConfigurationSyncStateContractInner.java | 206 - .../TenantConfigurationsInner.java | 697 --- .../implementation/UserContractInner.java | 214 - .../UserCreateParametersInner.java | 224 - .../UserGetEntityTagHeadersInner.java | 44 - .../implementation/UserGetHeadersInner.java | 44 - .../implementation/UserGroupsInner.java | 473 -- .../implementation/UserIdentitiesInner.java | 311 -- .../UserIdentityContractInner.java | 69 - .../UserSubscriptionsInner.java | 488 --- .../UserTokenParametersInner.java | 74 - .../implementation/UserTokenResultInner.java | 43 - .../UserUpdateParametersInner.java | 196 - .../implementation/UsersInner.java | 1403 ------ .../implementation/package-info.java | 11 - .../apimanagement/package-info.java | 11 - azure-mgmt-billing/pom.xml | 122 - .../azure/management/billing/DownloadUrl.java | 49 - .../management/billing/ErrorDetails.java | 62 - .../management/billing/ErrorResponse.java | 44 - .../billing/ErrorResponseException.java | 44 - .../management/billing/OperationDisplay.java | 62 - .../BillingManagementClientImpl.java | 224 - .../implementation/BillingManager.java | 89 - .../implementation/BillingPeriodInner.java | 67 - .../implementation/BillingPeriodsInner.java | 489 --- .../billing/implementation/InvoiceInner.java | 95 - .../billing/implementation/InvoicesInner.java | 571 --- .../implementation/OperationInner.java | 59 - .../implementation/OperationsInner.java | 283 -- .../billing/implementation/PageImpl.java | 75 - .../billing/implementation/package-info.java | 11 - .../management/billing/package-info.java | 11 - azure-mgmt-cognitiveservices/pom.xml | 122 - .../CheckSkuAvailabilityParameter.java | 102 - .../CheckSkuAvailabilityResult.java | 180 - ...nitiveServicesAccountUpdateParameters.java | 75 - .../CognitiveServicesResourceAndSku.java | 70 - .../management/cognitiveservices/Error.java | 43 - .../cognitiveservices/ErrorBody.java | 69 - .../cognitiveservices/ErrorException.java | 44 - .../management/cognitiveservices/KeyName.java | 53 - .../management/cognitiveservices/Kind.java | 92 - .../cognitiveservices/MetricName.java | 47 - .../OperationDisplayInfo.java | 121 - .../cognitiveservices/ProvisioningState.java | 53 - .../cognitiveservices/QuotaUsageStatus.java | 47 - .../RegenerateKeyParameters.java | 44 - .../management/cognitiveservices/SkuName.java | 68 - .../management/cognitiveservices/SkuTier.java | 56 - .../cognitiveservices/UnitType.java | 56 - .../management/cognitiveservices/Usage.java | 147 - .../implementation/AccountsInner.java | 1370 ------ .../CheckSkuAvailabilityResultListInner.java | 45 - .../CheckSkuAvailabilitysInner.java | 171 - ...eServicesAccountCreateParametersInner.java | 163 - ...rvicesAccountEnumerateSkusResultInner.java | 34 - .../CognitiveServicesAccountInner.java | 270 -- .../CognitiveServicesAccountKeysInner.java | 69 - .../CognitiveServicesAccountsInner.java | 813 ---- ...CognitiveServicesManagementClientImpl.java | 247 -- .../CognitiveServicesManager.java | 89 - .../implementation/OperationEntityInner.java | 122 - .../implementation/OperationsInner.java | 283 -- .../implementation/PageImpl.java | 75 - .../implementation/SkuInner.java | 63 - .../implementation/UsagesResultInner.java | 34 - .../implementation/package-info.java | 11 - .../cognitiveservices/package-info.java | 11 - azure-mgmt-consumption/pom.xml | 122 - .../consumption/BudgetTimePeriod.java | 71 - .../management/consumption/CategoryType.java | 41 - .../management/consumption/CurrentSpend.java | 48 - .../management/consumption/Datagrain.java | 41 - .../management/consumption/ErrorDetails.java | 47 - .../management/consumption/ErrorResponse.java | 44 - .../consumption/ErrorResponseException.java | 44 - .../azure/management/consumption/Filters.java | 97 - .../management/consumption/MeterDetails.java | 126 - .../management/consumption/Notification.java | 181 - .../consumption/OperationDisplay.java | 62 - .../management/consumption/OperatorType.java | 44 - .../consumption/PriceSheetProperties.java | 139 - .../management/consumption/ProxyResource.java | 90 - .../management/consumption/TimeGrainType.java | 44 - .../implementation/BudgetInner.java | 207 - .../implementation/BudgetsInner.java | 1063 ----- .../ConsumptionManagementClientImpl.java | 280 -- .../implementation/ConsumptionManager.java | 89 - .../implementation/MarketplaceInner.java | 384 -- .../implementation/MarketplacesInner.java | 765 ---- .../implementation/OperationInner.java | 59 - .../implementation/OperationsInner.java | 283 -- .../consumption/implementation/PageImpl.java | 75 - .../consumption/implementation/PageImpl1.java | 75 - .../implementation/PriceSheetResultInner.java | 52 - .../implementation/PriceSheetsInner.java | 372 -- .../ReservationDetailsInner.java | 153 - .../ReservationSummariesInner.java | 172 - .../ReservationsDetailsInner.java | 547 --- .../ReservationsSummariesInner.java | 794 ---- .../implementation/UsageDetailInner.java | 356 -- .../implementation/UsageDetailsInner.java | 777 ---- .../implementation/package-info.java | 11 - .../management/consumption/package-info.java | 11 - azure-mgmt-customerinsights/pom.xml | 122 - .../customerinsights/AssignmentPrincipal.java | 96 - .../AzureBlobConnectorProperties.java | 43 - .../CalculationWindowTypes.java | 62 - .../customerinsights/CardinalityTypes.java | 56 - .../CompletionOperationTypes.java | 56 - .../ConnectorMappingAvailability.java | 70 - .../ConnectorMappingCompleteOperation.java | 71 - .../ConnectorMappingErrorManagement.java | 70 - .../ConnectorMappingFormat.java | 180 - .../ConnectorMappingProperties.java | 226 - .../ConnectorMappingStates.java | 68 - .../ConnectorMappingStructure.java | 121 - .../customerinsights/ConnectorStates.java | 65 - .../customerinsights/ConnectorTypes.java | 71 - .../CrmConnectorEntities.java | 95 - .../CrmConnectorProperties.java | 148 - .../DataSourcePrecedence.java | 123 - .../customerinsights/DataSourceType.java | 62 - .../customerinsights/EnrichingKpi.java | 17 - .../customerinsights/EntityType.java | 59 - .../EntityTypeDefinition.java | 251 -- .../customerinsights/EntityTypes.java | 59 - .../ErrorManagementTypes.java | 56 - .../customerinsights/FrequencyTypes.java | 62 - .../HubBillingInfoFormat.java | 97 - .../InstanceOperationType.java | 53 - .../management/customerinsights/KpiAlias.java | 69 - .../customerinsights/KpiExtract.java | 69 - .../customerinsights/KpiFunctions.java | 71 - .../customerinsights/KpiGroupByMetadata.java | 96 - .../KpiParticipantProfilesMetadata.java | 43 - .../customerinsights/KpiThresholds.java | 96 - .../customerinsights/LinkTypes.java | 53 - .../MetadataDefinitionBase.java | 201 - .../customerinsights/Participant.java | 175 - .../ParticipantProfilePropertyReference.java | 71 - .../ParticipantPropertyReference.java | 69 - .../customerinsights/PermissionTypes.java | 56 - .../ProfileEnumValidValuesFormat.java | 70 - .../customerinsights/PropertyDefinition.java | 426 -- .../customerinsights/ProvisioningStates.java | 71 - .../customerinsights/ProxyResource.java | 62 - .../RelationshipLinkFieldMapping.java | 95 - .../RelationshipTypeFieldMapping.java | 69 - .../RelationshipTypeMapping.java | 45 - .../customerinsights/RelationshipsLookup.java | 93 - .../ResourceSetDescription.java | 71 - .../customerinsights/RoleTypes.java | 65 - .../SalesforceConnectorProperties.java | 70 - .../SalesforceDiscoverSetting.java | 43 - .../customerinsights/SalesforceTable.java | 147 - .../management/customerinsights/Status.java | 62 - .../management/customerinsights/StrongId.java | 123 - .../TypePropertiesMapping.java | 95 - .../AuthorizationPoliciesInner.java | 705 --- .../AuthorizationPolicyInner.java | 112 - ...uthorizationPolicyResourceFormatInner.java | 115 - .../ConnectorMappingResourceFormatInner.java | 319 -- .../ConnectorMappingsInner.java | 637 --- .../ConnectorResourceFormatInner.java | 257 -- .../implementation/ConnectorsInner.java | 776 ---- .../CustomerInsightsManagementClientImpl.java | 392 -- .../CustomerInsightsManager.java | 89 - .../GetImageUploadUrlInputInner.java | 95 - .../implementation/HubInner.java | 120 - .../implementation/HubsInner.java | 980 ----- .../implementation/ImageDefinitionInner.java | 95 - .../implementation/ImagesInner.java | 254 -- .../InteractionResourceFormatInner.java | 647 --- .../implementation/InteractionsInner.java | 909 ---- .../implementation/KpiDefinitionInner.java | 471 -- .../KpiResourceFormatInner.java | 474 -- .../implementation/KpisInner.java | 872 ---- .../LinkResourceFormatInner.java | 339 -- .../implementation/LinksInner.java | 696 --- .../implementation/PageImpl.java | 75 - .../ProfileResourceFormatInner.java | 467 -- .../implementation/ProfilesInner.java | 1256 ------ .../RelationshipLinkResourceFormatInner.java | 268 -- .../RelationshipLinksInner.java | 775 ---- .../RelationshipResourceFormatInner.java | 298 -- .../implementation/RelationshipsInner.java | 775 ---- .../RoleAssignmentResourceFormatInner.java | 515 --- .../implementation/RoleAssignmentsInner.java | 697 --- .../RoleResourceFormatInner.java | 72 - .../implementation/RolesInner.java | 303 -- ...SuggestRelationshipLinksResponseInner.java | 49 - .../ViewResourceFormatInner.java | 160 - .../implementation/ViewsInner.java | 628 --- .../WidgetTypeResourceFormatInner.java | 212 - .../implementation/WidgetTypesInner.java | 401 -- .../implementation/package-info.java | 11 - .../customerinsights/package-info.java | 11 - azure-mgmt-devices/pom.xml | 124 - .../management/devices/AccessRights.java | 94 - .../management/devices/Capabilities.java | 61 - .../devices/CloudToDeviceProperties.java | 102 - .../devices/EventHubProperties.java | 121 - .../devices/FallbackRouteProperties.java | 137 - .../devices/FeedbackProperties.java | 103 - .../management/devices/IotHubCapacity.java | 80 - .../IotHubNameUnavailabilityReason.java | 55 - .../management/devices/IotHubProperties.java | 349 -- .../management/devices/IotHubScaleType.java | 58 - .../azure/management/devices/IotHubSku.java | 67 - .../management/devices/IotHubSkuInfo.java | 88 - .../management/devices/IotHubSkuTier.java | 55 - .../devices/IpFilterActionType.java | 55 - .../management/devices/IpFilterRule.java | 99 - .../azure/management/devices/JobStatus.java | 67 - .../azure/management/devices/JobType.java | 85 - .../devices/MessagingEndpointProperties.java | 102 - .../management/devices/OperationInputs.java | 45 - .../devices/OperationMonitoringLevel.java | 67 - .../OperationsMonitoringProperties.java | 49 - .../management/devices/RouteProperties.java | 159 - .../management/devices/RoutingEndpoints.java | 105 - .../devices/RoutingEventHubProperties.java | 127 - .../management/devices/RoutingProperties.java | 106 - ...tingServiceBusQueueEndpointProperties.java | 128 - ...tingServiceBusTopicEndpointProperties.java | 128 - .../management/devices/RoutingSource.java | 67 - .../devices/StorageEndpointProperties.java | 103 - .../implementation/DevicesManager.java | 90 - .../implementation/ErrorDetailsInner.java | 79 - .../ErrorDetailsInnerException.java | 46 - .../EventHubConsumerGroupInfoInner.java | 98 - .../ExportDevicesRequestInner.java | 72 - .../ImportDevicesRequestInner.java | 72 - .../implementation/IotHubClientImpl.java | 198 - .../IotHubDescriptionInner.java | 156 - .../IotHubNameAvailabilityInfoInner.java | 77 - .../IotHubQuotaMetricInfoInner.java | 64 - .../implementation/IotHubResourcesInner.java | 3187 -------------- .../IotHubSkuDescriptionInner.java | 88 - .../implementation/JobResponseInner.java | 153 - .../devices/implementation/PageImpl.java | 77 - .../RegistryStatisticsInner.java | 64 - ...AccessSignatureAuthorizationRuleInner.java | 133 - .../devices/implementation/package-info.java | 13 - .../management/devices/package-info.java | 13 - azure-mgmt-devtestlab/pom.xml | 122 - .../devtestlab/ApplyArtifactsRequest.java | 45 - .../ArmTemplateParameterProperties.java | 69 - .../ArtifactDeploymentStatusProperties.java | 95 - ...actDeploymentStatusPropertiesFragment.java | 95 - .../ArtifactInstallPropertiesFragment.java | 175 - .../ArtifactParameterProperties.java | 69 - .../ArtifactParameterPropertiesFragment.java | 69 - .../devtestlab/AttachDiskProperties.java | 44 - .../devtestlab/AttachNewDataDiskOptions.java | 96 - .../devtestlab/BulkCreationParameters.java | 43 - .../devtestlab/ComputeDataDisk.java | 122 - .../devtestlab/ComputeDataDiskFragment.java | 122 - .../ComputeVmInstanceViewStatus.java | 95 - .../ComputeVmInstanceViewStatusFragment.java | 95 - .../devtestlab/ComputeVmProperties.java | 200 - .../ComputeVmPropertiesFragment.java | 200 - .../devtestlab/CostThresholdProperties.java | 150 - .../devtestlab/CostThresholdStatus.java | 59 - .../azure/management/devtestlab/CostType.java | 62 - .../devtestlab/CustomImageOsType.java | 62 - .../CustomImagePropertiesCustom.java | 96 - .../CustomImagePropertiesFromVm.java | 95 - .../management/devtestlab/DayDetails.java | 43 - .../devtestlab/DayDetailsFragment.java | 43 - .../devtestlab/DetachDataDiskProperties.java | 43 - .../devtestlab/DetachDiskProperties.java | 43 - .../management/devtestlab/EnableStatus.java | 59 - .../EnvironmentDeploymentProperties.java | 70 - .../devtestlab/EvaluatePoliciesRequest.java | 45 - .../azure/management/devtestlab/Event.java | 44 - .../management/devtestlab/EventFragment.java | 44 - .../management/devtestlab/ExternalSubnet.java | 69 - .../devtestlab/ExternalSubnetFragment.java | 69 - .../devtestlab/FileUploadOptions.java | 59 - .../devtestlab/FormulaPropertiesFromVm.java | 43 - .../devtestlab/GalleryImageReference.java | 147 - .../GalleryImageReferenceFragment.java | 147 - .../GenerateUploadUriParameter.java | 43 - .../devtestlab/HostCachingOptions.java | 62 - .../management/devtestlab/HourDetails.java | 43 - .../devtestlab/HourDetailsFragment.java | 43 - .../devtestlab/IdentityProperties.java | 121 - .../management/devtestlab/InboundNatRule.java | 99 - .../devtestlab/InboundNatRuleFragment.java | 99 - .../devtestlab/LabCostDetailsProperties.java | 97 - .../devtestlab/LabCostSummaryProperties.java | 43 - .../devtestlab/LabResourceCostProperties.java | 251 -- .../management/devtestlab/LinuxOsInfo.java | 45 - .../management/devtestlab/LinuxOsState.java | 62 - .../NetworkInterfaceProperties.java | 254 -- .../NetworkInterfacePropertiesFragment.java | 254 -- .../NotificationChannelEventType.java | 59 - .../devtestlab/NotificationSettings.java | 96 - .../NotificationSettingsFragment.java | 96 - .../devtestlab/NotificationStatus.java | 59 - .../management/devtestlab/ParameterInfo.java | 69 - .../devtestlab/ParametersValueFileInfo.java | 69 - .../PercentageCostThresholdProperties.java | 43 - .../devtestlab/PolicyEvaluatorType.java | 59 - .../management/devtestlab/PolicyFactName.java | 77 - .../devtestlab/PolicySetResult.java | 71 - .../management/devtestlab/PolicyStatus.java | 59 - .../devtestlab/PolicyViolation.java | 69 - .../azure/management/devtestlab/Port.java | 69 - .../management/devtestlab/PortFragment.java | 69 - .../devtestlab/PremiumDataDisk.java | 59 - .../devtestlab/ReportingCycleType.java | 59 - .../SharedPublicIpAddressConfiguration.java | 45 - ...dPublicIpAddressConfigurationFragment.java | 45 - .../ShutdownNotificationContent.java | 304 -- .../devtestlab/SourceControlType.java | 59 - .../management/devtestlab/StorageType.java | 59 - .../azure/management/devtestlab/Subnet.java | 97 - .../management/devtestlab/SubnetFragment.java | 97 - .../management/devtestlab/SubnetOverride.java | 177 - .../devtestlab/SubnetOverrideFragment.java | 177 - ...netSharedPublicIpAddressConfiguration.java | 45 - ...dPublicIpAddressConfigurationFragment.java | 45 - .../devtestlab/TargetCostProperties.java | 176 - .../devtestlab/TargetCostStatus.java | 59 - .../devtestlab/TransportProtocol.java | 59 - .../devtestlab/UsagePermissionType.java | 62 - .../management/devtestlab/UserIdentity.java | 150 - .../devtestlab/UserIdentityFragment.java | 150 - .../devtestlab/UserSecretStore.java | 69 - .../devtestlab/UserSecretStoreFragment.java | 69 - .../VirtualMachineCreationSource.java | 59 - .../management/devtestlab/WeekDetails.java | 71 - .../devtestlab/WeekDetailsFragment.java | 71 - .../management/devtestlab/WindowsOsInfo.java | 45 - .../management/devtestlab/WindowsOsState.java | 62 - .../ApplicableScheduleFragmentInner.java | 75 - .../ApplicableScheduleInner.java | 75 - .../implementation/ArmTemplateInfoInner.java | 69 - .../implementation/ArmTemplateInner.java | 129 - .../implementation/ArmTemplatesInner.java | 662 --- .../implementation/ArtifactInner.java | 141 - .../ArtifactInstallPropertiesInner.java | 176 - .../ArtifactSourceFragmentInner.java | 283 -- .../implementation/ArtifactSourceInner.java | 299 -- .../implementation/ArtifactSourcesInner.java | 945 ---- .../implementation/ArtifactsInner.java | 777 ---- .../devtestlab/implementation/CostsInner.java | 353 -- .../implementation/CustomImageInner.java | 220 - .../implementation/CustomImagesInner.java | 1006 ----- .../DataDiskPropertiesInner.java | 98 - .../implementation/DevTestLabManager.java | 89 - .../implementation/DevTestLabsClientImpl.java | 476 -- .../devtestlab/implementation/DiskInner.java | 273 -- .../devtestlab/implementation/DisksInner.java | 1829 -------- .../implementation/DtlEnvironmentInner.java | 157 - .../implementation/EnvironmentsInner.java | 1064 ----- .../EvaluatePoliciesPropertiesInner.java | 95 - .../EvaluatePoliciesResponseInner.java | 45 - .../ExportResourceUsageParametersInner.java | 72 - .../implementation/FormulaInner.java | 219 - .../implementation/FormulasInner.java | 927 ---- .../implementation/GalleryImageInner.java | 167 - .../implementation/GalleryImagesInner.java | 443 -- .../GenerateArmTemplateRequestInner.java | 126 - .../GenerateUploadUriResponseInner.java | 43 - .../implementation/GlobalSchedulesInner.java | 1587 ------- .../implementation/LabCostInner.java | 253 -- .../implementation/LabFragmentInner.java | 131 - .../devtestlab/implementation/LabInner.java | 222 - .../implementation/LabVhdInner.java | 43 - ...bVirtualMachineCreationParameterInner.java | 917 ---- .../LabVirtualMachineFragmentInner.java | 813 ---- .../LabVirtualMachineInner.java | 827 ---- .../devtestlab/implementation/LabsInner.java | 2339 ---------- .../NotificationChannelFragmentInner.java | 152 - .../NotificationChannelInner.java | 168 - .../NotificationChannelsInner.java | 1050 ----- .../implementation/NotifyParametersInner.java | 71 - .../devtestlab/implementation/PageImpl.java | 75 - .../implementation/PoliciesInner.java | 996 ----- .../implementation/PolicyFragmentInner.java | 239 - .../implementation/PolicyInner.java | 255 -- .../implementation/PolicySetsInner.java | 253 -- .../RetargetSchedulePropertiesInner.java | 70 - .../implementation/ScheduleFragmentInner.java | 289 -- .../implementation/ScheduleInner.java | 305 -- .../implementation/SchedulesInner.java | 1372 ------ .../implementation/SecretInner.java | 98 - .../implementation/SecretsInner.java | 883 ---- .../implementation/ServiceRunnerInner.java | 45 - .../implementation/ServiceRunnersInner.java | 742 ---- .../implementation/UserFragmentInner.java | 126 - .../devtestlab/implementation/UserInner.java | 142 - .../devtestlab/implementation/UsersInner.java | 1024 ----- .../VirtualMachineSchedulesInner.java | 1187 ----- .../implementation/VirtualMachinesInner.java | 2640 ------------ .../VirtualNetworkFragmentInner.java | 206 - .../implementation/VirtualNetworkInner.java | 222 - .../implementation/VirtualNetworksInner.java | 1112 ----- .../implementation/package-info.java | 11 - .../management/devtestlab/package-info.java | 11 - azure-mgmt-insights/pom.xml | 122 - .../gallery/AutoscaleNotification.java | 104 - .../management/gallery/AutoscaleProfile.java | 151 - .../gallery/ComparisonOperationType.java | 65 - .../management/gallery/ConditionOperator.java | 59 - .../management/gallery/EmailNotification.java | 98 - .../LocationThresholdRuleCondition.java | 103 - .../azure/management/gallery/LogSettings.java | 98 - .../ManagementEventAggregationCondition.java | 99 - .../gallery/ManagementEventRuleCondition.java | 77 - .../management/gallery/MetricSettings.java | 97 - .../gallery/MetricStatisticType.java | 59 - .../management/gallery/MetricTrigger.java | 235 - .../azure/management/gallery/Recurrence.java | 73 - .../gallery/RecurrenceFrequency.java | 71 - .../management/gallery/RecurrentSchedule.java | 162 - .../management/gallery/RetentionPolicy.java | 70 - .../azure/management/gallery/RuleAction.java | 26 - .../management/gallery/RuleCondition.java | 26 - .../management/gallery/RuleDataSource.java | 25 - .../management/gallery/RuleEmailAction.java | 77 - .../RuleManagementEventClaimsDataSource.java | 43 - .../RuleManagementEventDataSource.java | 284 -- .../gallery/RuleMetricDataSource.java | 74 - .../management/gallery/RuleWebhookAction.java | 77 - .../azure/management/gallery/ScaleAction.java | 128 - .../management/gallery/ScaleCapacity.java | 99 - .../management/gallery/ScaleDirection.java | 56 - .../azure/management/gallery/ScaleRule.java | 69 - .../azure/management/gallery/ScaleType.java | 56 - .../gallery/ThresholdRuleCondition.java | 160 - .../gallery/TimeAggregationOperator.java | 62 - .../gallery/TimeAggregationType.java | 62 - .../azure/management/gallery/TimeWindow.java | 134 - .../gallery/WebhookNotification.java | 70 - .../AlertRuleIncidentsInner.java | 241 -- .../AlertRuleResourceInner.java | 171 - .../implementation/AlertRulesInner.java | 498 --- .../AutoscaleSettingResourceInner.java | 157 - .../AutoscaleSettingsInner.java | 685 --- .../gallery/implementation/IncidentInner.java | 94 - .../InsightsManagementClientImpl.java | 239 - .../implementation/InsightsManager.java | 89 - .../LogProfileResourceInner.java | 160 - .../implementation/LogProfilesInner.java | 386 -- .../gallery/implementation/PageImpl.java | 75 - .../gallery/implementation/PageImpl1.java | 75 - .../ServiceDiagnosticSettingsInner.java | 223 - ...erviceDiagnosticSettingsResourceInner.java | 160 - .../gallery/implementation/package-info.java | 11 - .../management/gallery/package-info.java | 11 - azure-mgmt-logic/pom.xml | 122 - .../AS2AcknowledgementConnectionSettings.java | 121 - .../management/logic/AS2AgreementContent.java | 69 - .../management/logic/AS2EnvelopeSettings.java | 148 - .../management/logic/AS2ErrorSettings.java | 69 - .../management/logic/AS2MdnSettings.java | 252 -- .../logic/AS2MessageConnectionSettings.java | 121 - .../management/logic/AS2OneWayAgreement.java | 95 - .../management/logic/AS2ProtocolSettings.java | 199 - .../management/logic/AS2SecuritySettings.java | 280 -- .../logic/AS2ValidationSettings.java | 282 -- .../management/logic/AgreementContent.java | 95 - .../azure/management/logic/AgreementType.java | 59 - .../management/logic/B2BPartnerContent.java | 44 - .../management/logic/BusinessIdentity.java | 69 - .../azure/management/logic/ContentHash.java | 69 - .../azure/management/logic/ContentLink.java | 147 - .../azure/management/logic/Correlation.java | 43 - .../azure/management/logic/DayOfWeek.java | 68 - .../azure/management/logic/DaysOfWeek.java | 68 - .../logic/EdifactAcknowledgementSettings.java | 303 -- .../logic/EdifactAgreementContent.java | 69 - .../management/logic/EdifactCharacterSet.java | 92 - .../logic/EdifactDecimalIndicator.java | 56 - .../logic/EdifactDelimiterOverride.java | 331 -- .../logic/EdifactEnvelopeOverride.java | 408 -- .../logic/EdifactEnvelopeSettings.java | 1084 ----- .../logic/EdifactFramingSettings.java | 307 -- .../logic/EdifactMessageFilter.java | 44 - .../logic/EdifactMessageIdentifier.java | 43 - .../logic/EdifactOneWayAgreement.java | 95 - .../logic/EdifactProcessingSettings.java | 148 - .../logic/EdifactProtocolSettings.java | 304 -- .../logic/EdifactSchemaReference.java | 199 - .../logic/EdifactValidationOverride.java | 202 - .../logic/EdifactValidationSettings.java | 283 -- .../management/logic/EncryptionAlgorithm.java | 68 - .../management/logic/ErrorProperties.java | 70 - .../azure/management/logic/ErrorResponse.java | 44 - .../logic/ErrorResponseException.java | 44 - .../GenerateUpgradedDefinitionParameters.java | 43 - .../management/logic/HashingAlgorithm.java | 68 - .../IntegrationAccountAgreementFilter.java | 44 - .../logic/IntegrationAccountMapFilter.java | 44 - ...nAccountMapPropertiesParametersSchema.java | 43 - .../IntegrationAccountPartnerFilter.java | 44 - .../logic/IntegrationAccountSchemaFilter.java | 44 - .../IntegrationAccountSessionFilter.java | 44 - .../logic/IntegrationAccountSku.java | 44 - .../logic/IntegrationAccountSkuName.java | 56 - .../azure/management/logic/KeyType.java | 56 - .../logic/KeyVaultKeyReference.java | 95 - .../logic/KeyVaultKeyReferenceKeyVault.java | 73 - .../azure/management/logic/MapType.java | 53 - .../management/logic/MessageFilterType.java | 56 - .../management/logic/OperationDisplay.java | 95 - .../azure/management/logic/ParameterType.java | 74 - .../management/logic/PartnerContent.java | 43 - .../azure/management/logic/PartnerType.java | 53 - .../management/logic/RecurrenceFrequency.java | 71 - .../management/logic/RecurrenceSchedule.java | 148 - .../logic/RecurrenceScheduleOccurrence.java | 70 - .../logic/RegenerateActionParameter.java | 44 - .../management/logic/ResourceReference.java | 62 - .../azure/management/logic/RetryHistory.java | 174 - .../azure/management/logic/SchemaType.java | 53 - .../logic/SegmentTerminatorSuffix.java | 62 - .../management/logic/SigningAlgorithm.java | 71 - .../microsoft/azure/management/logic/Sku.java | 70 - .../azure/management/logic/SkuName.java | 65 - .../logic/TrailingSeparatorPolicy.java | 59 - .../management/logic/UsageIndicator.java | 59 - .../management/logic/WorkflowFilter.java | 44 - .../logic/WorkflowOutputParameter.java | 32 - .../management/logic/WorkflowParameter.java | 123 - .../logic/WorkflowProvisioningState.java | 101 - .../logic/WorkflowRunActionFilter.java | 46 - .../management/logic/WorkflowRunFilter.java | 45 - .../management/logic/WorkflowRunTrigger.java | 226 - .../azure/management/logic/WorkflowState.java | 65 - .../management/logic/WorkflowStatus.java | 86 - .../logic/WorkflowTriggerFilter.java | 44 - .../logic/WorkflowTriggerHistoryFilter.java | 46 - ...WorkflowTriggerListCallbackUrlQueries.java | 121 - .../WorkflowTriggerProvisioningState.java | 101 - .../logic/WorkflowTriggerRecurrence.java | 175 - .../logic/X12AcknowledgementSettings.java | 407 -- .../management/logic/X12AgreementContent.java | 69 - .../management/logic/X12CharacterSet.java | 59 - .../azure/management/logic/X12DateFormat.java | 56 - .../logic/X12DelimiterOverrides.java | 252 -- .../management/logic/X12EnvelopeOverride.java | 279 -- .../management/logic/X12EnvelopeSettings.java | 646 --- .../management/logic/X12FramingSettings.java | 201 - .../management/logic/X12MessageFilter.java | 44 - .../logic/X12MessageIdentifier.java | 43 - .../management/logic/X12OneWayAgreement.java | 95 - .../logic/X12ProcessingSettings.java | 175 - .../management/logic/X12ProtocolSettings.java | 330 -- .../management/logic/X12SchemaReference.java | 121 - .../management/logic/X12SecuritySettings.java | 121 - .../azure/management/logic/X12TimeFormat.java | 62 - .../logic/X12ValidationOverride.java | 202 - .../logic/X12ValidationSettings.java | 283 -- .../logic/implementation/AgreementsInner.java | 736 ---- .../implementation/CallbackUrlInner.java | 43 - .../implementation/CertificatesInner.java | 730 ---- .../GetCallbackUrlParametersInner.java | 72 - .../IntegrationAccountAgreementInner.java | 239 - .../IntegrationAccountCertificateInner.java | 130 - .../IntegrationAccountInner.java | 71 - .../IntegrationAccountMapInner.java | 199 - .../IntegrationAccountPartnerInner.java | 131 - .../IntegrationAccountSchemaInner.java | 250 -- .../IntegrationAccountSessionInner.java | 77 - .../IntegrationAccountsInner.java | 1225 ------ .../LogicManagementClientImpl.java | 621 --- .../logic/implementation/LogicManager.java | 90 - .../logic/implementation/MapsInner.java | 736 ---- .../logic/implementation/OperationInner.java | 70 - .../logic/implementation/PageImpl.java | 75 - .../logic/implementation/PartnersInner.java | 736 ---- .../logic/implementation/SchemasInner.java | 736 ---- .../logic/implementation/SessionsInner.java | 736 ---- .../logic/implementation/WorkflowInner.java | 237 - .../WorkflowRunActionInner.java | 245 -- .../WorkflowRunActionsInner.java | 552 --- .../implementation/WorkflowRunInner.java | 235 - .../implementation/WorkflowRunsInner.java | 626 --- .../WorkflowTriggerCallbackUrlInner.java | 131 - .../WorkflowTriggerHistoriesInner.java | 656 --- .../WorkflowTriggerHistoryInner.java | 233 - .../implementation/WorkflowTriggerInner.java | 198 - .../implementation/WorkflowTriggersInner.java | 724 ---- .../implementation/WorkflowVersionInner.java | 217 - .../implementation/WorkflowVersionsInner.java | 729 ---- .../logic/implementation/WorkflowsInner.java | 1868 -------- .../logic/implementation/package-info.java | 11 - .../azure/management/logic/package-info.java | 11 - azure-mgmt-machinelearning/pom.xml | 122 - .../management/machinelearning/AssetItem.java | 227 - .../management/machinelearning/AssetType.java | 59 - .../AsyncOperationErrorInfo.java | 122 - .../machinelearning/BlobLocation.java | 71 - .../machinelearning/ColumnFormat.java | 104 - .../machinelearning/ColumnSpecification.java | 156 - .../machinelearning/ColumnType.java | 65 - .../machinelearning/CommitmentPlan.java | 45 - .../DiagnosticsConfiguration.java | 74 - .../machinelearning/DiagnosticsLevel.java | 62 - .../machinelearning/ExampleRequest.java | 72 - .../management/machinelearning/GraphEdge.java | 122 - .../management/machinelearning/GraphNode.java | 125 - .../machinelearning/GraphPackage.java | 101 - .../machinelearning/GraphParameter.java | 98 - .../machinelearning/GraphParameterLink.java | 69 - .../management/machinelearning/InputPort.java | 43 - .../machinelearning/InputPortType.java | 56 - .../MachineLearningWorkspace.java | 45 - .../machinelearning/ModeValueInfo.java | 70 - .../machinelearning/ModuleAssetParameter.java | 97 - .../machinelearning/OutputPort.java | 43 - .../machinelearning/OutputPortType.java | 56 - .../machinelearning/ParameterType.java | 89 - .../machinelearning/ProvisioningState.java | 65 - .../RealtimeConfiguration.java | 45 - .../ServiceInputOutputSpecification.java | 125 - .../machinelearning/StorageAccount.java | 69 - .../machinelearning/TableSpecification.java | 149 - .../machinelearning/WebServiceParameter.java | 70 - .../machinelearning/WebServiceProperties.java | 560 --- .../WebServicePropertiesForGraph.java | 47 - .../AsyncOperationStatusInner.java | 171 - ...zureMLWebServicesManagementClientImpl.java | 196 - .../MachineLearningManager.java | 90 - .../implementation/PageImpl.java | 75 - .../implementation/WebServiceInner.java | 45 - .../implementation/WebServiceKeysInner.java | 69 - .../implementation/WebServicesInner.java | 1713 -------- .../implementation/package-info.java | 11 - .../machinelearning/package-info.java | 11 - azure-mgmt-notificationhubs/pom.xml | 122 - .../notificationhubs/AccessRights.java | 56 - .../notificationhubs/AdmCredential.java | 97 - .../notificationhubs/ApnsCredential.java | 229 - .../notificationhubs/BaiduCredential.java | 97 - ...heckNameAvailabilityRequestParameters.java | 59 - .../notificationhubs/GcmCredential.java | 71 - .../notificationhubs/MpnsCredential.java | 97 - .../notificationhubs/NamespaceType.java | 53 - .../notificationhubs/PolicykeyResource.java | 45 - ...aredAccessAuthorizationRuleProperties.java | 44 - .../management/notificationhubs/Sku.java | 148 - .../management/notificationhubs/SkuName.java | 62 - .../notificationhubs/WnsCredential.java | 97 - .../CheckAvailabilityParametersInner.java | 181 - .../CheckAvailabilityResultInner.java | 45 - .../CheckNameAvailabilityResponseInner.java | 95 - .../implementation/HubsInner.java | 157 - .../implementation/NamesInner.java | 143 - ...amespaceCreateOrUpdateParametersInner.java | 314 -- .../NamespacePatchParametersInner.java | 71 - .../NamespaceResourceInner.java | 314 -- .../implementation/NamespacesInner.java | 1895 -------- ...ationHubCreateOrUpdateParametersInner.java | 262 -- .../NotificationHubResourceInner.java | 262 -- .../implementation/NotificationHubsInner.java | 1684 -------- .../NotificationHubsManagementClientImpl.java | 238 - .../NotificationHubsManager.java | 90 - .../implementation/PageImpl.java | 75 - .../PnsCredentialsResourceInner.java | 182 - .../implementation/ResourceListKeysInner.java | 147 - ...tionRuleCreateOrUpdateParametersInner.java | 45 - ...dAccessAuthorizationRuleResourceInner.java | 48 - .../implementation/package-info.java | 11 - .../notificationhubs/package-info.java | 11 - azure-mgmt-powerbi/pom.xml | 122 - .../management/powerbi/AccessKeyName.java | 53 - .../azure/management/powerbi/AzureSku.java | 77 - .../management/powerbi/CheckNameReason.java | 59 - .../azure/management/powerbi/Display.java | 159 - .../azure/management/powerbi/Error.java | 122 - .../azure/management/powerbi/ErrorDetail.java | 95 - .../management/powerbi/ErrorException.java | 44 - .../azure/management/powerbi/Operation.java | 71 - .../UpdateWorkspaceCollectionRequest.java | 77 - .../powerbi/WorkspaceCollectionAccessKey.java | 43 - .../implementation/CheckNameRequestInner.java | 69 - .../CheckNameResponseInner.java | 99 - ...CreateWorkspaceCollectionRequestInner.java | 104 - ...igrateWorkspaceCollectionRequestInner.java | 71 - .../implementation/OperationListInner.java | 45 - .../powerbi/implementation/PageImpl.java | 75 - .../PowerBIEmbeddedManagementClientImpl.java | 312 -- .../implementation/PowerBIManager.java | 90 - .../WorkspaceCollectionAccessKeysInner.java | 69 - .../WorkspaceCollectionInner.java | 208 - .../WorkspaceCollectionsInner.java | 1207 ------ .../implementation/WorkspaceInner.java | 121 - .../implementation/WorkspacesInner.java | 148 - .../powerbi/implementation/package-info.java | 11 - .../management/powerbi/package-info.java | 11 - azure-mgmt-recoveryservices/pom.xml | 122 - .../management/recoveryservices/AuthType.java | 68 - .../recoveryservices/CertificateRequest.java | 44 - .../ClientDiscoveryDisplay.java | 77 - .../ClientDiscoveryForLogSpecification.java | 63 - ...lientDiscoveryForServiceSpecification.java | 33 - .../EnhancedSecurityState.java | 62 - .../recoveryservices/JobsSummary.java | 95 - .../recoveryservices/MonitoringSummary.java | 173 - .../management/recoveryservices/NameInfo.java | 69 - .../ResourceCertificateAndAadDetails.java | 151 - .../ResourceCertificateAndAcsDetails.java | 99 - .../ResourceCertificateDetails.java | 235 - .../management/recoveryservices/Sku.java | 43 - .../management/recoveryservices/SkuName.java | 59 - .../recoveryservices/StorageModelType.java | 62 - .../recoveryservices/StorageType.java | 62 - .../recoveryservices/StorageTypeState.java | 62 - .../recoveryservices/TriggerType.java | 59 - .../recoveryservices/UpgradeDetails.java | 155 - .../recoveryservices/UsagesUnit.java | 71 - .../recoveryservices/VaultProperties.java | 58 - .../recoveryservices/VaultUpgradeState.java | 65 - .../BackupStorageConfigInner.java | 105 - .../BackupStorageConfigsInner.java | 242 -- .../BackupVaultConfigInner.java | 105 - .../BackupVaultConfigsInner.java | 243 -- ...ClientDiscoveryValueForSingleApiInner.java | 82 - .../implementation/OperationsInner.java | 293 -- .../implementation/PageImpl.java | 75 - .../implementation/PageImpl1.java | 75 - .../RawCertificateDataInner.java | 71 - .../RecoveryServicesClientImpl.java | 295 -- .../RecoveryServicesManager.java | 90 - .../RegisteredIdentitiesInner.java | 150 - .../implementation/ReplicationUsageInner.java | 175 - .../ReplicationUsagesInner.java | 146 - .../implementation/TrackedResourceInner.java | 17 - .../implementation/UsagesInner.java | 146 - .../VaultCertificateResponseInner.java | 123 - .../VaultCertificatesInner.java | 248 -- .../VaultExtendedInfoResourceInner.java | 124 - .../VaultExtendedInfosInner.java | 340 -- .../implementation/VaultInner.java | 71 - .../implementation/VaultUsageInner.java | 177 - .../implementation/VaultsInner.java | 590 --- .../implementation/package-info.java | 11 - .../recoveryservices/package-info.java | 11 - azure-mgmt-relay/pom.xml | 122 - .../azure/management/relay/AccessRights.java | 56 - .../relay/CheckNameAvailability.java | 45 - .../azure/management/relay/ErrorResponse.java | 70 - .../relay/ErrorResponseException.java | 44 - .../azure/management/relay/KeyType.java | 53 - .../management/relay/OperationDisplay.java | 62 - .../relay/ProvisioningStateEnum.java | 65 - .../azure/management/relay/Relaytype.java | 53 - .../microsoft/azure/management/relay/Sku.java | 76 - .../azure/management/relay/SkuTier.java | 50 - .../management/relay/UnavailableReason.java | 65 - .../relay/implementation/AccessKeysInner.java | 149 - .../AuthorizationRuleInner.java | 48 - .../CheckNameAvailabilityResultInner.java | 88 - .../implementation/HybridConnectionInner.java | 123 - .../HybridConnectionsInner.java | 1490 ------- .../relay/implementation/NamespacesInner.java | 1981 --------- .../relay/implementation/OperationInner.java | 59 - .../relay/implementation/OperationsInner.java | 283 -- .../relay/implementation/PageImpl.java | 75 - .../RegenerateAccessKeyParametersInner.java | 73 - .../RelayManagementClientImpl.java | 238 - .../relay/implementation/RelayManager.java | 90 - .../implementation/RelayNamespaceInner.java | 124 - .../RelayUpdateParametersInner.java | 124 - .../ResourceNamespacePatchInner.java | 45 - .../implementation/TrackedResourceInner.java | 18 - .../relay/implementation/WCFRelaysInner.java | 1492 ------- .../relay/implementation/WcfRelayInner.java | 189 - .../relay/implementation/package-info.java | 11 - .../azure/management/relay/package-info.java | 11 - azure-mgmt-scheduler/pom.xml | 125 - .../scheduler/BasicAuthentication.java | 69 - .../scheduler/ClientCertAuthentication.java | 150 - .../azure/management/scheduler/DayOfWeek.java | 68 - .../scheduler/HttpAuthentication.java | 44 - .../scheduler/HttpAuthenticationType.java | 59 - .../management/scheduler/HttpRequest.java | 148 - .../azure/management/scheduler/JobAction.java | 200 - .../management/scheduler/JobActionType.java | 62 - .../scheduler/JobCollectionProperties.java | 96 - .../scheduler/JobCollectionQuota.java | 95 - .../scheduler/JobCollectionState.java | 59 - .../management/scheduler/JobErrorAction.java | 174 - .../scheduler/JobExecutionStatus.java | 56 - .../scheduler/JobHistoryActionName.java | 53 - .../JobHistoryDefinitionProperties.java | 140 - .../scheduler/JobHistoryFilter.java | 44 - .../scheduler/JobMaxRecurrence.java | 71 - .../management/scheduler/JobRecurrence.java | 150 - .../scheduler/JobRecurrenceSchedule.java | 149 - ...obRecurrenceScheduleMonthlyOccurrence.java | 71 - .../management/scheduler/JobScheduleDay.java | 68 - .../azure/management/scheduler/JobState.java | 59 - .../management/scheduler/JobStateFilter.java | 44 - .../azure/management/scheduler/JobStatus.java | 96 - .../scheduler/OAuthAuthentication.java | 121 - .../scheduler/RecurrenceFrequency.java | 62 - .../management/scheduler/RetryPolicy.java | 98 - .../azure/management/scheduler/RetryType.java | 53 - .../scheduler/ServiceBusAuthentication.java | 96 - .../ServiceBusAuthenticationType.java | 53 - .../ServiceBusBrokeredMessageProperties.java | 357 -- .../scheduler/ServiceBusMessage.java | 175 - .../scheduler/ServiceBusQueueMessage.java | 43 - .../scheduler/ServiceBusTopicMessage.java | 43 - .../scheduler/ServiceBusTransportType.java | 56 - .../azure/management/scheduler/Sku.java | 44 - .../management/scheduler/SkuDefinition.java | 59 - .../scheduler/StorageQueueMessage.java | 121 - .../JobCollectionDefinitionInner.java | 155 - .../implementation/JobCollectionsInner.java | 1303 ------ .../implementation/JobDefinitionInner.java | 88 - .../JobHistoryDefinitionInner.java | 78 - .../implementation/JobPropertiesInner.java | 142 - .../scheduler/implementation/JobsInner.java | 1512 ------- .../scheduler/implementation/PageImpl.java | 75 - .../ScheduleServiceManager.java | 94 - .../SchedulerManagementClientImpl.java | 210 - .../implementation/package-info.java | 10 - .../management/scheduler/package-info.java | 10 - azure-mgmt-servicefabric/pom.xml | 122 - .../AvailableOperationDisplay.java | 121 - .../servicefabric/AzureActiveDirectory.java | 95 - .../servicefabric/CertificateDescription.java | 97 - .../ClientCertificateCommonName.java | 97 - .../ClientCertificateThumbprint.java | 70 - .../servicefabric/ClusterHealthPolicy.java | 74 - .../ClusterUpgradeDeltaHealthPolicy.java | 95 - .../servicefabric/ClusterUpgradePolicy.java | 280 -- .../servicefabric/ClusterVersionDetails.java | 95 - .../DiagnosticsStorageAccountConfig.java | 147 - .../EndpointRangeDescription.java | 69 - .../management/servicefabric/ErrorModel.java | 43 - .../servicefabric/ErrorModelError.java | 69 - .../servicefabric/ErrorModelException.java | 44 - .../servicefabric/NodeTypeDescription.java | 309 -- .../servicefabric/ProvisioningState.java | 65 - .../SettingsParameterDescription.java | 69 - .../SettingsSectionDescription.java | 71 - .../ClusterCodeVersionsResultInner.java | 175 - .../implementation/ClusterInner.java | 484 --- .../ClusterUpdateParametersInner.java | 325 -- .../implementation/ClusterVersionsInner.java | 303 -- .../implementation/ClustersInner.java | 1071 ----- .../implementation/OperationResultInner.java | 122 - .../implementation/OperationsInner.java | 283 -- .../implementation/PageImpl.java | 75 - .../ServiceFabricManagementClientImpl.java | 224 - .../implementation/ServiceFabricManager.java | 90 - .../implementation/package-info.java | 10 - .../servicefabric/package-info.java | 10 - azure-mgmt-streamanalytics/pom.xml | 122 - .../streamanalytics/AvroSerialization.java | 49 - ...hineLearningWebServiceFunctionBinding.java | 158 - ...onRetrieveDefaultDefinitionParameters.java | 79 - ...eMachineLearningWebServiceInputColumn.java | 98 - .../AzureMachineLearningWebServiceInputs.java | 72 - ...MachineLearningWebServiceOutputColumn.java | 72 - .../AzureSqlDatabaseDataSourceProperties.java | 152 - .../AzureSqlDatabaseOutputDataSource.java | 158 - .../AzureTableOutputDataSource.java | 213 - .../BlobDataSourceProperties.java | 159 - .../streamanalytics/BlobOutputDataSource.java | 165 - .../BlobReferenceInputDataSource.java | 165 - .../BlobStreamInputDataSource.java | 191 - .../streamanalytics/CompatibilityLevel.java | 56 - .../streamanalytics/CsvSerialization.java | 84 - .../streamanalytics/DiagnosticCondition.java | 65 - .../streamanalytics/Diagnostics.java | 35 - .../DocumentDbOutputDataSource.java | 190 - .../management/streamanalytics/Encoding.java | 56 - .../streamanalytics/ErrorResponse.java | 47 - .../EventHubDataSourceProperties.java | 43 - .../EventHubOutputDataSource.java | 158 - .../EventHubStreamInputDataSource.java | 161 - .../EventsOutOfOrderPolicy.java | 59 - .../streamanalytics/FunctionBinding.java | 26 - .../streamanalytics/FunctionInput.java | 73 - .../streamanalytics/FunctionOutput.java | 45 - .../streamanalytics/FunctionProperties.java | 43 - .../streamanalytics/InputProperties.java | 87 - .../IoTHubStreamInputDataSource.java | 160 - .../JavaScriptFunctionBinding.java | 50 - ...onRetrieveDefaultDefinitionParameters.java | 78 - .../JsonOutputSerializationFormat.java | 59 - .../streamanalytics/JsonSerialization.java | 85 - .../streamanalytics/OperationDisplay.java | 79 - .../streamanalytics/OutputDataSource.java | 30 - .../streamanalytics/OutputErrorPolicy.java | 59 - .../streamanalytics/OutputStartMode.java | 62 - .../ReferenceInputDataSource.java | 24 - .../ReferenceInputProperties.java | 48 - .../ScalarFunctionProperties.java | 103 - .../streamanalytics/Serialization.java | 27 - .../ServiceBusDataSourceProperties.java | 100 - .../ServiceBusQueueOutputDataSource.java | 160 - .../ServiceBusTopicOutputDataSource.java | 160 - .../azure/management/streamanalytics/Sku.java | 44 - .../management/streamanalytics/SkuName.java | 56 - .../streamanalytics/StorageAccount.java | 71 - .../StreamInputDataSource.java | 26 - .../StreamInputProperties.java | 48 - .../management/streamanalytics/UdfType.java | 50 - .../implementation/FunctionInner.java | 46 - ...rieveDefaultDefinitionParametersInner.java | 28 - .../FunctionsCreateOrReplaceHeadersInner.java | 46 - .../FunctionsGetHeadersInner.java | 46 - .../implementation/FunctionsInner.java | 1553 ------- .../FunctionsUpdateHeadersInner.java | 46 - .../implementation/InputInner.java | 47 - .../InputsCreateOrReplaceHeadersInner.java | 46 - .../implementation/InputsGetHeadersInner.java | 46 - .../implementation/InputsInner.java | 1368 ------ .../InputsUpdateHeadersInner.java | 46 - .../implementation/OperationInner.java | 49 - .../implementation/OperationsInner.java | 281 -- .../implementation/OutputInner.java | 112 - .../OutputsCreateOrReplaceHeadersInner.java | 46 - .../OutputsGetHeadersInner.java | 46 - .../implementation/OutputsInner.java | 1368 ------ .../OutputsUpdateHeadersInner.java | 46 - .../implementation/PageImpl.java | 75 - .../ResourceTestStatusInner.java | 49 - .../StartStreamingJobParametersInner.java | 79 - .../StreamAnalyticsManagementClientImpl.java | 267 -- .../StreamAnalyticsManager.java | 90 - .../implementation/StreamingJobInner.java | 500 --- ...eamingJobsCreateOrReplaceHeadersInner.java | 46 - .../StreamingJobsGetHeadersInner.java | 46 - .../implementation/StreamingJobsInner.java | 2083 --------- .../StreamingJobsUpdateHeadersInner.java | 46 - .../SubscriptionQuotaInner.java | 50 - .../SubscriptionQuotasListResultInner.java | 34 - .../implementation/SubscriptionsInner.java | 137 - .../implementation/TransformationInner.java | 95 - ...formationsCreateOrReplaceHeadersInner.java | 46 - .../TransformationsGetHeadersInner.java | 46 - .../implementation/TransformationsInner.java | 561 --- .../TransformationsUpdateHeadersInner.java | 46 - .../implementation/package-info.java | 11 - .../streamanalytics/package-info.java | 11 - pom.xml | 17 - 1233 files changed, 250386 deletions(-) delete mode 100644 azure-mgmt-apimanagement/pom.xml delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AccessInformationUpdateParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AdditionalLocation.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiContractProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiCreateOrUpdatePropertiesWsdlSelector.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiEntityBaseContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceApplyNetworkConfigurationParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceBaseProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceCheckNameAvailabilityParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceIdentity.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceSkuProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiRevisionInfoContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiTagResourceContractProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiVersionSetContractDetails.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiVersionSetEntityBase.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApimResource.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AsyncOperationStatus.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthenticationSettingsContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthorizationMethod.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthorizationServerContractBaseProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendAuthorizationHeaderCredentials.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendBaseParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendCredentialsContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProtocol.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProxyContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendServiceFabricClusterProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendTlsProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BearerTokenSendingMethod.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/CertificateConfiguration.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ClientAuthenticationMethod.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/Confirmation.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ConnectivityStatusContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ConnectivityStatusType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ContentFormat.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/EmailTemplateParametersContractProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorFieldContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorResponse.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorResponseException.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ExportFormat.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GrantType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GroupContractProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GroupType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameConfiguration.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameConfigurationOld.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/IdentityProviderBaseParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/IdentityProviderType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/KeyType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/LoggerType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/NameAvailabilityReason.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/NotificationName.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OAuth2AuthenticationSettingsContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationDisplay.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationEntityBaseContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationResultLogItemContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationTagResourceContractProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ParameterContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicyContentFormat.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicyScopeContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicySnippetContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductEntityBaseParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductState.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductTagResourceContractProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PropertyEntityBaseParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/Protocol.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/QuotaCounterValueContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RecipientsContractProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RegistrationDelegationSettingsProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RepresentationContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RequestContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ResponseContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SkuType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SoapApiType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionKeyParameterNamesContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionState.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionsDelegationSettingsProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TagCreateUpdateParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TagTagResourceContractProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TemplateName.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TermsOfServiceProperties.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TokenBodyParameterContract.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/UserEntityBaseParameters.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/UserState.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VersioningScheme.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VirtualNetworkConfiguration.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VirtualNetworkType.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/X509CertificateName.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AccessInformationContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiCreateOrUpdateHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiCreateOrUpdateParameterInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticLoggersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiExportResultInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiExportsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementClientImpl.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementManager.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementOperationsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceBackupRestoreParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceGetSsoTokenResultInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceNameAvailabilityResultInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceResourceInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUpdateHostnameParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUploadCertificateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServicesInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicyGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicyGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicysInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyListByApiHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicysInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiProductsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleaseContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleaseGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleasesInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiRevisionContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiRevisionsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaListByApiHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemasInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiUpdateContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApisInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerUpdateContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendReconnectContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateCreateOrUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateInformationInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificatesInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DeployConfigurationParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticLoggersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplatesInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GenerateSsoUrlResultInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupCreateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupUsersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProvidersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerUpdateContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusContractByLocationInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationRecipientEmailsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationRecipientUsersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProviderGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProviderGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProvidersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenidConnectProviderContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenidConnectProviderUpdateContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationResultContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationUpdateContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PageImpl.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PageImpl1.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyCollectionInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicySnippetsCollectionInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicySnippetsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicysInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalDelegationSettingsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalSigninSettingsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalSignupSettingsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductApisInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGroupsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyListByProductHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicysInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductSubscriptionsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertysInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaByCounterKeysInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaByPeriodKeysInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterCollectionInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterValueContractPropertiesInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientEmailCollectionInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientEmailContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientUserCollectionInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientUserContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RegionContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RegionsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ReportRecordContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ReportsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RequestReportRecordContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SaveConfigurationParameterInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SchemaContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionCreateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionCreateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionGetEntityStateHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByApiHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByOperationHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByProductHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByApiHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByOperationHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByProductHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagResourceContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagResourcesInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGitGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGitsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantConfigurationSyncStateContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantConfigurationsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserCreateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGetEntityTagHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGetHeadersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGroupsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserIdentitiesInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserIdentityContractInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserSubscriptionsInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserTokenParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserTokenResultInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserUpdateParametersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UsersInner.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/package-info.java delete mode 100644 azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/package-info.java delete mode 100644 azure-mgmt-billing/pom.xml delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/DownloadUrl.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorDetails.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorResponse.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorResponseException.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/OperationDisplay.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingManagementClientImpl.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingManager.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingPeriodInner.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingPeriodsInner.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/InvoiceInner.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/InvoicesInner.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/OperationInner.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/OperationsInner.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/PageImpl.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/package-info.java delete mode 100644 azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/package-info.java delete mode 100644 azure-mgmt-cognitiveservices/pom.xml delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CheckSkuAvailabilityParameter.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CheckSkuAvailabilityResult.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CognitiveServicesAccountUpdateParameters.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CognitiveServicesResourceAndSku.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Error.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ErrorBody.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ErrorException.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/KeyName.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Kind.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/MetricName.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/OperationDisplayInfo.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ProvisioningState.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/QuotaUsageStatus.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/RegenerateKeyParameters.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/SkuName.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/SkuTier.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/UnitType.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Usage.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/AccountsInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CheckSkuAvailabilityResultListInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CheckSkuAvailabilitysInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountCreateParametersInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountKeysInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountsInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesManager.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/OperationEntityInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/OperationsInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/PageImpl.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/SkuInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/UsagesResultInner.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/package-info.java delete mode 100644 azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/package-info.java delete mode 100644 azure-mgmt-consumption/pom.xml delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/BudgetTimePeriod.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/CategoryType.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/CurrentSpend.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Datagrain.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorDetails.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorResponse.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorResponseException.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Filters.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/MeterDetails.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Notification.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/OperationDisplay.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/OperatorType.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/PriceSheetProperties.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ProxyResource.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/TimeGrainType.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/BudgetInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/BudgetsInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ConsumptionManagementClientImpl.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ConsumptionManager.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/MarketplaceInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/MarketplacesInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/OperationInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/OperationsInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PageImpl.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PageImpl1.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PriceSheetResultInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PriceSheetsInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationDetailsInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationSummariesInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationsDetailsInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationsSummariesInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/UsageDetailInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/UsageDetailsInner.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/package-info.java delete mode 100644 azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/package-info.java delete mode 100644 azure-mgmt-customerinsights/pom.xml delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/AssignmentPrincipal.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/AzureBlobConnectorProperties.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CalculationWindowTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CardinalityTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CompletionOperationTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingAvailability.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingCompleteOperation.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingErrorManagement.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingFormat.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingProperties.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingStates.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingStructure.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorStates.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CrmConnectorEntities.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CrmConnectorProperties.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/DataSourcePrecedence.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/DataSourceType.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EnrichingKpi.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityType.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityTypeDefinition.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ErrorManagementTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/FrequencyTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/HubBillingInfoFormat.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/InstanceOperationType.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiAlias.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiExtract.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiFunctions.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiGroupByMetadata.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiParticipantProfilesMetadata.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiThresholds.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/LinkTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/MetadataDefinitionBase.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/Participant.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ParticipantProfilePropertyReference.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ParticipantPropertyReference.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/PermissionTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProfileEnumValidValuesFormat.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/PropertyDefinition.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProvisioningStates.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProxyResource.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipLinkFieldMapping.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipTypeFieldMapping.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipTypeMapping.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipsLookup.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ResourceSetDescription.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RoleTypes.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceConnectorProperties.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceDiscoverSetting.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceTable.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/Status.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/StrongId.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/TypePropertiesMapping.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPoliciesInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPolicyInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPolicyResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorMappingResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorMappingsInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorsInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/CustomerInsightsManagementClientImpl.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/CustomerInsightsManager.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/GetImageUploadUrlInputInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/HubInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/HubsInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ImageDefinitionInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ImagesInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/InteractionResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/InteractionsInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiDefinitionInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpisInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/LinkResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/LinksInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/PageImpl.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ProfileResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ProfilesInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipLinkResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipLinksInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipsInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentsInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RolesInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/SuggestRelationshipLinksResponseInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ViewResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ViewsInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/WidgetTypeResourceFormatInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/WidgetTypesInner.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/package-info.java delete mode 100644 azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/package-info.java delete mode 100755 azure-mgmt-devices/pom.xml delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/AccessRights.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/Capabilities.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/CloudToDeviceProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/EventHubProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/FallbackRouteProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/FeedbackProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubCapacity.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubNameUnavailabilityReason.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubScaleType.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSku.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSkuInfo.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSkuTier.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IpFilterActionType.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IpFilterRule.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/JobStatus.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/JobType.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/MessagingEndpointProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationInputs.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationMonitoringLevel.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationsMonitoringProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RouteProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingEndpoints.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingEventHubProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingServiceBusQueueEndpointProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingServiceBusTopicEndpointProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingSource.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/StorageEndpointProperties.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/DevicesManager.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ErrorDetailsInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ErrorDetailsInnerException.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/EventHubConsumerGroupInfoInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ExportDevicesRequestInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ImportDevicesRequestInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubClientImpl.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubDescriptionInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubNameAvailabilityInfoInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubQuotaMetricInfoInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubResourcesInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubSkuDescriptionInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/JobResponseInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/PageImpl.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/RegistryStatisticsInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/SharedAccessSignatureAuthorizationRuleInner.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/package-info.java delete mode 100755 azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/package-info.java delete mode 100644 azure-mgmt-devtestlab/pom.xml delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ApplyArtifactsRequest.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArmTemplateParameterProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactDeploymentStatusProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactDeploymentStatusPropertiesFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactInstallPropertiesFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactParameterProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactParameterPropertiesFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/AttachDiskProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/AttachNewDataDiskOptions.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/BulkCreationParameters.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeDataDisk.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeDataDiskFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmInstanceViewStatus.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmInstanceViewStatusFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmPropertiesFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostThresholdProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostThresholdStatus.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostType.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImageOsType.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImagePropertiesCustom.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImagePropertiesFromVm.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DayDetails.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DayDetailsFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DetachDataDiskProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DetachDiskProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EnableStatus.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EnvironmentDeploymentProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EvaluatePoliciesRequest.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Event.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EventFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ExternalSubnet.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ExternalSubnetFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/FileUploadOptions.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/FormulaPropertiesFromVm.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GalleryImageReference.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GalleryImageReferenceFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GenerateUploadUriParameter.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HostCachingOptions.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HourDetails.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HourDetailsFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/IdentityProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/InboundNatRule.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/InboundNatRuleFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabCostDetailsProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabCostSummaryProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabResourceCostProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LinuxOsInfo.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LinuxOsState.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NetworkInterfaceProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NetworkInterfacePropertiesFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationChannelEventType.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationSettings.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationSettingsFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationStatus.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ParameterInfo.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ParametersValueFileInfo.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PercentageCostThresholdProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyEvaluatorType.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyFactName.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicySetResult.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyStatus.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyViolation.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Port.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PortFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PremiumDataDisk.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ReportingCycleType.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SharedPublicIpAddressConfiguration.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SharedPublicIpAddressConfigurationFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ShutdownNotificationContent.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SourceControlType.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/StorageType.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Subnet.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetOverride.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetOverrideFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetSharedPublicIpAddressConfiguration.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetSharedPublicIpAddressConfigurationFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TargetCostProperties.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TargetCostStatus.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TransportProtocol.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UsagePermissionType.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserIdentity.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserIdentityFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserSecretStore.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserSecretStoreFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/VirtualMachineCreationSource.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WeekDetails.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WeekDetailsFragment.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WindowsOsInfo.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WindowsOsState.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ApplicableScheduleFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ApplicableScheduleInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplateInfoInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplateInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplatesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactInstallPropertiesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourceFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourceInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourcesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactsInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CostsInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CustomImageInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CustomImagesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DataDiskPropertiesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DevTestLabManager.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DevTestLabsClientImpl.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DiskInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DisksInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DtlEnvironmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EnvironmentsInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EvaluatePoliciesPropertiesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EvaluatePoliciesResponseInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ExportResourceUsageParametersInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/FormulaInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/FormulasInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GalleryImageInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GalleryImagesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GenerateArmTemplateRequestInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GenerateUploadUriResponseInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GlobalSchedulesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabCostInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVhdInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineCreationParameterInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabsInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelsInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotifyParametersInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PageImpl.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PoliciesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicyFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicyInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicySetsInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/RetargetSchedulePropertiesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ScheduleFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ScheduleInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SchedulesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SecretInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SecretsInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ServiceRunnerInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ServiceRunnersInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UserFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UserInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UsersInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualMachineSchedulesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualMachinesInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkFragmentInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworksInner.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/package-info.java delete mode 100644 azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/package-info.java delete mode 100644 azure-mgmt-insights/pom.xml delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/AutoscaleNotification.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/AutoscaleProfile.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ComparisonOperationType.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ConditionOperator.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/EmailNotification.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/LocationThresholdRuleCondition.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/LogSettings.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ManagementEventAggregationCondition.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ManagementEventRuleCondition.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricSettings.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricStatisticType.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricTrigger.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/Recurrence.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrenceFrequency.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrentSchedule.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RetentionPolicy.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleAction.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleCondition.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleDataSource.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleEmailAction.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleManagementEventClaimsDataSource.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleManagementEventDataSource.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleMetricDataSource.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleWebhookAction.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleAction.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleCapacity.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleDirection.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleRule.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleType.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ThresholdRuleCondition.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeAggregationOperator.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeAggregationType.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeWindow.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/WebhookNotification.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRuleIncidentsInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRuleResourceInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRulesInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AutoscaleSettingResourceInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AutoscaleSettingsInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/IncidentInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/InsightsManagementClientImpl.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/InsightsManager.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/LogProfileResourceInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/LogProfilesInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/PageImpl.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/PageImpl1.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/ServiceDiagnosticSettingsInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/ServiceDiagnosticSettingsResourceInner.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/package-info.java delete mode 100644 azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/package-info.java delete mode 100755 azure-mgmt-logic/pom.xml delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AcknowledgementConnectionSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AgreementContent.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2EnvelopeSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ErrorSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2MdnSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2MessageConnectionSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2OneWayAgreement.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ProtocolSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2SecuritySettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ValidationSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AgreementContent.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AgreementType.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/B2BPartnerContent.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BusinessIdentity.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ContentHash.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ContentLink.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Correlation.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/DayOfWeek.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/DaysOfWeek.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactAcknowledgementSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactAgreementContent.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactCharacterSet.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDecimalIndicator.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDelimiterOverride.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeOverride.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactFramingSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactMessageFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactMessageIdentifier.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactOneWayAgreement.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactProcessingSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactProtocolSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactSchemaReference.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactValidationOverride.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactValidationSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EncryptionAlgorithm.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorProperties.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponse.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponseException.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/GenerateUpgradedDefinitionParameters.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/HashingAlgorithm.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountAgreementFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountMapFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountMapPropertiesParametersSchema.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountPartnerFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSchemaFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSessionFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSku.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSkuName.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyType.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyReference.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyReferenceKeyVault.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/MapType.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/MessageFilterType.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationDisplay.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ParameterType.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/PartnerContent.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/PartnerType.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceFrequency.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceSchedule.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceScheduleOccurrence.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RegenerateActionParameter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ResourceReference.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RetryHistory.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SchemaType.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SegmentTerminatorSuffix.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SigningAlgorithm.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Sku.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SkuName.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrailingSeparatorPolicy.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/UsageIndicator.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowOutputParameter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowParameter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowProvisioningState.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunActionFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunTrigger.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowState.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowStatus.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerHistoryFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerListCallbackUrlQueries.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerProvisioningState.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerRecurrence.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12AcknowledgementSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12AgreementContent.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12CharacterSet.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12DateFormat.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12DelimiterOverrides.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12EnvelopeOverride.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12EnvelopeSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12FramingSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12MessageFilter.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12MessageIdentifier.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12OneWayAgreement.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ProcessingSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ProtocolSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12SchemaReference.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12SecuritySettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12TimeFormat.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ValidationOverride.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ValidationSettings.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/CallbackUrlInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/CertificatesInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/GetCallbackUrlParametersInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAgreementInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountCertificateInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountMapInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountPartnerInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountSchemaInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountSessionInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManagementClientImpl.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManager.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/OperationInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PartnersInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SchemasInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SessionsInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunsInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerCallbackUrlInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerHistoriesInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerHistoryInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowVersionInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowVersionsInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowsInner.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/package-info.java delete mode 100755 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/package-info.java delete mode 100755 azure-mgmt-machinelearning/pom.xml delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetItem.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetType.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AsyncOperationErrorInfo.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/BlobLocation.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnFormat.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnSpecification.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnType.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/CommitmentPlan.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/DiagnosticsConfiguration.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/DiagnosticsLevel.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ExampleRequest.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphEdge.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphNode.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphPackage.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphParameter.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphParameterLink.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/InputPort.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/InputPortType.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/MachineLearningWorkspace.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModeValueInfo.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModuleAssetParameter.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/OutputPort.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/OutputPortType.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ParameterType.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ProvisioningState.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/RealtimeConfiguration.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ServiceInputOutputSpecification.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/StorageAccount.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/TableSpecification.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServiceParameter.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServiceProperties.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServicePropertiesForGraph.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/AsyncOperationStatusInner.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/AzureMLWebServicesManagementClientImpl.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/MachineLearningManager.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/PageImpl.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServiceInner.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServiceKeysInner.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServicesInner.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/package-info.java delete mode 100755 azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/package-info.java delete mode 100644 azure-mgmt-notificationhubs/pom.xml delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AccessRights.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AdmCredential.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ApnsCredential.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/BaiduCredential.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/CheckNameAvailabilityRequestParameters.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/GcmCredential.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/MpnsCredential.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/NamespaceType.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/PolicykeyResource.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleProperties.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/Sku.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SkuName.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/WnsCredential.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityParametersInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityResultInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckNameAvailabilityResponseInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/HubsInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamesInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceCreateOrUpdateParametersInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacePatchParametersInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceResourceInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacesInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubCreateOrUpdateParametersInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubResourceInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManagementClientImpl.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManager.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PageImpl.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PnsCredentialsResourceInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/ResourceListKeysInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleCreateOrUpdateParametersInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleResourceInner.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/package-info.java delete mode 100644 azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/package-info.java delete mode 100755 azure-mgmt-powerbi/pom.xml delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/AccessKeyName.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/AzureSku.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/CheckNameReason.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Display.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Error.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/ErrorDetail.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/ErrorException.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Operation.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/UpdateWorkspaceCollectionRequest.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/WorkspaceCollectionAccessKey.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CheckNameRequestInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CheckNameResponseInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CreateWorkspaceCollectionRequestInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/MigrateWorkspaceCollectionRequestInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/OperationListInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PageImpl.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PowerBIEmbeddedManagementClientImpl.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PowerBIManager.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionAccessKeysInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionsInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspacesInner.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/package-info.java delete mode 100755 azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/package-info.java delete mode 100755 azure-mgmt-recoveryservices/pom.xml delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/AuthType.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/CertificateRequest.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryDisplay.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryForLogSpecification.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryForServiceSpecification.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/EnhancedSecurityState.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/JobsSummary.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/MonitoringSummary.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/NameInfo.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateAndAadDetails.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateAndAcsDetails.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateDetails.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/Sku.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/SkuName.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageModelType.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageType.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageTypeState.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/TriggerType.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/UpgradeDetails.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/UsagesUnit.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/VaultProperties.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/VaultUpgradeState.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupStorageConfigInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupStorageConfigsInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupVaultConfigInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupVaultConfigsInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ClientDiscoveryValueForSingleApiInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/OperationsInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/PageImpl.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/PageImpl1.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RawCertificateDataInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RecoveryServicesClientImpl.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RecoveryServicesManager.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RegisteredIdentitiesInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ReplicationUsageInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ReplicationUsagesInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/TrackedResourceInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/UsagesInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultCertificateResponseInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultCertificatesInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultExtendedInfoResourceInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultExtendedInfosInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultUsageInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultsInner.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/package-info.java delete mode 100755 azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/package-info.java delete mode 100755 azure-mgmt-relay/pom.xml delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/AccessRights.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/CheckNameAvailability.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ErrorResponse.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ErrorResponseException.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/KeyType.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/OperationDisplay.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ProvisioningStateEnum.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/Relaytype.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/Sku.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/SkuTier.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/UnavailableReason.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/AccessKeysInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/AuthorizationRuleInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/CheckNameAvailabilityResultInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/HybridConnectionInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/HybridConnectionsInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/NamespacesInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/OperationInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/OperationsInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/PageImpl.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RegenerateAccessKeyParametersInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayManagementClientImpl.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayManager.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayNamespaceInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayUpdateParametersInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/ResourceNamespacePatchInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/TrackedResourceInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/WCFRelaysInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/WcfRelayInner.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/package-info.java delete mode 100755 azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/package-info.java delete mode 100644 azure-mgmt-scheduler/pom.xml delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/BasicAuthentication.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ClientCertAuthentication.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/DayOfWeek.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpAuthentication.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpAuthenticationType.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpRequest.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobAction.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobActionType.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionProperties.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionQuota.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionState.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobErrorAction.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobExecutionStatus.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryActionName.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryDefinitionProperties.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryFilter.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobMaxRecurrence.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrence.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrenceSchedule.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrenceScheduleMonthlyOccurrence.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobScheduleDay.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobState.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobStateFilter.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobStatus.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/OAuthAuthentication.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RecurrenceFrequency.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RetryPolicy.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RetryType.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusAuthentication.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusAuthenticationType.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusBrokeredMessageProperties.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusMessage.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusQueueMessage.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusTopicMessage.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusTransportType.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/Sku.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/SkuDefinition.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/StorageQueueMessage.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobCollectionDefinitionInner.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobCollectionsInner.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobDefinitionInner.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobHistoryDefinitionInner.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobPropertiesInner.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobsInner.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/PageImpl.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/ScheduleServiceManager.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/SchedulerManagementClientImpl.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/package-info.java delete mode 100644 azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/package-info.java delete mode 100644 azure-mgmt-servicefabric/pom.xml delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/AvailableOperationDisplay.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/AzureActiveDirectory.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/CertificateDescription.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClientCertificateCommonName.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClientCertificateThumbprint.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterHealthPolicy.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterUpgradeDeltaHealthPolicy.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterUpgradePolicy.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterVersionDetails.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/DiagnosticsStorageAccountConfig.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/EndpointRangeDescription.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModel.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModelError.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModelException.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/NodeTypeDescription.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ProvisioningState.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/SettingsParameterDescription.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/SettingsSectionDescription.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterCodeVersionsResultInner.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterInner.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterUpdateParametersInner.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterVersionsInner.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClustersInner.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/OperationResultInner.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/OperationsInner.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/PageImpl.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ServiceFabricManagementClientImpl.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ServiceFabricManager.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/package-info.java delete mode 100644 azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/package-info.java delete mode 100755 azure-mgmt-streamanalytics/pom.xml delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AvroSerialization.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceFunctionBinding.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceInputColumn.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceInputs.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceOutputColumn.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureSqlDatabaseDataSourceProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureSqlDatabaseOutputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureTableOutputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobDataSourceProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobOutputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobReferenceInputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobStreamInputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/CompatibilityLevel.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/CsvSerialization.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/DiagnosticCondition.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Diagnostics.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/DocumentDbOutputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Encoding.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ErrorResponse.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubDataSourceProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubOutputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubStreamInputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventsOutOfOrderPolicy.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionBinding.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionInput.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionOutput.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/InputProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/IoTHubStreamInputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JavaScriptFunctionBinding.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JavaScriptFunctionRetrieveDefaultDefinitionParameters.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JsonOutputSerializationFormat.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JsonSerialization.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OperationDisplay.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputErrorPolicy.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputStartMode.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ReferenceInputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ReferenceInputProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ScalarFunctionProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Serialization.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusDataSourceProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusQueueOutputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusTopicOutputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Sku.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/SkuName.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StorageAccount.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StreamInputDataSource.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StreamInputProperties.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/UdfType.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionRetrieveDefaultDefinitionParametersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsCreateOrReplaceHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsGetHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsUpdateHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsCreateOrReplaceHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsGetHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsUpdateHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OperationInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OperationsInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsCreateOrReplaceHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsGetHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsUpdateHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/PageImpl.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/ResourceTestStatusInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StartStreamingJobParametersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamAnalyticsManagementClientImpl.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamAnalyticsManager.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsCreateOrReplaceHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsGetHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsUpdateHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionQuotaInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionQuotasListResultInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionsInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsCreateOrReplaceHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsGetHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsUpdateHeadersInner.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/package-info.java delete mode 100755 azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/package-info.java diff --git a/azure-mgmt-apimanagement/pom.xml b/azure-mgmt-apimanagement/pom.xml deleted file mode 100644 index 627858c755f..00000000000 --- a/azure-mgmt-apimanagement/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-apimanagement - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for ApiManagement Management - This package contains Microsoft ApiManagement Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AccessInformationUpdateParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AccessInformationUpdateParameters.java deleted file mode 100644 index 25130930ddf..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AccessInformationUpdateParameters.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Tenant access information update parameters of the API Management service. - */ -public class AccessInformationUpdateParameters { - /** - * Tenant access information of the API Management service. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the AccessInformationUpdateParameters object itself. - */ - public AccessInformationUpdateParameters withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AdditionalLocation.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AdditionalLocation.java deleted file mode 100644 index 12cae3c43f5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AdditionalLocation.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Description of an additional API Management resource location. - */ -public class AdditionalLocation { - /** - * The location name of the additional region among Azure Data center - * regions. - */ - @JsonProperty(value = "location", required = true) - private String location; - - /** - * SKU properties of the API Management service. - */ - @JsonProperty(value = "sku", required = true) - private ApiManagementServiceSkuProperties sku; - - /** - * Static IP addresses of the location's virtual machines. - */ - @JsonProperty(value = "publicIPAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List publicIPAddresses; - - /** - * Virtual network configuration for the location. - */ - @JsonProperty(value = "virtualNetworkConfiguration") - private VirtualNetworkConfiguration virtualNetworkConfiguration; - - /** - * Gateway URL of the API Management service in the Region. - */ - @JsonProperty(value = "gatewayRegionalUrl", access = JsonProperty.Access.WRITE_ONLY) - private String gatewayRegionalUrl; - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the AdditionalLocation object itself. - */ - public AdditionalLocation withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public ApiManagementServiceSkuProperties sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the AdditionalLocation object itself. - */ - public AdditionalLocation withSku(ApiManagementServiceSkuProperties sku) { - this.sku = sku; - return this; - } - - /** - * Get the publicIPAddresses value. - * - * @return the publicIPAddresses value - */ - public List publicIPAddresses() { - return this.publicIPAddresses; - } - - /** - * Get the virtualNetworkConfiguration value. - * - * @return the virtualNetworkConfiguration value - */ - public VirtualNetworkConfiguration virtualNetworkConfiguration() { - return this.virtualNetworkConfiguration; - } - - /** - * Set the virtualNetworkConfiguration value. - * - * @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set - * @return the AdditionalLocation object itself. - */ - public AdditionalLocation withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration) { - this.virtualNetworkConfiguration = virtualNetworkConfiguration; - return this; - } - - /** - * Get the gatewayRegionalUrl value. - * - * @return the gatewayRegionalUrl value - */ - public String gatewayRegionalUrl() { - return this.gatewayRegionalUrl; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiContractProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiContractProperties.java deleted file mode 100644 index 94f1c81794c..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiContractProperties.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Api Entity Properties. - */ -public class ApiContractProperties extends ApiEntityBaseContract { - /** - * API name. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** - * Absolute URL of the backend service implementing this API. - */ - @JsonProperty(value = "serviceUrl") - private String serviceUrl; - - /** - * Relative URL uniquely identifying this API and all of its resource paths - * within the API Management service instance. It is appended to the API - * endpoint base URL specified during the service instance creation to form - * a public URL for this API. - */ - @JsonProperty(value = "path", required = true) - private String path; - - /** - * Describes on which protocols the operations in this API can be invoked. - */ - @JsonProperty(value = "protocols") - private List protocols; - - /** - * The apiVersionSet property. - */ - @JsonProperty(value = "apiVersionSet") - private ApiVersionSetContractDetails apiVersionSet; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ApiContractProperties object itself. - */ - public ApiContractProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the serviceUrl value. - * - * @return the serviceUrl value - */ - public String serviceUrl() { - return this.serviceUrl; - } - - /** - * Set the serviceUrl value. - * - * @param serviceUrl the serviceUrl value to set - * @return the ApiContractProperties object itself. - */ - public ApiContractProperties withServiceUrl(String serviceUrl) { - this.serviceUrl = serviceUrl; - return this; - } - - /** - * Get the path value. - * - * @return the path value - */ - public String path() { - return this.path; - } - - /** - * Set the path value. - * - * @param path the path value to set - * @return the ApiContractProperties object itself. - */ - public ApiContractProperties withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the protocols value. - * - * @return the protocols value - */ - public List protocols() { - return this.protocols; - } - - /** - * Set the protocols value. - * - * @param protocols the protocols value to set - * @return the ApiContractProperties object itself. - */ - public ApiContractProperties withProtocols(List protocols) { - this.protocols = protocols; - return this; - } - - /** - * Get the apiVersionSet value. - * - * @return the apiVersionSet value - */ - public ApiVersionSetContractDetails apiVersionSet() { - return this.apiVersionSet; - } - - /** - * Set the apiVersionSet value. - * - * @param apiVersionSet the apiVersionSet value to set - * @return the ApiContractProperties object itself. - */ - public ApiContractProperties withApiVersionSet(ApiVersionSetContractDetails apiVersionSet) { - this.apiVersionSet = apiVersionSet; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiCreateOrUpdatePropertiesWsdlSelector.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiCreateOrUpdatePropertiesWsdlSelector.java deleted file mode 100644 index c70fb3fa9b5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiCreateOrUpdatePropertiesWsdlSelector.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Criteria to limit import of WSDL to a subset of the document. - */ -public class ApiCreateOrUpdatePropertiesWsdlSelector { - /** - * Name of service to import from WSDL. - */ - @JsonProperty(value = "wsdlServiceName") - private String wsdlServiceName; - - /** - * Name of endpoint(port) to import from WSDL. - */ - @JsonProperty(value = "wsdlEndpointName") - private String wsdlEndpointName; - - /** - * Get the wsdlServiceName value. - * - * @return the wsdlServiceName value - */ - public String wsdlServiceName() { - return this.wsdlServiceName; - } - - /** - * Set the wsdlServiceName value. - * - * @param wsdlServiceName the wsdlServiceName value to set - * @return the ApiCreateOrUpdatePropertiesWsdlSelector object itself. - */ - public ApiCreateOrUpdatePropertiesWsdlSelector withWsdlServiceName(String wsdlServiceName) { - this.wsdlServiceName = wsdlServiceName; - return this; - } - - /** - * Get the wsdlEndpointName value. - * - * @return the wsdlEndpointName value - */ - public String wsdlEndpointName() { - return this.wsdlEndpointName; - } - - /** - * Set the wsdlEndpointName value. - * - * @param wsdlEndpointName the wsdlEndpointName value to set - * @return the ApiCreateOrUpdatePropertiesWsdlSelector object itself. - */ - public ApiCreateOrUpdatePropertiesWsdlSelector withWsdlEndpointName(String wsdlEndpointName) { - this.wsdlEndpointName = wsdlEndpointName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiEntityBaseContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiEntityBaseContract.java deleted file mode 100644 index 62f5f38c2b5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiEntityBaseContract.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * API base contract details. - */ -public class ApiEntityBaseContract { - /** - * Description of the API. May include HTML formatting tags. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Collection of authentication settings included into this API. - */ - @JsonProperty(value = "authenticationSettings") - private AuthenticationSettingsContract authenticationSettings; - - /** - * Protocols over which API is made available. - */ - @JsonProperty(value = "subscriptionKeyParameterNames") - private SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames; - - /** - * Type of API. Possible values include: 'http', 'soap'. - */ - @JsonProperty(value = "type") - private ApiType apiType; - - /** - * Describes the Revision of the Api. If no value is provided, default - * revision 1 is created. - */ - @JsonProperty(value = "apiRevision") - private String apiRevision; - - /** - * Indicates the Version identifier of the API if the API is versioned. - */ - @JsonProperty(value = "apiVersion") - private String apiVersion; - - /** - * Indicates if API revision is current api revision. - */ - @JsonProperty(value = "isCurrent", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCurrent; - - /** - * Indicates if API revision is accessible via the gateway. - */ - @JsonProperty(value = "isOnline", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isOnline; - - /** - * A resource identifier for the related ApiVersionSet. - */ - @JsonProperty(value = "apiVersionSetId") - private String apiVersionSetId; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ApiEntityBaseContract object itself. - */ - public ApiEntityBaseContract withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the authenticationSettings value. - * - * @return the authenticationSettings value - */ - public AuthenticationSettingsContract authenticationSettings() { - return this.authenticationSettings; - } - - /** - * Set the authenticationSettings value. - * - * @param authenticationSettings the authenticationSettings value to set - * @return the ApiEntityBaseContract object itself. - */ - public ApiEntityBaseContract withAuthenticationSettings(AuthenticationSettingsContract authenticationSettings) { - this.authenticationSettings = authenticationSettings; - return this; - } - - /** - * Get the subscriptionKeyParameterNames value. - * - * @return the subscriptionKeyParameterNames value - */ - public SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames() { - return this.subscriptionKeyParameterNames; - } - - /** - * Set the subscriptionKeyParameterNames value. - * - * @param subscriptionKeyParameterNames the subscriptionKeyParameterNames value to set - * @return the ApiEntityBaseContract object itself. - */ - public ApiEntityBaseContract withSubscriptionKeyParameterNames(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) { - this.subscriptionKeyParameterNames = subscriptionKeyParameterNames; - return this; - } - - /** - * Get the apiType value. - * - * @return the apiType value - */ - public ApiType apiType() { - return this.apiType; - } - - /** - * Set the apiType value. - * - * @param apiType the apiType value to set - * @return the ApiEntityBaseContract object itself. - */ - public ApiEntityBaseContract withApiType(ApiType apiType) { - this.apiType = apiType; - return this; - } - - /** - * Get the apiRevision value. - * - * @return the apiRevision value - */ - public String apiRevision() { - return this.apiRevision; - } - - /** - * Set the apiRevision value. - * - * @param apiRevision the apiRevision value to set - * @return the ApiEntityBaseContract object itself. - */ - public ApiEntityBaseContract withApiRevision(String apiRevision) { - this.apiRevision = apiRevision; - return this; - } - - /** - * Get the apiVersion value. - * - * @return the apiVersion value - */ - public String apiVersion() { - return this.apiVersion; - } - - /** - * Set the apiVersion value. - * - * @param apiVersion the apiVersion value to set - * @return the ApiEntityBaseContract object itself. - */ - public ApiEntityBaseContract withApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - return this; - } - - /** - * Get the isCurrent value. - * - * @return the isCurrent value - */ - public Boolean isCurrent() { - return this.isCurrent; - } - - /** - * Get the isOnline value. - * - * @return the isOnline value - */ - public Boolean isOnline() { - return this.isOnline; - } - - /** - * Get the apiVersionSetId value. - * - * @return the apiVersionSetId value - */ - public String apiVersionSetId() { - return this.apiVersionSetId; - } - - /** - * Set the apiVersionSetId value. - * - * @param apiVersionSetId the apiVersionSetId value to set - * @return the ApiEntityBaseContract object itself. - */ - public ApiEntityBaseContract withApiVersionSetId(String apiVersionSetId) { - this.apiVersionSetId = apiVersionSetId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceApplyNetworkConfigurationParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceApplyNetworkConfigurationParameters.java deleted file mode 100644 index 7239e34a466..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceApplyNetworkConfigurationParameters.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameter supplied to the Apply Network configuration operation. - */ -public class ApiManagementServiceApplyNetworkConfigurationParameters { - /** - * Location of the Api Management service to update for a multi-region - * service. For a service deployed in a single region, this parameter is - * not required. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the ApiManagementServiceApplyNetworkConfigurationParameters object itself. - */ - public ApiManagementServiceApplyNetworkConfigurationParameters withLocation(String location) { - this.location = location; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceBaseProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceBaseProperties.java deleted file mode 100644 index a0804c29a88..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceBaseProperties.java +++ /dev/null @@ -1,374 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import org.joda.time.DateTime; -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Base Properties of an API Management service resource description. - */ -public class ApiManagementServiceBaseProperties { - /** - * Email address from which the notification will be sent. - */ - @JsonProperty(value = "notificationSenderEmail") - private String notificationSenderEmail; - - /** - * The current provisioning state of the API Management service which can - * be one of the following: - * Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The provisioning state of the API Management service, which is targeted - * by the long running operation started on the service. - */ - @JsonProperty(value = "targetProvisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String targetProvisioningState; - - /** - * Creation UTC date of the API Management service.The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "createdAtUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdAtUtc; - - /** - * Gateway URL of the API Management service. - */ - @JsonProperty(value = "gatewayUrl", access = JsonProperty.Access.WRITE_ONLY) - private String gatewayUrl; - - /** - * Gateway URL of the API Management service in the Default Region. - */ - @JsonProperty(value = "gatewayRegionalUrl", access = JsonProperty.Access.WRITE_ONLY) - private String gatewayRegionalUrl; - - /** - * Publisher portal endpoint Url of the API Management service. - */ - @JsonProperty(value = "portalUrl", access = JsonProperty.Access.WRITE_ONLY) - private String portalUrl; - - /** - * Management API endpoint URL of the API Management service. - */ - @JsonProperty(value = "managementApiUrl", access = JsonProperty.Access.WRITE_ONLY) - private String managementApiUrl; - - /** - * SCM endpoint URL of the API Management service. - */ - @JsonProperty(value = "scmUrl", access = JsonProperty.Access.WRITE_ONLY) - private String scmUrl; - - /** - * Custom hostname configuration of the API Management service. - */ - @JsonProperty(value = "hostnameConfigurations") - private List hostnameConfigurations; - - /** - * Public Static Load Balanced IP addresses of the API Management service. - * Available only for Basic, Standard and Premium SKU. - */ - @JsonProperty(value = "publicIPAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List publicIPAddresses; - - /** - * Private Static Load Balanced IP addresses of the API Management service - * which is deployed in an Internal Virtual Network. Available only for - * Basic, Standard and Premium SKU. - */ - @JsonProperty(value = "privateIPAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List privateIPAddresses; - - /** - * Virtual network configuration of the API Management service. - */ - @JsonProperty(value = "virtualNetworkConfiguration") - private VirtualNetworkConfiguration virtualNetworkConfiguration; - - /** - * Additional datacenter locations of the API Management service. - */ - @JsonProperty(value = "additionalLocations") - private List additionalLocations; - - /** - * Custom properties of the API Management service. Setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - * will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, - * 1.1 and 1.2). Setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - * can be used to disable just TLS 1.1 and setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - * can be used to disable TLS 1.0 on an API Management service. - */ - @JsonProperty(value = "customProperties") - private Map customProperties; - - /** - * List of Certificates that need to be installed in the API Management - * service. Max supported certificates that can be installed is 10. - */ - @JsonProperty(value = "certificates") - private List certificates; - - /** - * The type of VPN in which API Managemet service needs to be configured - * in. None (Default Value) means the API Management service is not part of - * any Virtual Network, External means the API Management deployment is set - * up inside a Virtual Network having an Internet Facing Endpoint, and - * Internal means that API Management deployment is setup inside a Virtual - * Network having an Intranet Facing Endpoint only. Possible values - * include: 'None', 'External', 'Internal'. - */ - @JsonProperty(value = "virtualNetworkType") - private VirtualNetworkType virtualNetworkType; - - /** - * Get the notificationSenderEmail value. - * - * @return the notificationSenderEmail value - */ - public String notificationSenderEmail() { - return this.notificationSenderEmail; - } - - /** - * Set the notificationSenderEmail value. - * - * @param notificationSenderEmail the notificationSenderEmail value to set - * @return the ApiManagementServiceBaseProperties object itself. - */ - public ApiManagementServiceBaseProperties withNotificationSenderEmail(String notificationSenderEmail) { - this.notificationSenderEmail = notificationSenderEmail; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the targetProvisioningState value. - * - * @return the targetProvisioningState value - */ - public String targetProvisioningState() { - return this.targetProvisioningState; - } - - /** - * Get the createdAtUtc value. - * - * @return the createdAtUtc value - */ - public DateTime createdAtUtc() { - return this.createdAtUtc; - } - - /** - * Get the gatewayUrl value. - * - * @return the gatewayUrl value - */ - public String gatewayUrl() { - return this.gatewayUrl; - } - - /** - * Get the gatewayRegionalUrl value. - * - * @return the gatewayRegionalUrl value - */ - public String gatewayRegionalUrl() { - return this.gatewayRegionalUrl; - } - - /** - * Get the portalUrl value. - * - * @return the portalUrl value - */ - public String portalUrl() { - return this.portalUrl; - } - - /** - * Get the managementApiUrl value. - * - * @return the managementApiUrl value - */ - public String managementApiUrl() { - return this.managementApiUrl; - } - - /** - * Get the scmUrl value. - * - * @return the scmUrl value - */ - public String scmUrl() { - return this.scmUrl; - } - - /** - * Get the hostnameConfigurations value. - * - * @return the hostnameConfigurations value - */ - public List hostnameConfigurations() { - return this.hostnameConfigurations; - } - - /** - * Set the hostnameConfigurations value. - * - * @param hostnameConfigurations the hostnameConfigurations value to set - * @return the ApiManagementServiceBaseProperties object itself. - */ - public ApiManagementServiceBaseProperties withHostnameConfigurations(List hostnameConfigurations) { - this.hostnameConfigurations = hostnameConfigurations; - return this; - } - - /** - * Get the publicIPAddresses value. - * - * @return the publicIPAddresses value - */ - public List publicIPAddresses() { - return this.publicIPAddresses; - } - - /** - * Get the privateIPAddresses value. - * - * @return the privateIPAddresses value - */ - public List privateIPAddresses() { - return this.privateIPAddresses; - } - - /** - * Get the virtualNetworkConfiguration value. - * - * @return the virtualNetworkConfiguration value - */ - public VirtualNetworkConfiguration virtualNetworkConfiguration() { - return this.virtualNetworkConfiguration; - } - - /** - * Set the virtualNetworkConfiguration value. - * - * @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set - * @return the ApiManagementServiceBaseProperties object itself. - */ - public ApiManagementServiceBaseProperties withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration) { - this.virtualNetworkConfiguration = virtualNetworkConfiguration; - return this; - } - - /** - * Get the additionalLocations value. - * - * @return the additionalLocations value - */ - public List additionalLocations() { - return this.additionalLocations; - } - - /** - * Set the additionalLocations value. - * - * @param additionalLocations the additionalLocations value to set - * @return the ApiManagementServiceBaseProperties object itself. - */ - public ApiManagementServiceBaseProperties withAdditionalLocations(List additionalLocations) { - this.additionalLocations = additionalLocations; - return this; - } - - /** - * Get the customProperties value. - * - * @return the customProperties value - */ - public Map customProperties() { - return this.customProperties; - } - - /** - * Set the customProperties value. - * - * @param customProperties the customProperties value to set - * @return the ApiManagementServiceBaseProperties object itself. - */ - public ApiManagementServiceBaseProperties withCustomProperties(Map customProperties) { - this.customProperties = customProperties; - return this; - } - - /** - * Get the certificates value. - * - * @return the certificates value - */ - public List certificates() { - return this.certificates; - } - - /** - * Set the certificates value. - * - * @param certificates the certificates value to set - * @return the ApiManagementServiceBaseProperties object itself. - */ - public ApiManagementServiceBaseProperties withCertificates(List certificates) { - this.certificates = certificates; - return this; - } - - /** - * Get the virtualNetworkType value. - * - * @return the virtualNetworkType value - */ - public VirtualNetworkType virtualNetworkType() { - return this.virtualNetworkType; - } - - /** - * Set the virtualNetworkType value. - * - * @param virtualNetworkType the virtualNetworkType value to set - * @return the ApiManagementServiceBaseProperties object itself. - */ - public ApiManagementServiceBaseProperties withVirtualNetworkType(VirtualNetworkType virtualNetworkType) { - this.virtualNetworkType = virtualNetworkType; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceCheckNameAvailabilityParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceCheckNameAvailabilityParameters.java deleted file mode 100644 index e440e64280d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceCheckNameAvailabilityParameters.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the CheckNameAvailability operation. - */ -public class ApiManagementServiceCheckNameAvailabilityParameters { - /** - * The name to check for availability. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ApiManagementServiceCheckNameAvailabilityParameters object itself. - */ - public ApiManagementServiceCheckNameAvailabilityParameters withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceIdentity.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceIdentity.java deleted file mode 100644 index 863c320da71..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceIdentity.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.UUID; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Identity properties of the Api Management service resource. - */ -public class ApiManagementServiceIdentity { - /** - * The identity type. Currently the only supported type is - * 'SystemAssigned'. - */ - @JsonProperty(value = "type", required = true) - private String type; - - /** - * The principal id of the identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private UUID principalId; - - /** - * The client tenant id of the identity. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private UUID tenantId; - - /** - * Creates an instance of ApiManagementServiceIdentity class. - */ - public ApiManagementServiceIdentity() { - type = "SystemAssigned"; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ApiManagementServiceIdentity object itself. - */ - public ApiManagementServiceIdentity withType(String type) { - this.type = type; - return this; - } - - /** - * Get the principalId value. - * - * @return the principalId value - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public UUID tenantId() { - return this.tenantId; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceSkuProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceSkuProperties.java deleted file mode 100644 index 62d7b03fa63..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiManagementServiceSkuProperties.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * API Management service resource SKU properties. - */ -public class ApiManagementServiceSkuProperties { - /** - * Name of the Sku. Possible values include: 'Developer', 'Standard', - * 'Premium', 'Basic'. - */ - @JsonProperty(value = "name", required = true) - private SkuType name; - - /** - * Capacity of the SKU (number of deployed units of the SKU). The default - * value is 1. - */ - @JsonProperty(value = "capacity") - private Integer capacity; - - /** - * Get the name value. - * - * @return the name value - */ - public SkuType name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ApiManagementServiceSkuProperties object itself. - */ - public ApiManagementServiceSkuProperties withName(SkuType name) { - this.name = name; - return this; - } - - /** - * Get the capacity value. - * - * @return the capacity value - */ - public Integer capacity() { - return this.capacity; - } - - /** - * Set the capacity value. - * - * @param capacity the capacity value to set - * @return the ApiManagementServiceSkuProperties object itself. - */ - public ApiManagementServiceSkuProperties withCapacity(Integer capacity) { - this.capacity = capacity; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiRevisionInfoContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiRevisionInfoContract.java deleted file mode 100644 index 6bc5faab939..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiRevisionInfoContract.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Object used to create an API Revision or Version based on an existing API - * Revision. - */ -public class ApiRevisionInfoContract { - /** - * Resource identifier of API to be used to create the revision from. - */ - @JsonProperty(value = "sourceApiId") - private String sourceApiId; - - /** - * Version identifier for the new API Version. - */ - @JsonProperty(value = "apiVersionName") - private String apiVersionName; - - /** - * Description of new API Revision. - */ - @JsonProperty(value = "apiRevisionDescription") - private String apiRevisionDescription; - - /** - * Version set details. - */ - @JsonProperty(value = "apiVersionSet") - private ApiVersionSetContractDetails apiVersionSet; - - /** - * Get the sourceApiId value. - * - * @return the sourceApiId value - */ - public String sourceApiId() { - return this.sourceApiId; - } - - /** - * Set the sourceApiId value. - * - * @param sourceApiId the sourceApiId value to set - * @return the ApiRevisionInfoContract object itself. - */ - public ApiRevisionInfoContract withSourceApiId(String sourceApiId) { - this.sourceApiId = sourceApiId; - return this; - } - - /** - * Get the apiVersionName value. - * - * @return the apiVersionName value - */ - public String apiVersionName() { - return this.apiVersionName; - } - - /** - * Set the apiVersionName value. - * - * @param apiVersionName the apiVersionName value to set - * @return the ApiRevisionInfoContract object itself. - */ - public ApiRevisionInfoContract withApiVersionName(String apiVersionName) { - this.apiVersionName = apiVersionName; - return this; - } - - /** - * Get the apiRevisionDescription value. - * - * @return the apiRevisionDescription value - */ - public String apiRevisionDescription() { - return this.apiRevisionDescription; - } - - /** - * Set the apiRevisionDescription value. - * - * @param apiRevisionDescription the apiRevisionDescription value to set - * @return the ApiRevisionInfoContract object itself. - */ - public ApiRevisionInfoContract withApiRevisionDescription(String apiRevisionDescription) { - this.apiRevisionDescription = apiRevisionDescription; - return this; - } - - /** - * Get the apiVersionSet value. - * - * @return the apiVersionSet value - */ - public ApiVersionSetContractDetails apiVersionSet() { - return this.apiVersionSet; - } - - /** - * Set the apiVersionSet value. - * - * @param apiVersionSet the apiVersionSet value to set - * @return the ApiRevisionInfoContract object itself. - */ - public ApiRevisionInfoContract withApiVersionSet(ApiVersionSetContractDetails apiVersionSet) { - this.apiVersionSet = apiVersionSet; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiTagResourceContractProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiTagResourceContractProperties.java deleted file mode 100644 index 6d0c9f5db54..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiTagResourceContractProperties.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * API contract properties for the Tag Resources. - */ -public class ApiTagResourceContractProperties extends ApiEntityBaseContract { - /** - * API identifier in the form /apis/{apiId}. - */ - @JsonProperty(value = "id") - private String id; - - /** - * API name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Absolute URL of the backend service implementing this API. - */ - @JsonProperty(value = "serviceUrl") - private String serviceUrl; - - /** - * Relative URL uniquely identifying this API and all of its resource paths - * within the API Management service instance. It is appended to the API - * endpoint base URL specified during the service instance creation to form - * a public URL for this API. - */ - @JsonProperty(value = "path") - private String path; - - /** - * Describes on which protocols the operations in this API can be invoked. - */ - @JsonProperty(value = "protocols") - private List protocols; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the ApiTagResourceContractProperties object itself. - */ - public ApiTagResourceContractProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ApiTagResourceContractProperties object itself. - */ - public ApiTagResourceContractProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the serviceUrl value. - * - * @return the serviceUrl value - */ - public String serviceUrl() { - return this.serviceUrl; - } - - /** - * Set the serviceUrl value. - * - * @param serviceUrl the serviceUrl value to set - * @return the ApiTagResourceContractProperties object itself. - */ - public ApiTagResourceContractProperties withServiceUrl(String serviceUrl) { - this.serviceUrl = serviceUrl; - return this; - } - - /** - * Get the path value. - * - * @return the path value - */ - public String path() { - return this.path; - } - - /** - * Set the path value. - * - * @param path the path value to set - * @return the ApiTagResourceContractProperties object itself. - */ - public ApiTagResourceContractProperties withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the protocols value. - * - * @return the protocols value - */ - public List protocols() { - return this.protocols; - } - - /** - * Set the protocols value. - * - * @param protocols the protocols value to set - * @return the ApiTagResourceContractProperties object itself. - */ - public ApiTagResourceContractProperties withProtocols(List protocols) { - this.protocols = protocols; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiType.java deleted file mode 100644 index c3406c154d6..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiType.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ApiType. - */ -public final class ApiType extends ExpandableStringEnum { - /** Static value http for ApiType. */ - public static final ApiType HTTP = fromString("http"); - - /** Static value soap for ApiType. */ - public static final ApiType SOAP = fromString("soap"); - - /** - * Creates or finds a ApiType from its string representation. - * @param name a name to look for - * @return the corresponding ApiType - */ - @JsonCreator - public static ApiType fromString(String name) { - return fromString(name, ApiType.class); - } - - /** - * @return known ApiType values - */ - public static Collection values() { - return values(ApiType.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiVersionSetContractDetails.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiVersionSetContractDetails.java deleted file mode 100644 index 2c3a23d57c4..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiVersionSetContractDetails.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * An API Version Set contains the common configuration for a set of API - * Versions relating. - */ -public class ApiVersionSetContractDetails { - /** - * Identifier for existing API Version Set. Omit this value to create a new - * Version Set. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Description of API Version Set. - */ - @JsonProperty(value = "description") - private String description; - - /** - * An value that determines where the API Version identifer will be located - * in a HTTP request. Possible values include: 'Segment', 'Query', - * 'Header'. - */ - @JsonProperty(value = "versioningScheme") - private String versioningScheme; - - /** - * Name of query parameter that indicates the API Version if - * versioningScheme is set to `query`. - */ - @JsonProperty(value = "versionQueryName") - private String versionQueryName; - - /** - * Name of HTTP header parameter that indicates the API Version if - * versioningScheme is set to `header`. - */ - @JsonProperty(value = "versionHeaderName") - private String versionHeaderName; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the ApiVersionSetContractDetails object itself. - */ - public ApiVersionSetContractDetails withId(String id) { - this.id = id; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ApiVersionSetContractDetails object itself. - */ - public ApiVersionSetContractDetails withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the versioningScheme value. - * - * @return the versioningScheme value - */ - public String versioningScheme() { - return this.versioningScheme; - } - - /** - * Set the versioningScheme value. - * - * @param versioningScheme the versioningScheme value to set - * @return the ApiVersionSetContractDetails object itself. - */ - public ApiVersionSetContractDetails withVersioningScheme(String versioningScheme) { - this.versioningScheme = versioningScheme; - return this; - } - - /** - * Get the versionQueryName value. - * - * @return the versionQueryName value - */ - public String versionQueryName() { - return this.versionQueryName; - } - - /** - * Set the versionQueryName value. - * - * @param versionQueryName the versionQueryName value to set - * @return the ApiVersionSetContractDetails object itself. - */ - public ApiVersionSetContractDetails withVersionQueryName(String versionQueryName) { - this.versionQueryName = versionQueryName; - return this; - } - - /** - * Get the versionHeaderName value. - * - * @return the versionHeaderName value - */ - public String versionHeaderName() { - return this.versionHeaderName; - } - - /** - * Set the versionHeaderName value. - * - * @param versionHeaderName the versionHeaderName value to set - * @return the ApiVersionSetContractDetails object itself. - */ - public ApiVersionSetContractDetails withVersionHeaderName(String versionHeaderName) { - this.versionHeaderName = versionHeaderName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiVersionSetEntityBase.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiVersionSetEntityBase.java deleted file mode 100644 index 040c618bfe8..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApiVersionSetEntityBase.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Api Version set base parameters. - */ -public class ApiVersionSetEntityBase { - /** - * Description of API Version Set. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Name of query parameter that indicates the API Version if - * versioningScheme is set to `query`. - */ - @JsonProperty(value = "versionQueryName") - private String versionQueryName; - - /** - * Name of HTTP header parameter that indicates the API Version if - * versioningScheme is set to `header`. - */ - @JsonProperty(value = "versionHeaderName") - private String versionHeaderName; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ApiVersionSetEntityBase object itself. - */ - public ApiVersionSetEntityBase withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the versionQueryName value. - * - * @return the versionQueryName value - */ - public String versionQueryName() { - return this.versionQueryName; - } - - /** - * Set the versionQueryName value. - * - * @param versionQueryName the versionQueryName value to set - * @return the ApiVersionSetEntityBase object itself. - */ - public ApiVersionSetEntityBase withVersionQueryName(String versionQueryName) { - this.versionQueryName = versionQueryName; - return this; - } - - /** - * Get the versionHeaderName value. - * - * @return the versionHeaderName value - */ - public String versionHeaderName() { - return this.versionHeaderName; - } - - /** - * Set the versionHeaderName value. - * - * @param versionHeaderName the versionHeaderName value to set - * @return the ApiVersionSetEntityBase object itself. - */ - public ApiVersionSetEntityBase withVersionHeaderName(String versionHeaderName) { - this.versionHeaderName = versionHeaderName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApimResource.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApimResource.java deleted file mode 100644 index 1cabba6597c..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ApimResource.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Resource definition. - */ -public class ApimResource { - /** - * Resource ID. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Resource name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Resource type for API Management resource is set to - * Microsoft.ApiManagement. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the ApimResource object itself. - */ - public ApimResource withTags(Map tags) { - this.tags = tags; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AsyncOperationStatus.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AsyncOperationStatus.java deleted file mode 100644 index 377db324622..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AsyncOperationStatus.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AsyncOperationStatus. - */ -public enum AsyncOperationStatus { - /** Enum value Started. */ - STARTED("Started"), - - /** Enum value InProgress. */ - IN_PROGRESS("InProgress"), - - /** Enum value Succeeded. */ - SUCCEEDED("Succeeded"), - - /** Enum value Failed. */ - FAILED("Failed"); - - /** The actual serialized value for a AsyncOperationStatus instance. */ - private String value; - - AsyncOperationStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AsyncOperationStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed AsyncOperationStatus object, or null if unable to parse. - */ - @JsonCreator - public static AsyncOperationStatus fromString(String value) { - AsyncOperationStatus[] items = AsyncOperationStatus.values(); - for (AsyncOperationStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthenticationSettingsContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthenticationSettingsContract.java deleted file mode 100644 index fe6843cf232..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthenticationSettingsContract.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * API Authentication Settings. - */ -public class AuthenticationSettingsContract { - /** - * OAuth2 Authentication settings. - */ - @JsonProperty(value = "oAuth2") - private OAuth2AuthenticationSettingsContract oAuth2; - - /** - * Get the oAuth2 value. - * - * @return the oAuth2 value - */ - public OAuth2AuthenticationSettingsContract oAuth2() { - return this.oAuth2; - } - - /** - * Set the oAuth2 value. - * - * @param oAuth2 the oAuth2 value to set - * @return the AuthenticationSettingsContract object itself. - */ - public AuthenticationSettingsContract withOAuth2(OAuth2AuthenticationSettingsContract oAuth2) { - this.oAuth2 = oAuth2; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthorizationMethod.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthorizationMethod.java deleted file mode 100644 index 51f2ebd5dc4..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthorizationMethod.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AuthorizationMethod. - */ -public enum AuthorizationMethod { - /** Enum value HEAD. */ - HEAD("HEAD"), - - /** Enum value OPTIONS. */ - OPTIONS("OPTIONS"), - - /** Enum value TRACE. */ - TRACE("TRACE"), - - /** Enum value GET. */ - GET("GET"), - - /** Enum value POST. */ - POST("POST"), - - /** Enum value PUT. */ - PUT("PUT"), - - /** Enum value PATCH. */ - PATCH("PATCH"), - - /** Enum value DELETE. */ - DELETE("DELETE"); - - /** The actual serialized value for a AuthorizationMethod instance. */ - private String value; - - AuthorizationMethod(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AuthorizationMethod instance. - * - * @param value the serialized value to parse. - * @return the parsed AuthorizationMethod object, or null if unable to parse. - */ - @JsonCreator - public static AuthorizationMethod fromString(String value) { - AuthorizationMethod[] items = AuthorizationMethod.values(); - for (AuthorizationMethod item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthorizationServerContractBaseProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthorizationServerContractBaseProperties.java deleted file mode 100644 index 7e6508bf192..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/AuthorizationServerContractBaseProperties.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * External OAuth authorization server Update settings contract. - */ -public class AuthorizationServerContractBaseProperties { - /** - * Description of the authorization server. Can contain HTML formatting - * tags. - */ - @JsonProperty(value = "description") - private String description; - - /** - * HTTP verbs supported by the authorization endpoint. GET must be always - * present. POST is optional. - */ - @JsonProperty(value = "authorizationMethods") - private List authorizationMethods; - - /** - * Method of authentication supported by the token endpoint of this - * authorization server. Possible values are Basic and/or Body. When Body - * is specified, client credentials and other parameters are passed within - * the request body in the application/x-www-form-urlencoded format. - */ - @JsonProperty(value = "clientAuthenticationMethod") - private List clientAuthenticationMethod; - - /** - * Additional parameters required by the token endpoint of this - * authorization server represented as an array of JSON objects with name - * and value string properties, i.e. {"name" : "name value", "value": "a - * value"}. - */ - @JsonProperty(value = "tokenBodyParameters") - private List tokenBodyParameters; - - /** - * OAuth token endpoint. Contains absolute URI to entity being referenced. - */ - @JsonProperty(value = "tokenEndpoint") - private String tokenEndpoint; - - /** - * If true, authorization server will include state parameter from the - * authorization request to its response. Client may use state parameter to - * raise protocol security. - */ - @JsonProperty(value = "supportState") - private Boolean supportState; - - /** - * Access token scope that is going to be requested by default. Can be - * overridden at the API level. Should be provided in the form of a string - * containing space-delimited values. - */ - @JsonProperty(value = "defaultScope") - private String defaultScope; - - /** - * Specifies the mechanism by which access token is passed to the API. - */ - @JsonProperty(value = "bearerTokenSendingMethods") - private List bearerTokenSendingMethods; - - /** - * Client or app secret registered with this authorization server. - */ - @JsonProperty(value = "clientSecret") - private String clientSecret; - - /** - * Can be optionally specified when resource owner password grant type is - * supported by this authorization server. Default resource owner username. - */ - @JsonProperty(value = "resourceOwnerUsername") - private String resourceOwnerUsername; - - /** - * Can be optionally specified when resource owner password grant type is - * supported by this authorization server. Default resource owner password. - */ - @JsonProperty(value = "resourceOwnerPassword") - private String resourceOwnerPassword; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the authorizationMethods value. - * - * @return the authorizationMethods value - */ - public List authorizationMethods() { - return this.authorizationMethods; - } - - /** - * Set the authorizationMethods value. - * - * @param authorizationMethods the authorizationMethods value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withAuthorizationMethods(List authorizationMethods) { - this.authorizationMethods = authorizationMethods; - return this; - } - - /** - * Get the clientAuthenticationMethod value. - * - * @return the clientAuthenticationMethod value - */ - public List clientAuthenticationMethod() { - return this.clientAuthenticationMethod; - } - - /** - * Set the clientAuthenticationMethod value. - * - * @param clientAuthenticationMethod the clientAuthenticationMethod value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withClientAuthenticationMethod(List clientAuthenticationMethod) { - this.clientAuthenticationMethod = clientAuthenticationMethod; - return this; - } - - /** - * Get the tokenBodyParameters value. - * - * @return the tokenBodyParameters value - */ - public List tokenBodyParameters() { - return this.tokenBodyParameters; - } - - /** - * Set the tokenBodyParameters value. - * - * @param tokenBodyParameters the tokenBodyParameters value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withTokenBodyParameters(List tokenBodyParameters) { - this.tokenBodyParameters = tokenBodyParameters; - return this; - } - - /** - * Get the tokenEndpoint value. - * - * @return the tokenEndpoint value - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * Set the tokenEndpoint value. - * - * @param tokenEndpoint the tokenEndpoint value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withTokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - return this; - } - - /** - * Get the supportState value. - * - * @return the supportState value - */ - public Boolean supportState() { - return this.supportState; - } - - /** - * Set the supportState value. - * - * @param supportState the supportState value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withSupportState(Boolean supportState) { - this.supportState = supportState; - return this; - } - - /** - * Get the defaultScope value. - * - * @return the defaultScope value - */ - public String defaultScope() { - return this.defaultScope; - } - - /** - * Set the defaultScope value. - * - * @param defaultScope the defaultScope value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withDefaultScope(String defaultScope) { - this.defaultScope = defaultScope; - return this; - } - - /** - * Get the bearerTokenSendingMethods value. - * - * @return the bearerTokenSendingMethods value - */ - public List bearerTokenSendingMethods() { - return this.bearerTokenSendingMethods; - } - - /** - * Set the bearerTokenSendingMethods value. - * - * @param bearerTokenSendingMethods the bearerTokenSendingMethods value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withBearerTokenSendingMethods(List bearerTokenSendingMethods) { - this.bearerTokenSendingMethods = bearerTokenSendingMethods; - return this; - } - - /** - * Get the clientSecret value. - * - * @return the clientSecret value - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret value. - * - * @param clientSecret the clientSecret value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the resourceOwnerUsername value. - * - * @return the resourceOwnerUsername value - */ - public String resourceOwnerUsername() { - return this.resourceOwnerUsername; - } - - /** - * Set the resourceOwnerUsername value. - * - * @param resourceOwnerUsername the resourceOwnerUsername value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withResourceOwnerUsername(String resourceOwnerUsername) { - this.resourceOwnerUsername = resourceOwnerUsername; - return this; - } - - /** - * Get the resourceOwnerPassword value. - * - * @return the resourceOwnerPassword value - */ - public String resourceOwnerPassword() { - return this.resourceOwnerPassword; - } - - /** - * Set the resourceOwnerPassword value. - * - * @param resourceOwnerPassword the resourceOwnerPassword value to set - * @return the AuthorizationServerContractBaseProperties object itself. - */ - public AuthorizationServerContractBaseProperties withResourceOwnerPassword(String resourceOwnerPassword) { - this.resourceOwnerPassword = resourceOwnerPassword; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendAuthorizationHeaderCredentials.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendAuthorizationHeaderCredentials.java deleted file mode 100644 index 193d4003434..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendAuthorizationHeaderCredentials.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Authorization header information. - */ -public class BackendAuthorizationHeaderCredentials { - /** - * Authentication Scheme name. - */ - @JsonProperty(value = "scheme", required = true) - private String scheme; - - /** - * Authentication Parameter value. - */ - @JsonProperty(value = "parameter", required = true) - private String parameter; - - /** - * Get the scheme value. - * - * @return the scheme value - */ - public String scheme() { - return this.scheme; - } - - /** - * Set the scheme value. - * - * @param scheme the scheme value to set - * @return the BackendAuthorizationHeaderCredentials object itself. - */ - public BackendAuthorizationHeaderCredentials withScheme(String scheme) { - this.scheme = scheme; - return this; - } - - /** - * Get the parameter value. - * - * @return the parameter value - */ - public String parameter() { - return this.parameter; - } - - /** - * Set the parameter value. - * - * @param parameter the parameter value to set - * @return the BackendAuthorizationHeaderCredentials object itself. - */ - public BackendAuthorizationHeaderCredentials withParameter(String parameter) { - this.parameter = parameter; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendBaseParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendBaseParameters.java deleted file mode 100644 index c4ca55069d3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendBaseParameters.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Backend entity base Parameter set. - */ -public class BackendBaseParameters { - /** - * Backend Title. - */ - @JsonProperty(value = "title") - private String title; - - /** - * Backend Description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Management Uri of the Resource in External System. This url can be the - * Arm Resource Id of Logic Apps, Function Apps or Api Apps. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * Backend Properties contract. - */ - @JsonProperty(value = "properties") - private BackendProperties properties; - - /** - * Backend Credentials Contract Properties. - */ - @JsonProperty(value = "credentials") - private BackendCredentialsContract credentials; - - /** - * Backend Proxy Contract Properties. - */ - @JsonProperty(value = "proxy") - private BackendProxyContract proxy; - - /** - * Backend TLS Properties. - */ - @JsonProperty(value = "tls") - private BackendTlsProperties tls; - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the BackendBaseParameters object itself. - */ - public BackendBaseParameters withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the BackendBaseParameters object itself. - */ - public BackendBaseParameters withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the BackendBaseParameters object itself. - */ - public BackendBaseParameters withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public BackendProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the BackendBaseParameters object itself. - */ - public BackendBaseParameters withProperties(BackendProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the credentials value. - * - * @return the credentials value - */ - public BackendCredentialsContract credentials() { - return this.credentials; - } - - /** - * Set the credentials value. - * - * @param credentials the credentials value to set - * @return the BackendBaseParameters object itself. - */ - public BackendBaseParameters withCredentials(BackendCredentialsContract credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the proxy value. - * - * @return the proxy value - */ - public BackendProxyContract proxy() { - return this.proxy; - } - - /** - * Set the proxy value. - * - * @param proxy the proxy value to set - * @return the BackendBaseParameters object itself. - */ - public BackendBaseParameters withProxy(BackendProxyContract proxy) { - this.proxy = proxy; - return this; - } - - /** - * Get the tls value. - * - * @return the tls value - */ - public BackendTlsProperties tls() { - return this.tls; - } - - /** - * Set the tls value. - * - * @param tls the tls value to set - * @return the BackendBaseParameters object itself. - */ - public BackendBaseParameters withTls(BackendTlsProperties tls) { - this.tls = tls; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendCredentialsContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendCredentialsContract.java deleted file mode 100644 index 80634153006..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendCredentialsContract.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Details of the Credentials used to connect to Backend. - */ -public class BackendCredentialsContract { - /** - * List of Client Certificate Thumbprint. - */ - @JsonProperty(value = "certificate") - private List certificate; - - /** - * Query Parameter description. - */ - @JsonProperty(value = "query") - private Map> query; - - /** - * Header Parameter description. - */ - @JsonProperty(value = "header") - private Map> headerProperty; - - /** - * Authorization header authentication. - */ - @JsonProperty(value = "authorization") - private BackendAuthorizationHeaderCredentials authorization; - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public List certificate() { - return this.certificate; - } - - /** - * Set the certificate value. - * - * @param certificate the certificate value to set - * @return the BackendCredentialsContract object itself. - */ - public BackendCredentialsContract withCertificate(List certificate) { - this.certificate = certificate; - return this; - } - - /** - * Get the query value. - * - * @return the query value - */ - public Map> query() { - return this.query; - } - - /** - * Set the query value. - * - * @param query the query value to set - * @return the BackendCredentialsContract object itself. - */ - public BackendCredentialsContract withQuery(Map> query) { - this.query = query; - return this; - } - - /** - * Get the headerProperty value. - * - * @return the headerProperty value - */ - public Map> headerProperty() { - return this.headerProperty; - } - - /** - * Set the headerProperty value. - * - * @param headerProperty the headerProperty value to set - * @return the BackendCredentialsContract object itself. - */ - public BackendCredentialsContract withHeaderProperty(Map> headerProperty) { - this.headerProperty = headerProperty; - return this; - } - - /** - * Get the authorization value. - * - * @return the authorization value - */ - public BackendAuthorizationHeaderCredentials authorization() { - return this.authorization; - } - - /** - * Set the authorization value. - * - * @param authorization the authorization value to set - * @return the BackendCredentialsContract object itself. - */ - public BackendCredentialsContract withAuthorization(BackendAuthorizationHeaderCredentials authorization) { - this.authorization = authorization; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProperties.java deleted file mode 100644 index 6feca7ac381..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties specific to the Backend Type. - */ -public class BackendProperties { - /** - * Backend Service Fabric Cluster Properties. - */ - @JsonProperty(value = "serviceFabricCluster") - private BackendServiceFabricClusterProperties serviceFabricCluster; - - /** - * Get the serviceFabricCluster value. - * - * @return the serviceFabricCluster value - */ - public BackendServiceFabricClusterProperties serviceFabricCluster() { - return this.serviceFabricCluster; - } - - /** - * Set the serviceFabricCluster value. - * - * @param serviceFabricCluster the serviceFabricCluster value to set - * @return the BackendProperties object itself. - */ - public BackendProperties withServiceFabricCluster(BackendServiceFabricClusterProperties serviceFabricCluster) { - this.serviceFabricCluster = serviceFabricCluster; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProtocol.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProtocol.java deleted file mode 100644 index 5c38e432f67..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProtocol.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for BackendProtocol. - */ -public final class BackendProtocol extends ExpandableStringEnum { - /** Static value http for BackendProtocol. */ - public static final BackendProtocol HTTP = fromString("http"); - - /** Static value soap for BackendProtocol. */ - public static final BackendProtocol SOAP = fromString("soap"); - - /** - * Creates or finds a BackendProtocol from its string representation. - * @param name a name to look for - * @return the corresponding BackendProtocol - */ - @JsonCreator - public static BackendProtocol fromString(String name) { - return fromString(name, BackendProtocol.class); - } - - /** - * @return known BackendProtocol values - */ - public static Collection values() { - return values(BackendProtocol.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProxyContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProxyContract.java deleted file mode 100644 index 099eccf2c40..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendProxyContract.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Details of the Backend WebProxy Server to use in the Request to Backend. - */ -public class BackendProxyContract { - /** - * WebProxy Server AbsoluteUri property which includes the entire URI - * stored in the Uri instance, including all fragments and query strings. - */ - @JsonProperty(value = "url", required = true) - private String url; - - /** - * Username to connect to the WebProxy server. - */ - @JsonProperty(value = "username") - private String username; - - /** - * Password to connect to the WebProxy Server. - */ - @JsonProperty(value = "password") - private String password; - - /** - * Get the url value. - * - * @return the url value - */ - public String url() { - return this.url; - } - - /** - * Set the url value. - * - * @param url the url value to set - * @return the BackendProxyContract object itself. - */ - public BackendProxyContract withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the username value. - * - * @return the username value - */ - public String username() { - return this.username; - } - - /** - * Set the username value. - * - * @param username the username value to set - * @return the BackendProxyContract object itself. - */ - public BackendProxyContract withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the BackendProxyContract object itself. - */ - public BackendProxyContract withPassword(String password) { - this.password = password; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendServiceFabricClusterProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendServiceFabricClusterProperties.java deleted file mode 100644 index 7bec7bede73..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendServiceFabricClusterProperties.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of the Service Fabric Type Backend. - */ -public class BackendServiceFabricClusterProperties { - /** - * The client certificate thumbprint for the management endpoint. - */ - @JsonProperty(value = "clientCertificatethumbprint", required = true) - private String clientCertificatethumbprint; - - /** - * Maximum number of retries while attempting resolve the parition. - */ - @JsonProperty(value = "maxPartitionResolutionRetries") - private Integer maxPartitionResolutionRetries; - - /** - * The cluster management endpoint. - */ - @JsonProperty(value = "managementEndpoints", required = true) - private List managementEndpoints; - - /** - * Thumbprints of certificates cluster management service uses for tls - * communication. - */ - @JsonProperty(value = "serverCertificateThumbprints") - private List serverCertificateThumbprints; - - /** - * Server X509 Certificate Names Collection. - */ - @JsonProperty(value = "serverX509Names") - private List serverX509Names; - - /** - * Get the clientCertificatethumbprint value. - * - * @return the clientCertificatethumbprint value - */ - public String clientCertificatethumbprint() { - return this.clientCertificatethumbprint; - } - - /** - * Set the clientCertificatethumbprint value. - * - * @param clientCertificatethumbprint the clientCertificatethumbprint value to set - * @return the BackendServiceFabricClusterProperties object itself. - */ - public BackendServiceFabricClusterProperties withClientCertificatethumbprint(String clientCertificatethumbprint) { - this.clientCertificatethumbprint = clientCertificatethumbprint; - return this; - } - - /** - * Get the maxPartitionResolutionRetries value. - * - * @return the maxPartitionResolutionRetries value - */ - public Integer maxPartitionResolutionRetries() { - return this.maxPartitionResolutionRetries; - } - - /** - * Set the maxPartitionResolutionRetries value. - * - * @param maxPartitionResolutionRetries the maxPartitionResolutionRetries value to set - * @return the BackendServiceFabricClusterProperties object itself. - */ - public BackendServiceFabricClusterProperties withMaxPartitionResolutionRetries(Integer maxPartitionResolutionRetries) { - this.maxPartitionResolutionRetries = maxPartitionResolutionRetries; - return this; - } - - /** - * Get the managementEndpoints value. - * - * @return the managementEndpoints value - */ - public List managementEndpoints() { - return this.managementEndpoints; - } - - /** - * Set the managementEndpoints value. - * - * @param managementEndpoints the managementEndpoints value to set - * @return the BackendServiceFabricClusterProperties object itself. - */ - public BackendServiceFabricClusterProperties withManagementEndpoints(List managementEndpoints) { - this.managementEndpoints = managementEndpoints; - return this; - } - - /** - * Get the serverCertificateThumbprints value. - * - * @return the serverCertificateThumbprints value - */ - public List serverCertificateThumbprints() { - return this.serverCertificateThumbprints; - } - - /** - * Set the serverCertificateThumbprints value. - * - * @param serverCertificateThumbprints the serverCertificateThumbprints value to set - * @return the BackendServiceFabricClusterProperties object itself. - */ - public BackendServiceFabricClusterProperties withServerCertificateThumbprints(List serverCertificateThumbprints) { - this.serverCertificateThumbprints = serverCertificateThumbprints; - return this; - } - - /** - * Get the serverX509Names value. - * - * @return the serverX509Names value - */ - public List serverX509Names() { - return this.serverX509Names; - } - - /** - * Set the serverX509Names value. - * - * @param serverX509Names the serverX509Names value to set - * @return the BackendServiceFabricClusterProperties object itself. - */ - public BackendServiceFabricClusterProperties withServerX509Names(List serverX509Names) { - this.serverX509Names = serverX509Names; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendTlsProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendTlsProperties.java deleted file mode 100644 index 6d5bac72ae4..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BackendTlsProperties.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties controlling TLS Certificate Validation. - */ -public class BackendTlsProperties { - /** - * Flag indicating whether SSL certificate chain validation should be done - * when using self-signed certificates for this backend host. - */ - @JsonProperty(value = "validateCertificateChain") - private Boolean validateCertificateChain; - - /** - * Flag indicating whether SSL certificate name validation should be done - * when using self-signed certificates for this backend host. - */ - @JsonProperty(value = "validateCertificateName") - private Boolean validateCertificateName; - - /** - * Get the validateCertificateChain value. - * - * @return the validateCertificateChain value - */ - public Boolean validateCertificateChain() { - return this.validateCertificateChain; - } - - /** - * Set the validateCertificateChain value. - * - * @param validateCertificateChain the validateCertificateChain value to set - * @return the BackendTlsProperties object itself. - */ - public BackendTlsProperties withValidateCertificateChain(Boolean validateCertificateChain) { - this.validateCertificateChain = validateCertificateChain; - return this; - } - - /** - * Get the validateCertificateName value. - * - * @return the validateCertificateName value - */ - public Boolean validateCertificateName() { - return this.validateCertificateName; - } - - /** - * Set the validateCertificateName value. - * - * @param validateCertificateName the validateCertificateName value to set - * @return the BackendTlsProperties object itself. - */ - public BackendTlsProperties withValidateCertificateName(Boolean validateCertificateName) { - this.validateCertificateName = validateCertificateName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BearerTokenSendingMethod.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BearerTokenSendingMethod.java deleted file mode 100644 index af701d74be1..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/BearerTokenSendingMethod.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for BearerTokenSendingMethod. - */ -public final class BearerTokenSendingMethod extends ExpandableStringEnum { - /** Static value authorizationHeader for BearerTokenSendingMethod. */ - public static final BearerTokenSendingMethod AUTHORIZATION_HEADER = fromString("authorizationHeader"); - - /** Static value query for BearerTokenSendingMethod. */ - public static final BearerTokenSendingMethod QUERY = fromString("query"); - - /** - * Creates or finds a BearerTokenSendingMethod from its string representation. - * @param name a name to look for - * @return the corresponding BearerTokenSendingMethod - */ - @JsonCreator - public static BearerTokenSendingMethod fromString(String name) { - return fromString(name, BearerTokenSendingMethod.class); - } - - /** - * @return known BearerTokenSendingMethod values - */ - public static Collection values() { - return values(BearerTokenSendingMethod.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/CertificateConfiguration.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/CertificateConfiguration.java deleted file mode 100644 index f34fca4f854..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/CertificateConfiguration.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.microsoft.azure.management.apimanagement.implementation.CertificateInformationInner; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Certificate configuration which consist of non-trusted intermediates and - * root certificates. - */ -public class CertificateConfiguration { - /** - * Base64 Encoded certificate. - */ - @JsonProperty(value = "encodedCertificate") - private String encodedCertificate; - - /** - * Certificate Password. - */ - @JsonProperty(value = "certificatePassword") - private String certificatePassword; - - /** - * The System.Security.Cryptography.x509certificates.Storename certificate - * store location. Only Root and CertificateAuthority are valid locations. - * Possible values include: 'CertificateAuthority', 'Root'. - */ - @JsonProperty(value = "storeName", required = true) - private String storeName; - - /** - * Certificate information. - */ - @JsonProperty(value = "certificate", access = JsonProperty.Access.WRITE_ONLY) - private CertificateInformationInner certificate; - - /** - * Get the encodedCertificate value. - * - * @return the encodedCertificate value - */ - public String encodedCertificate() { - return this.encodedCertificate; - } - - /** - * Set the encodedCertificate value. - * - * @param encodedCertificate the encodedCertificate value to set - * @return the CertificateConfiguration object itself. - */ - public CertificateConfiguration withEncodedCertificate(String encodedCertificate) { - this.encodedCertificate = encodedCertificate; - return this; - } - - /** - * Get the certificatePassword value. - * - * @return the certificatePassword value - */ - public String certificatePassword() { - return this.certificatePassword; - } - - /** - * Set the certificatePassword value. - * - * @param certificatePassword the certificatePassword value to set - * @return the CertificateConfiguration object itself. - */ - public CertificateConfiguration withCertificatePassword(String certificatePassword) { - this.certificatePassword = certificatePassword; - return this; - } - - /** - * Get the storeName value. - * - * @return the storeName value - */ - public String storeName() { - return this.storeName; - } - - /** - * Set the storeName value. - * - * @param storeName the storeName value to set - * @return the CertificateConfiguration object itself. - */ - public CertificateConfiguration withStoreName(String storeName) { - this.storeName = storeName; - return this; - } - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public CertificateInformationInner certificate() { - return this.certificate; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ClientAuthenticationMethod.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ClientAuthenticationMethod.java deleted file mode 100644 index 105ab36b233..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ClientAuthenticationMethod.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ClientAuthenticationMethod. - */ -public final class ClientAuthenticationMethod extends ExpandableStringEnum { - /** Static value Basic for ClientAuthenticationMethod. */ - public static final ClientAuthenticationMethod BASIC = fromString("Basic"); - - /** Static value Body for ClientAuthenticationMethod. */ - public static final ClientAuthenticationMethod BODY = fromString("Body"); - - /** - * Creates or finds a ClientAuthenticationMethod from its string representation. - * @param name a name to look for - * @return the corresponding ClientAuthenticationMethod - */ - @JsonCreator - public static ClientAuthenticationMethod fromString(String name) { - return fromString(name, ClientAuthenticationMethod.class); - } - - /** - * @return known ClientAuthenticationMethod values - */ - public static Collection values() { - return values(ClientAuthenticationMethod.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/Confirmation.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/Confirmation.java deleted file mode 100644 index d201812191a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/Confirmation.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for Confirmation. - */ -public final class Confirmation extends ExpandableStringEnum { - /** Static value signup for Confirmation. */ - public static final Confirmation SIGNUP = fromString("signup"); - - /** Static value invite for Confirmation. */ - public static final Confirmation INVITE = fromString("invite"); - - /** - * Creates or finds a Confirmation from its string representation. - * @param name a name to look for - * @return the corresponding Confirmation - */ - @JsonCreator - public static Confirmation fromString(String name) { - return fromString(name, Confirmation.class); - } - - /** - * @return known Confirmation values - */ - public static Collection values() { - return values(Confirmation.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ConnectivityStatusContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ConnectivityStatusContract.java deleted file mode 100644 index 1c886caa8fa..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ConnectivityStatusContract.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Details about connectivity to a resource. - */ -public class ConnectivityStatusContract { - /** - * The hostname of the resource which the service depends on. This can be - * the database, storage or any other azure resource on which the service - * depends upon. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Resource Connectivity Status Type identifier. Possible values include: - * 'initializing', 'success', 'failure'. - */ - @JsonProperty(value = "status", required = true) - private ConnectivityStatusType status; - - /** - * Error details of the connectivity to the resource. - */ - @JsonProperty(value = "error") - private String error; - - /** - * The date when the resource connectivity status was last updated. This - * status should be updated every 15 minutes. If this status has not been - * updated, then it means that the service has lost network connectivity to - * the resource, from inside the Virtual Network.The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "lastUpdated", required = true) - private DateTime lastUpdated; - - /** - * The date when the resource connectivity status last Changed from success - * to failure or vice-versa. The date conforms to the following format: - * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "lastStatusChange", required = true) - private DateTime lastStatusChange; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ConnectivityStatusContract object itself. - */ - public ConnectivityStatusContract withName(String name) { - this.name = name; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public ConnectivityStatusType status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the ConnectivityStatusContract object itself. - */ - public ConnectivityStatusContract withStatus(ConnectivityStatusType status) { - this.status = status; - return this; - } - - /** - * Get the error value. - * - * @return the error value - */ - public String error() { - return this.error; - } - - /** - * Set the error value. - * - * @param error the error value to set - * @return the ConnectivityStatusContract object itself. - */ - public ConnectivityStatusContract withError(String error) { - this.error = error; - return this; - } - - /** - * Get the lastUpdated value. - * - * @return the lastUpdated value - */ - public DateTime lastUpdated() { - return this.lastUpdated; - } - - /** - * Set the lastUpdated value. - * - * @param lastUpdated the lastUpdated value to set - * @return the ConnectivityStatusContract object itself. - */ - public ConnectivityStatusContract withLastUpdated(DateTime lastUpdated) { - this.lastUpdated = lastUpdated; - return this; - } - - /** - * Get the lastStatusChange value. - * - * @return the lastStatusChange value - */ - public DateTime lastStatusChange() { - return this.lastStatusChange; - } - - /** - * Set the lastStatusChange value. - * - * @param lastStatusChange the lastStatusChange value to set - * @return the ConnectivityStatusContract object itself. - */ - public ConnectivityStatusContract withLastStatusChange(DateTime lastStatusChange) { - this.lastStatusChange = lastStatusChange; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ConnectivityStatusType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ConnectivityStatusType.java deleted file mode 100644 index d986939f42d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ConnectivityStatusType.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ConnectivityStatusType. - */ -public final class ConnectivityStatusType extends ExpandableStringEnum { - /** Static value initializing for ConnectivityStatusType. */ - public static final ConnectivityStatusType INITIALIZING = fromString("initializing"); - - /** Static value success for ConnectivityStatusType. */ - public static final ConnectivityStatusType SUCCESS = fromString("success"); - - /** Static value failure for ConnectivityStatusType. */ - public static final ConnectivityStatusType FAILURE = fromString("failure"); - - /** - * Creates or finds a ConnectivityStatusType from its string representation. - * @param name a name to look for - * @return the corresponding ConnectivityStatusType - */ - @JsonCreator - public static ConnectivityStatusType fromString(String name) { - return fromString(name, ConnectivityStatusType.class); - } - - /** - * @return known ConnectivityStatusType values - */ - public static Collection values() { - return values(ConnectivityStatusType.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ContentFormat.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ContentFormat.java deleted file mode 100644 index 2bbcf5c2f01..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ContentFormat.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ContentFormat. - */ -public final class ContentFormat extends ExpandableStringEnum { - /** Static value wadl-xml for ContentFormat. */ - public static final ContentFormat WADL_XML = fromString("wadl-xml"); - - /** Static value wadl-link-json for ContentFormat. */ - public static final ContentFormat WADL_LINK_JSON = fromString("wadl-link-json"); - - /** Static value swagger-json for ContentFormat. */ - public static final ContentFormat SWAGGER_JSON = fromString("swagger-json"); - - /** Static value swagger-link-json for ContentFormat. */ - public static final ContentFormat SWAGGER_LINK_JSON = fromString("swagger-link-json"); - - /** Static value wsdl for ContentFormat. */ - public static final ContentFormat WSDL = fromString("wsdl"); - - /** Static value wsdl-link for ContentFormat. */ - public static final ContentFormat WSDL_LINK = fromString("wsdl-link"); - - /** - * Creates or finds a ContentFormat from its string representation. - * @param name a name to look for - * @return the corresponding ContentFormat - */ - @JsonCreator - public static ContentFormat fromString(String name) { - return fromString(name, ContentFormat.class); - } - - /** - * @return known ContentFormat values - */ - public static Collection values() { - return values(ContentFormat.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/EmailTemplateParametersContractProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/EmailTemplateParametersContractProperties.java deleted file mode 100644 index 7ffe21dad78..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/EmailTemplateParametersContractProperties.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Email Template Parameter contract. - */ -public class EmailTemplateParametersContractProperties { - /** - * Template parameter name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Template parameter title. - */ - @JsonProperty(value = "title") - private String title; - - /** - * Template parameter description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the EmailTemplateParametersContractProperties object itself. - */ - public EmailTemplateParametersContractProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the EmailTemplateParametersContractProperties object itself. - */ - public EmailTemplateParametersContractProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the EmailTemplateParametersContractProperties object itself. - */ - public EmailTemplateParametersContractProperties withDescription(String description) { - this.description = description; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorFieldContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorFieldContract.java deleted file mode 100644 index d6a87e9615a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorFieldContract.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Error Field contract. - */ -public class ErrorFieldContract { - /** - * Property level error code. - */ - @JsonProperty(value = "code") - private String code; - - /** - * Human-readable representation of property-level error. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Property name. - */ - @JsonProperty(value = "target") - private String target; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ErrorFieldContract object itself. - */ - public ErrorFieldContract withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ErrorFieldContract object itself. - */ - public ErrorFieldContract withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the target value. - * - * @return the target value - */ - public String target() { - return this.target; - } - - /** - * Set the target value. - * - * @param target the target value to set - * @return the ErrorFieldContract object itself. - */ - public ErrorFieldContract withTarget(String target) { - this.target = target; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorResponse.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorResponse.java deleted file mode 100644 index ff731f0fcc5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorResponse.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Error Body contract. - */ -public class ErrorResponse { - /** - * Service-defined error code. This code serves as a sub-status for the - * HTTP error code specified in the response. - */ - @JsonProperty(value = "code") - private String code; - - /** - * Human-readable representation of the error. - */ - @JsonProperty(value = "message") - private String message; - - /** - * The list of invalid fields send in request, in case of validation error. - */ - @JsonProperty(value = "details") - private List details; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ErrorResponse object itself. - */ - public ErrorResponse withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ErrorResponse object itself. - */ - public ErrorResponse withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the details value. - * - * @return the details value - */ - public List details() { - return this.details; - } - - /** - * Set the details value. - * - * @param details the details value to set - * @return the ErrorResponse object itself. - */ - public ErrorResponse withDetails(List details) { - this.details = details; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorResponseException.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorResponseException.java deleted file mode 100644 index 76a23ad2360..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ErrorResponseException.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with ErrorResponse information. - */ -public class ErrorResponseException extends RestException { - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorResponseException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { - super(message, response, body); - } - - @Override - public ErrorResponse body() { - return (ErrorResponse) super.body(); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ExportFormat.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ExportFormat.java deleted file mode 100644 index e2ee97353a0..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ExportFormat.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ExportFormat. - */ -public final class ExportFormat extends ExpandableStringEnum { - /** Static value swagger-link for ExportFormat. */ - public static final ExportFormat SWAGGER = fromString("swagger-link"); - - /** Static value wsdl-link for ExportFormat. */ - public static final ExportFormat WSDL = fromString("wsdl-link"); - - /** Static value wadl-link for ExportFormat. */ - public static final ExportFormat WADL = fromString("wadl-link"); - - /** - * Creates or finds a ExportFormat from its string representation. - * @param name a name to look for - * @return the corresponding ExportFormat - */ - @JsonCreator - public static ExportFormat fromString(String name) { - return fromString(name, ExportFormat.class); - } - - /** - * @return known ExportFormat values - */ - public static Collection values() { - return values(ExportFormat.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GrantType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GrantType.java deleted file mode 100644 index a34d8ca5a5f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GrantType.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for GrantType. - */ -public final class GrantType extends ExpandableStringEnum { - /** Static value authorizationCode for GrantType. */ - public static final GrantType AUTHORIZATION_CODE = fromString("authorizationCode"); - - /** Static value implicit for GrantType. */ - public static final GrantType IMPLICIT = fromString("implicit"); - - /** Static value resourceOwnerPassword for GrantType. */ - public static final GrantType RESOURCE_OWNER_PASSWORD = fromString("resourceOwnerPassword"); - - /** Static value clientCredentials for GrantType. */ - public static final GrantType CLIENT_CREDENTIALS = fromString("clientCredentials"); - - /** - * Creates or finds a GrantType from its string representation. - * @param name a name to look for - * @return the corresponding GrantType - */ - @JsonCreator - public static GrantType fromString(String name) { - return fromString(name, GrantType.class); - } - - /** - * @return known GrantType values - */ - public static Collection values() { - return values(GrantType.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GroupContractProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GroupContractProperties.java deleted file mode 100644 index 1ec0da99a70..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GroupContractProperties.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Group contract Properties. - */ -public class GroupContractProperties { - /** - * Group name. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /** - * Group description. Can contain HTML formatting tags. - */ - @JsonProperty(value = "description") - private String description; - - /** - * true if the group is one of the three system groups (Administrators, - * Developers, or Guests); otherwise false. - */ - @JsonProperty(value = "builtIn", access = JsonProperty.Access.WRITE_ONLY) - private Boolean builtIn; - - /** - * Group type. Possible values include: 'custom', 'system', 'external'. - */ - @JsonProperty(value = "type") - private GroupType type; - - /** - * For external groups, this property contains the id of the group from the - * external identity provider, e.g. for Azure Active Directory - * aad://<tenant>.onmicrosoft.com/groups/<group object id>; - * otherwise the value is null. - */ - @JsonProperty(value = "externalId") - private String externalId; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the GroupContractProperties object itself. - */ - public GroupContractProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the GroupContractProperties object itself. - */ - public GroupContractProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the builtIn value. - * - * @return the builtIn value - */ - public Boolean builtIn() { - return this.builtIn; - } - - /** - * Get the type value. - * - * @return the type value - */ - public GroupType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the GroupContractProperties object itself. - */ - public GroupContractProperties withType(GroupType type) { - this.type = type; - return this; - } - - /** - * Get the externalId value. - * - * @return the externalId value - */ - public String externalId() { - return this.externalId; - } - - /** - * Set the externalId value. - * - * @param externalId the externalId value to set - * @return the GroupContractProperties object itself. - */ - public GroupContractProperties withExternalId(String externalId) { - this.externalId = externalId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GroupType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GroupType.java deleted file mode 100644 index fecd0dd49b7..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/GroupType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for GroupType. - */ -public enum GroupType { - /** Enum value custom. */ - CUSTOM("custom"), - - /** Enum value system. */ - SYSTEM("system"), - - /** Enum value external. */ - EXTERNAL("external"); - - /** The actual serialized value for a GroupType instance. */ - private String value; - - GroupType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a GroupType instance. - * - * @param value the serialized value to parse. - * @return the parsed GroupType object, or null if unable to parse. - */ - @JsonCreator - public static GroupType fromString(String value) { - GroupType[] items = GroupType.values(); - for (GroupType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameConfiguration.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameConfiguration.java deleted file mode 100644 index bbdd1a1eb4a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameConfiguration.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.microsoft.azure.management.apimanagement.implementation.CertificateInformationInner; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Custom hostname configuration. - */ -public class HostnameConfiguration { - /** - * Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', - * 'Scm'. - */ - @JsonProperty(value = "type", required = true) - private HostnameType type; - - /** - * Hostname to configure on the Api Management service. - */ - @JsonProperty(value = "hostName", required = true) - private String hostName; - - /** - * Url to the KeyVault Secret containing the Ssl Certificate. If absolute - * Url containing version is provided, auto-update of ssl certificate will - * not work. This requires Api Management service to be configured with - * MSI. The secret should be of type *application/x-pkcs12*. - */ - @JsonProperty(value = "keyVaultId") - private String keyVaultId; - - /** - * Base64 Encoded certificate. - */ - @JsonProperty(value = "encodedCertificate") - private String encodedCertificate; - - /** - * Certificate Password. - */ - @JsonProperty(value = "certificatePassword") - private String certificatePassword; - - /** - * Specify true to setup the certificate associated with this Hostname as - * the Default SSL Certificate. If a client does not send the SNI header, - * then this will be the certificate that will be challenged. The property - * is useful if a service has multiple custom hostname enabled and it needs - * to decide on the default ssl certificate. The setting only applied to - * Proxy Hostname Type. - */ - @JsonProperty(value = "defaultSslBinding") - private Boolean defaultSslBinding; - - /** - * Specify true to always negotiate client certificate on the hostname. - * Default Value is false. - */ - @JsonProperty(value = "negotiateClientCertificate") - private Boolean negotiateClientCertificate; - - /** - * Certificate information. - */ - @JsonProperty(value = "certificate", access = JsonProperty.Access.WRITE_ONLY) - private CertificateInformationInner certificate; - - /** - * Get the type value. - * - * @return the type value - */ - public HostnameType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the HostnameConfiguration object itself. - */ - public HostnameConfiguration withType(HostnameType type) { - this.type = type; - return this; - } - - /** - * Get the hostName value. - * - * @return the hostName value - */ - public String hostName() { - return this.hostName; - } - - /** - * Set the hostName value. - * - * @param hostName the hostName value to set - * @return the HostnameConfiguration object itself. - */ - public HostnameConfiguration withHostName(String hostName) { - this.hostName = hostName; - return this; - } - - /** - * Get the keyVaultId value. - * - * @return the keyVaultId value - */ - public String keyVaultId() { - return this.keyVaultId; - } - - /** - * Set the keyVaultId value. - * - * @param keyVaultId the keyVaultId value to set - * @return the HostnameConfiguration object itself. - */ - public HostnameConfiguration withKeyVaultId(String keyVaultId) { - this.keyVaultId = keyVaultId; - return this; - } - - /** - * Get the encodedCertificate value. - * - * @return the encodedCertificate value - */ - public String encodedCertificate() { - return this.encodedCertificate; - } - - /** - * Set the encodedCertificate value. - * - * @param encodedCertificate the encodedCertificate value to set - * @return the HostnameConfiguration object itself. - */ - public HostnameConfiguration withEncodedCertificate(String encodedCertificate) { - this.encodedCertificate = encodedCertificate; - return this; - } - - /** - * Get the certificatePassword value. - * - * @return the certificatePassword value - */ - public String certificatePassword() { - return this.certificatePassword; - } - - /** - * Set the certificatePassword value. - * - * @param certificatePassword the certificatePassword value to set - * @return the HostnameConfiguration object itself. - */ - public HostnameConfiguration withCertificatePassword(String certificatePassword) { - this.certificatePassword = certificatePassword; - return this; - } - - /** - * Get the defaultSslBinding value. - * - * @return the defaultSslBinding value - */ - public Boolean defaultSslBinding() { - return this.defaultSslBinding; - } - - /** - * Set the defaultSslBinding value. - * - * @param defaultSslBinding the defaultSslBinding value to set - * @return the HostnameConfiguration object itself. - */ - public HostnameConfiguration withDefaultSslBinding(Boolean defaultSslBinding) { - this.defaultSslBinding = defaultSslBinding; - return this; - } - - /** - * Get the negotiateClientCertificate value. - * - * @return the negotiateClientCertificate value - */ - public Boolean negotiateClientCertificate() { - return this.negotiateClientCertificate; - } - - /** - * Set the negotiateClientCertificate value. - * - * @param negotiateClientCertificate the negotiateClientCertificate value to set - * @return the HostnameConfiguration object itself. - */ - public HostnameConfiguration withNegotiateClientCertificate(Boolean negotiateClientCertificate) { - this.negotiateClientCertificate = negotiateClientCertificate; - return this; - } - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public CertificateInformationInner certificate() { - return this.certificate; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameConfigurationOld.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameConfigurationOld.java deleted file mode 100644 index 08a25b6b02e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameConfigurationOld.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.microsoft.azure.management.apimanagement.implementation.CertificateInformationInner; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Custom hostname configuration. - */ -public class HostnameConfigurationOld { - /** - * Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', - * 'Scm'. - */ - @JsonProperty(value = "type", required = true) - private HostnameType type; - - /** - * Hostname to configure. - */ - @JsonProperty(value = "hostname", required = true) - private String hostname; - - /** - * Certificate information. - */ - @JsonProperty(value = "certificate", required = true) - private CertificateInformationInner certificate; - - /** - * Get the type value. - * - * @return the type value - */ - public HostnameType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the HostnameConfigurationOld object itself. - */ - public HostnameConfigurationOld withType(HostnameType type) { - this.type = type; - return this; - } - - /** - * Get the hostname value. - * - * @return the hostname value - */ - public String hostname() { - return this.hostname; - } - - /** - * Set the hostname value. - * - * @param hostname the hostname value to set - * @return the HostnameConfigurationOld object itself. - */ - public HostnameConfigurationOld withHostname(String hostname) { - this.hostname = hostname; - return this; - } - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public CertificateInformationInner certificate() { - return this.certificate; - } - - /** - * Set the certificate value. - * - * @param certificate the certificate value to set - * @return the HostnameConfigurationOld object itself. - */ - public HostnameConfigurationOld withCertificate(CertificateInformationInner certificate) { - this.certificate = certificate; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameType.java deleted file mode 100644 index a14536b6aa0..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/HostnameType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for HostnameType. - */ -public enum HostnameType { - /** Enum value Proxy. */ - PROXY("Proxy"), - - /** Enum value Portal. */ - PORTAL("Portal"), - - /** Enum value Management. */ - MANAGEMENT("Management"), - - /** Enum value Scm. */ - SCM("Scm"); - - /** The actual serialized value for a HostnameType instance. */ - private String value; - - HostnameType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a HostnameType instance. - * - * @param value the serialized value to parse. - * @return the parsed HostnameType object, or null if unable to parse. - */ - @JsonCreator - public static HostnameType fromString(String value) { - HostnameType[] items = HostnameType.values(); - for (HostnameType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/IdentityProviderBaseParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/IdentityProviderBaseParameters.java deleted file mode 100644 index 856fe4a05ec..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/IdentityProviderBaseParameters.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Identity Provider Base Parameter Properties. - */ -public class IdentityProviderBaseParameters { - /** - * Identity Provider Type identifier. Possible values include: 'facebook', - * 'google', 'microsoft', 'twitter', 'aad', 'aadB2C'. - */ - @JsonProperty(value = "type") - private IdentityProviderType type; - - /** - * List of Allowed Tenants when configuring Azure Active Directory login. - */ - @JsonProperty(value = "allowedTenants") - private List allowedTenants; - - /** - * Signup Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "signupPolicyName") - private String signupPolicyName; - - /** - * Signin Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "signinPolicyName") - private String signinPolicyName; - - /** - * Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "profileEditingPolicyName") - private String profileEditingPolicyName; - - /** - * Password Reset Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "passwordResetPolicyName") - private String passwordResetPolicyName; - - /** - * Get the type value. - * - * @return the type value - */ - public IdentityProviderType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the IdentityProviderBaseParameters object itself. - */ - public IdentityProviderBaseParameters withType(IdentityProviderType type) { - this.type = type; - return this; - } - - /** - * Get the allowedTenants value. - * - * @return the allowedTenants value - */ - public List allowedTenants() { - return this.allowedTenants; - } - - /** - * Set the allowedTenants value. - * - * @param allowedTenants the allowedTenants value to set - * @return the IdentityProviderBaseParameters object itself. - */ - public IdentityProviderBaseParameters withAllowedTenants(List allowedTenants) { - this.allowedTenants = allowedTenants; - return this; - } - - /** - * Get the signupPolicyName value. - * - * @return the signupPolicyName value - */ - public String signupPolicyName() { - return this.signupPolicyName; - } - - /** - * Set the signupPolicyName value. - * - * @param signupPolicyName the signupPolicyName value to set - * @return the IdentityProviderBaseParameters object itself. - */ - public IdentityProviderBaseParameters withSignupPolicyName(String signupPolicyName) { - this.signupPolicyName = signupPolicyName; - return this; - } - - /** - * Get the signinPolicyName value. - * - * @return the signinPolicyName value - */ - public String signinPolicyName() { - return this.signinPolicyName; - } - - /** - * Set the signinPolicyName value. - * - * @param signinPolicyName the signinPolicyName value to set - * @return the IdentityProviderBaseParameters object itself. - */ - public IdentityProviderBaseParameters withSigninPolicyName(String signinPolicyName) { - this.signinPolicyName = signinPolicyName; - return this; - } - - /** - * Get the profileEditingPolicyName value. - * - * @return the profileEditingPolicyName value - */ - public String profileEditingPolicyName() { - return this.profileEditingPolicyName; - } - - /** - * Set the profileEditingPolicyName value. - * - * @param profileEditingPolicyName the profileEditingPolicyName value to set - * @return the IdentityProviderBaseParameters object itself. - */ - public IdentityProviderBaseParameters withProfileEditingPolicyName(String profileEditingPolicyName) { - this.profileEditingPolicyName = profileEditingPolicyName; - return this; - } - - /** - * Get the passwordResetPolicyName value. - * - * @return the passwordResetPolicyName value - */ - public String passwordResetPolicyName() { - return this.passwordResetPolicyName; - } - - /** - * Set the passwordResetPolicyName value. - * - * @param passwordResetPolicyName the passwordResetPolicyName value to set - * @return the IdentityProviderBaseParameters object itself. - */ - public IdentityProviderBaseParameters withPasswordResetPolicyName(String passwordResetPolicyName) { - this.passwordResetPolicyName = passwordResetPolicyName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/IdentityProviderType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/IdentityProviderType.java deleted file mode 100644 index 8a58c96db70..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/IdentityProviderType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for IdentityProviderType. - */ -public final class IdentityProviderType extends ExpandableStringEnum { - /** Static value facebook for IdentityProviderType. */ - public static final IdentityProviderType FACEBOOK = fromString("facebook"); - - /** Static value google for IdentityProviderType. */ - public static final IdentityProviderType GOOGLE = fromString("google"); - - /** Static value microsoft for IdentityProviderType. */ - public static final IdentityProviderType MICROSOFT = fromString("microsoft"); - - /** Static value twitter for IdentityProviderType. */ - public static final IdentityProviderType TWITTER = fromString("twitter"); - - /** Static value aad for IdentityProviderType. */ - public static final IdentityProviderType AAD = fromString("aad"); - - /** Static value aadB2C for IdentityProviderType. */ - public static final IdentityProviderType AAD_B2C = fromString("aadB2C"); - - /** - * Creates or finds a IdentityProviderType from its string representation. - * @param name a name to look for - * @return the corresponding IdentityProviderType - */ - @JsonCreator - public static IdentityProviderType fromString(String name) { - return fromString(name, IdentityProviderType.class); - } - - /** - * @return known IdentityProviderType values - */ - public static Collection values() { - return values(IdentityProviderType.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/KeyType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/KeyType.java deleted file mode 100644 index ad4d4ca1c97..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/KeyType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for KeyType. - */ -public enum KeyType { - /** Enum value primary. */ - PRIMARY("primary"), - - /** Enum value secondary. */ - SECONDARY("secondary"); - - /** The actual serialized value for a KeyType instance. */ - private String value; - - KeyType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a KeyType instance. - * - * @param value the serialized value to parse. - * @return the parsed KeyType object, or null if unable to parse. - */ - @JsonCreator - public static KeyType fromString(String value) { - KeyType[] items = KeyType.values(); - for (KeyType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/LoggerType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/LoggerType.java deleted file mode 100644 index b2ca4d683e2..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/LoggerType.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for LoggerType. - */ -public final class LoggerType extends ExpandableStringEnum { - /** Static value azureEventHub for LoggerType. */ - public static final LoggerType AZURE_EVENT_HUB = fromString("azureEventHub"); - - /** Static value applicationInsights for LoggerType. */ - public static final LoggerType APPLICATION_INSIGHTS = fromString("applicationInsights"); - - /** - * Creates or finds a LoggerType from its string representation. - * @param name a name to look for - * @return the corresponding LoggerType - */ - @JsonCreator - public static LoggerType fromString(String name) { - return fromString(name, LoggerType.class); - } - - /** - * @return known LoggerType values - */ - public static Collection values() { - return values(LoggerType.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/NameAvailabilityReason.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/NameAvailabilityReason.java deleted file mode 100644 index c0b0aabdb59..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/NameAvailabilityReason.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for NameAvailabilityReason. - */ -public enum NameAvailabilityReason { - /** Enum value Valid. */ - VALID("Valid"), - - /** Enum value Invalid. */ - INVALID("Invalid"), - - /** Enum value AlreadyExists. */ - ALREADY_EXISTS("AlreadyExists"); - - /** The actual serialized value for a NameAvailabilityReason instance. */ - private String value; - - NameAvailabilityReason(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a NameAvailabilityReason instance. - * - * @param value the serialized value to parse. - * @return the parsed NameAvailabilityReason object, or null if unable to parse. - */ - @JsonCreator - public static NameAvailabilityReason fromString(String value) { - NameAvailabilityReason[] items = NameAvailabilityReason.values(); - for (NameAvailabilityReason item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/NotificationName.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/NotificationName.java deleted file mode 100644 index 5997b61504d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/NotificationName.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for NotificationName. - */ -public final class NotificationName extends ExpandableStringEnum { - /** Static value RequestPublisherNotificationMessage for NotificationName. */ - public static final NotificationName REQUEST_PUBLISHER_NOTIFICATION_MESSAGE = fromString("RequestPublisherNotificationMessage"); - - /** Static value PurchasePublisherNotificationMessage for NotificationName. */ - public static final NotificationName PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE = fromString("PurchasePublisherNotificationMessage"); - - /** Static value NewApplicationNotificationMessage for NotificationName. */ - public static final NotificationName NEW_APPLICATION_NOTIFICATION_MESSAGE = fromString("NewApplicationNotificationMessage"); - - /** Static value BCC for NotificationName. */ - public static final NotificationName BCC = fromString("BCC"); - - /** Static value NewIssuePublisherNotificationMessage for NotificationName. */ - public static final NotificationName NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE = fromString("NewIssuePublisherNotificationMessage"); - - /** Static value AccountClosedPublisher for NotificationName. */ - public static final NotificationName ACCOUNT_CLOSED_PUBLISHER = fromString("AccountClosedPublisher"); - - /** Static value QuotaLimitApproachingPublisherNotificationMessage for NotificationName. */ - public static final NotificationName QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE = fromString("QuotaLimitApproachingPublisherNotificationMessage"); - - /** - * Creates or finds a NotificationName from its string representation. - * @param name a name to look for - * @return the corresponding NotificationName - */ - @JsonCreator - public static NotificationName fromString(String name) { - return fromString(name, NotificationName.class); - } - - /** - * @return known NotificationName values - */ - public static Collection values() { - return values(NotificationName.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OAuth2AuthenticationSettingsContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OAuth2AuthenticationSettingsContract.java deleted file mode 100644 index 42065dd2120..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OAuth2AuthenticationSettingsContract.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * API OAuth2 Authentication settings details. - */ -public class OAuth2AuthenticationSettingsContract { - /** - * OAuth authorization server identifier. - */ - @JsonProperty(value = "authorizationServerId") - private String authorizationServerId; - - /** - * operations scope. - */ - @JsonProperty(value = "scope") - private String scope; - - /** - * Get the authorizationServerId value. - * - * @return the authorizationServerId value - */ - public String authorizationServerId() { - return this.authorizationServerId; - } - - /** - * Set the authorizationServerId value. - * - * @param authorizationServerId the authorizationServerId value to set - * @return the OAuth2AuthenticationSettingsContract object itself. - */ - public OAuth2AuthenticationSettingsContract withAuthorizationServerId(String authorizationServerId) { - this.authorizationServerId = authorizationServerId; - return this; - } - - /** - * Get the scope value. - * - * @return the scope value - */ - public String scope() { - return this.scope; - } - - /** - * Set the scope value. - * - * @param scope the scope value to set - * @return the OAuth2AuthenticationSettingsContract object itself. - */ - public OAuth2AuthenticationSettingsContract withScope(String scope) { - this.scope = scope; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationDisplay.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationDisplay.java deleted file mode 100644 index 2920804977b..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationDisplay.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The object that describes the operation. - */ -public class OperationDisplay { - /** - * Friendly name of the resource provider. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * Operation type: read, write, delete, listKeys/action, etc. - */ - @JsonProperty(value = "operation") - private String operation; - - /** - * Resource type on which the operation is performed. - */ - @JsonProperty(value = "resource") - private String resource; - - /** - * Friendly name of the operation. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource value. - * - * @param resource the resource value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationEntityBaseContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationEntityBaseContract.java deleted file mode 100644 index 671b65560db..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationEntityBaseContract.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Api Operation Entity Base Contract details. - */ -public class OperationEntityBaseContract { - /** - * Collection of URL template parameters. - */ - @JsonProperty(value = "templateParameters") - private List templateParameters; - - /** - * Description of the operation. May include HTML formatting tags. - */ - @JsonProperty(value = "description") - private String description; - - /** - * An entity containing request details. - */ - @JsonProperty(value = "request") - private RequestContract request; - - /** - * Array of Operation responses. - */ - @JsonProperty(value = "responses") - private List responses; - - /** - * Operation Policies. - */ - @JsonProperty(value = "policies") - private String policies; - - /** - * Get the templateParameters value. - * - * @return the templateParameters value - */ - public List templateParameters() { - return this.templateParameters; - } - - /** - * Set the templateParameters value. - * - * @param templateParameters the templateParameters value to set - * @return the OperationEntityBaseContract object itself. - */ - public OperationEntityBaseContract withTemplateParameters(List templateParameters) { - this.templateParameters = templateParameters; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OperationEntityBaseContract object itself. - */ - public OperationEntityBaseContract withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the request value. - * - * @return the request value - */ - public RequestContract request() { - return this.request; - } - - /** - * Set the request value. - * - * @param request the request value to set - * @return the OperationEntityBaseContract object itself. - */ - public OperationEntityBaseContract withRequest(RequestContract request) { - this.request = request; - return this; - } - - /** - * Get the responses value. - * - * @return the responses value - */ - public List responses() { - return this.responses; - } - - /** - * Set the responses value. - * - * @param responses the responses value to set - * @return the OperationEntityBaseContract object itself. - */ - public OperationEntityBaseContract withResponses(List responses) { - this.responses = responses; - return this; - } - - /** - * Get the policies value. - * - * @return the policies value - */ - public String policies() { - return this.policies; - } - - /** - * Set the policies value. - * - * @param policies the policies value to set - * @return the OperationEntityBaseContract object itself. - */ - public OperationEntityBaseContract withPolicies(String policies) { - this.policies = policies; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationResultLogItemContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationResultLogItemContract.java deleted file mode 100644 index 5f65354f6d4..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationResultLogItemContract.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Log of the entity being created, updated or deleted. - */ -public class OperationResultLogItemContract { - /** - * The type of entity contract. - */ - @JsonProperty(value = "objectType") - private String objectType; - - /** - * Action like create/update/delete. - */ - @JsonProperty(value = "action") - private String action; - - /** - * Identifier of the entity being created/updated/deleted. - */ - @JsonProperty(value = "objectKey") - private String objectKey; - - /** - * Get the objectType value. - * - * @return the objectType value - */ - public String objectType() { - return this.objectType; - } - - /** - * Set the objectType value. - * - * @param objectType the objectType value to set - * @return the OperationResultLogItemContract object itself. - */ - public OperationResultLogItemContract withObjectType(String objectType) { - this.objectType = objectType; - return this; - } - - /** - * Get the action value. - * - * @return the action value - */ - public String action() { - return this.action; - } - - /** - * Set the action value. - * - * @param action the action value to set - * @return the OperationResultLogItemContract object itself. - */ - public OperationResultLogItemContract withAction(String action) { - this.action = action; - return this; - } - - /** - * Get the objectKey value. - * - * @return the objectKey value - */ - public String objectKey() { - return this.objectKey; - } - - /** - * Set the objectKey value. - * - * @param objectKey the objectKey value to set - * @return the OperationResultLogItemContract object itself. - */ - public OperationResultLogItemContract withObjectKey(String objectKey) { - this.objectKey = objectKey; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationTagResourceContractProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationTagResourceContractProperties.java deleted file mode 100644 index 1455f4cc4ac..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/OperationTagResourceContractProperties.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Operation Entity contract Properties. - */ -public class OperationTagResourceContractProperties { - /** - * Identifier of the operation in form /operations/{operationId}. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Operation name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Api Name. - */ - @JsonProperty(value = "apiName", access = JsonProperty.Access.WRITE_ONLY) - private String apiName; - - /** - * Api Revision. - */ - @JsonProperty(value = "apiRevision", access = JsonProperty.Access.WRITE_ONLY) - private String apiRevision; - - /** - * Api Version. - */ - @JsonProperty(value = "apiVersion", access = JsonProperty.Access.WRITE_ONLY) - private String apiVersion; - - /** - * Operation Description. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST - * but not limited by only them. - */ - @JsonProperty(value = "method", access = JsonProperty.Access.WRITE_ONLY) - private String method; - - /** - * Relative URL template identifying the target resource for this - * operation. May include parameters. Example: - * /customers/{cid}/orders/{oid}/?date={date}. - */ - @JsonProperty(value = "urlTemplate", access = JsonProperty.Access.WRITE_ONLY) - private String urlTemplate; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the OperationTagResourceContractProperties object itself. - */ - public OperationTagResourceContractProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the apiName value. - * - * @return the apiName value - */ - public String apiName() { - return this.apiName; - } - - /** - * Get the apiRevision value. - * - * @return the apiRevision value - */ - public String apiRevision() { - return this.apiRevision; - } - - /** - * Get the apiVersion value. - * - * @return the apiVersion value - */ - public String apiVersion() { - return this.apiVersion; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Get the method value. - * - * @return the method value - */ - public String method() { - return this.method; - } - - /** - * Get the urlTemplate value. - * - * @return the urlTemplate value - */ - public String urlTemplate() { - return this.urlTemplate; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ParameterContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ParameterContract.java deleted file mode 100644 index 4f2b0cae7f7..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ParameterContract.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Operation parameters details. - */ -public class ParameterContract { - /** - * Parameter name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Parameter description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Parameter type. - */ - @JsonProperty(value = "type", required = true) - private String type; - - /** - * Default parameter value. - */ - @JsonProperty(value = "defaultValue") - private String defaultValue; - - /** - * whether parameter is required or not. - */ - @JsonProperty(value = "required") - private Boolean required; - - /** - * Parameter values. - */ - @JsonProperty(value = "values") - private List values; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ParameterContract object itself. - */ - public ParameterContract withName(String name) { - this.name = name; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ParameterContract object itself. - */ - public ParameterContract withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ParameterContract object itself. - */ - public ParameterContract withType(String type) { - this.type = type; - return this; - } - - /** - * Get the defaultValue value. - * - * @return the defaultValue value - */ - public String defaultValue() { - return this.defaultValue; - } - - /** - * Set the defaultValue value. - * - * @param defaultValue the defaultValue value to set - * @return the ParameterContract object itself. - */ - public ParameterContract withDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - /** - * Get the required value. - * - * @return the required value - */ - public Boolean required() { - return this.required; - } - - /** - * Set the required value. - * - * @param required the required value to set - * @return the ParameterContract object itself. - */ - public ParameterContract withRequired(Boolean required) { - this.required = required; - return this; - } - - /** - * Get the values value. - * - * @return the values value - */ - public List values() { - return this.values; - } - - /** - * Set the values value. - * - * @param values the values value to set - * @return the ParameterContract object itself. - */ - public ParameterContract withValues(List values) { - this.values = values; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicyContentFormat.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicyContentFormat.java deleted file mode 100644 index f8321a6b5ca..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicyContentFormat.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for PolicyContentFormat. - */ -public final class PolicyContentFormat extends ExpandableStringEnum { - /** Static value xml for PolicyContentFormat. */ - public static final PolicyContentFormat XML = fromString("xml"); - - /** Static value xml-link for PolicyContentFormat. */ - public static final PolicyContentFormat XML_LINK = fromString("xml-link"); - - /** - * Creates or finds a PolicyContentFormat from its string representation. - * @param name a name to look for - * @return the corresponding PolicyContentFormat - */ - @JsonCreator - public static PolicyContentFormat fromString(String name) { - return fromString(name, PolicyContentFormat.class); - } - - /** - * @return known PolicyContentFormat values - */ - public static Collection values() { - return values(PolicyContentFormat.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicyScopeContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicyScopeContract.java deleted file mode 100644 index 1489a16451d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicyScopeContract.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for PolicyScopeContract. - */ -public enum PolicyScopeContract { - /** Enum value Tenant. */ - TENANT("Tenant"), - - /** Enum value Product. */ - PRODUCT("Product"), - - /** Enum value Api. */ - API("Api"), - - /** Enum value Operation. */ - OPERATION("Operation"), - - /** Enum value All. */ - ALL("All"); - - /** The actual serialized value for a PolicyScopeContract instance. */ - private String value; - - PolicyScopeContract(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a PolicyScopeContract instance. - * - * @param value the serialized value to parse. - * @return the parsed PolicyScopeContract object, or null if unable to parse. - */ - @JsonCreator - public static PolicyScopeContract fromString(String value) { - PolicyScopeContract[] items = PolicyScopeContract.values(); - for (PolicyScopeContract item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicySnippetContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicySnippetContract.java deleted file mode 100644 index ff1a267ff4b..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PolicySnippetContract.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Policy snippet. - */ -public class PolicySnippetContract { - /** - * Snippet name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Snippet content. - */ - @JsonProperty(value = "content", access = JsonProperty.Access.WRITE_ONLY) - private String content; - - /** - * Snippet toolTip. - */ - @JsonProperty(value = "toolTip", access = JsonProperty.Access.WRITE_ONLY) - private String toolTip; - - /** - * Binary OR value of the Snippet scope. - */ - @JsonProperty(value = "scope", access = JsonProperty.Access.WRITE_ONLY) - private Integer scope; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the content value. - * - * @return the content value - */ - public String content() { - return this.content; - } - - /** - * Get the toolTip value. - * - * @return the toolTip value - */ - public String toolTip() { - return this.toolTip; - } - - /** - * Get the scope value. - * - * @return the scope value - */ - public Integer scope() { - return this.scope; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductEntityBaseParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductEntityBaseParameters.java deleted file mode 100644 index 8ec4873bccb..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductEntityBaseParameters.java +++ /dev/null @@ -1,192 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Product Entity Base Parameters. - */ -public class ProductEntityBaseParameters { - /** - * Product description. May include HTML formatting tags. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Product terms of use. Developers trying to subscribe to the product will - * be presented and required to accept these terms before they can complete - * the subscription process. - */ - @JsonProperty(value = "terms") - private String terms; - - /** - * Whether a product subscription is required for accessing APIs included - * in this product. If true, the product is referred to as "protected" and - * a valid subscription key is required for a request to an API included in - * the product to succeed. If false, the product is referred to as "open" - * and requests to an API included in the product can be made without a - * subscription key. If property is omitted when creating a new product - * it's value is assumed to be true. - */ - @JsonProperty(value = "subscriptionRequired") - private Boolean subscriptionRequired; - - /** - * whether subscription approval is required. If false, new subscriptions - * will be approved automatically enabling developers to call the product’s - * APIs immediately after subscribing. If true, administrators must - * manually approve the subscription before the developer can any of the - * product’s APIs. Can be present only if subscriptionRequired property is - * present and has a value of false. - */ - @JsonProperty(value = "approvalRequired") - private Boolean approvalRequired; - - /** - * Whether the number of subscriptions a user can have to this product at - * the same time. Set to null or omit to allow unlimited per user - * subscriptions. Can be present only if subscriptionRequired property is - * present and has a value of false. - */ - @JsonProperty(value = "subscriptionsLimit") - private Integer subscriptionsLimit; - - /** - * whether product is published or not. Published products are discoverable - * by users of developer portal. Non published products are visible only to - * administrators. Default state of Product is notPublished. Possible - * values include: 'notPublished', 'published'. - */ - @JsonProperty(value = "state") - private ProductState state; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ProductEntityBaseParameters object itself. - */ - public ProductEntityBaseParameters withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the terms value. - * - * @return the terms value - */ - public String terms() { - return this.terms; - } - - /** - * Set the terms value. - * - * @param terms the terms value to set - * @return the ProductEntityBaseParameters object itself. - */ - public ProductEntityBaseParameters withTerms(String terms) { - this.terms = terms; - return this; - } - - /** - * Get the subscriptionRequired value. - * - * @return the subscriptionRequired value - */ - public Boolean subscriptionRequired() { - return this.subscriptionRequired; - } - - /** - * Set the subscriptionRequired value. - * - * @param subscriptionRequired the subscriptionRequired value to set - * @return the ProductEntityBaseParameters object itself. - */ - public ProductEntityBaseParameters withSubscriptionRequired(Boolean subscriptionRequired) { - this.subscriptionRequired = subscriptionRequired; - return this; - } - - /** - * Get the approvalRequired value. - * - * @return the approvalRequired value - */ - public Boolean approvalRequired() { - return this.approvalRequired; - } - - /** - * Set the approvalRequired value. - * - * @param approvalRequired the approvalRequired value to set - * @return the ProductEntityBaseParameters object itself. - */ - public ProductEntityBaseParameters withApprovalRequired(Boolean approvalRequired) { - this.approvalRequired = approvalRequired; - return this; - } - - /** - * Get the subscriptionsLimit value. - * - * @return the subscriptionsLimit value - */ - public Integer subscriptionsLimit() { - return this.subscriptionsLimit; - } - - /** - * Set the subscriptionsLimit value. - * - * @param subscriptionsLimit the subscriptionsLimit value to set - * @return the ProductEntityBaseParameters object itself. - */ - public ProductEntityBaseParameters withSubscriptionsLimit(Integer subscriptionsLimit) { - this.subscriptionsLimit = subscriptionsLimit; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public ProductState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the ProductEntityBaseParameters object itself. - */ - public ProductEntityBaseParameters withState(ProductState state) { - this.state = state; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductState.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductState.java deleted file mode 100644 index 62e77a9c759..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductState.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ProductState. - */ -public enum ProductState { - /** Enum value notPublished. */ - NOT_PUBLISHED("notPublished"), - - /** Enum value published. */ - PUBLISHED("published"); - - /** The actual serialized value for a ProductState instance. */ - private String value; - - ProductState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ProductState instance. - * - * @param value the serialized value to parse. - * @return the parsed ProductState object, or null if unable to parse. - */ - @JsonCreator - public static ProductState fromString(String value) { - ProductState[] items = ProductState.values(); - for (ProductState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductTagResourceContractProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductTagResourceContractProperties.java deleted file mode 100644 index 30f6dfa69c0..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ProductTagResourceContractProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Product profile. - */ -public class ProductTagResourceContractProperties extends ProductEntityBaseParameters { - /** - * Identifier of the product in the form of /products/{productId}. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Product name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the ProductTagResourceContractProperties object itself. - */ - public ProductTagResourceContractProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ProductTagResourceContractProperties object itself. - */ - public ProductTagResourceContractProperties withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PropertyEntityBaseParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PropertyEntityBaseParameters.java deleted file mode 100644 index dd4deeadbbd..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/PropertyEntityBaseParameters.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Property Entity Base Parameters set. - */ -public class PropertyEntityBaseParameters { - /** - * Optional tags that when provided can be used to filter the property - * list. - */ - @JsonProperty(value = "tags") - private List tags; - - /** - * Determines whether the value is a secret and should be encrypted or not. - * Default value is false. - */ - @JsonProperty(value = "secret") - private Boolean secret; - - /** - * Get the tags value. - * - * @return the tags value - */ - public List tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the PropertyEntityBaseParameters object itself. - */ - public PropertyEntityBaseParameters withTags(List tags) { - this.tags = tags; - return this; - } - - /** - * Get the secret value. - * - * @return the secret value - */ - public Boolean secret() { - return this.secret; - } - - /** - * Set the secret value. - * - * @param secret the secret value to set - * @return the PropertyEntityBaseParameters object itself. - */ - public PropertyEntityBaseParameters withSecret(Boolean secret) { - this.secret = secret; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/Protocol.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/Protocol.java deleted file mode 100644 index 79f7b78b676..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/Protocol.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for Protocol. - */ -public enum Protocol { - /** Enum value http. */ - HTTP("http"), - - /** Enum value https. */ - HTTPS("https"); - - /** The actual serialized value for a Protocol instance. */ - private String value; - - Protocol(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Protocol instance. - * - * @param value the serialized value to parse. - * @return the parsed Protocol object, or null if unable to parse. - */ - @JsonCreator - public static Protocol fromString(String value) { - Protocol[] items = Protocol.values(); - for (Protocol item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/QuotaCounterValueContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/QuotaCounterValueContract.java deleted file mode 100644 index 9d9c08e7003..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/QuotaCounterValueContract.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Quota counter value details. - */ -@JsonFlatten -public class QuotaCounterValueContract { - /** - * Number of times Counter was called. - */ - @JsonProperty(value = "value.callsCount") - private Integer callsCount; - - /** - * Data Transferred in KiloBytes. - */ - @JsonProperty(value = "value.kbTransferred") - private Double kbTransferred; - - /** - * Get the callsCount value. - * - * @return the callsCount value - */ - public Integer callsCount() { - return this.callsCount; - } - - /** - * Set the callsCount value. - * - * @param callsCount the callsCount value to set - * @return the QuotaCounterValueContract object itself. - */ - public QuotaCounterValueContract withCallsCount(Integer callsCount) { - this.callsCount = callsCount; - return this; - } - - /** - * Get the kbTransferred value. - * - * @return the kbTransferred value - */ - public Double kbTransferred() { - return this.kbTransferred; - } - - /** - * Set the kbTransferred value. - * - * @param kbTransferred the kbTransferred value to set - * @return the QuotaCounterValueContract object itself. - */ - public QuotaCounterValueContract withKbTransferred(Double kbTransferred) { - this.kbTransferred = kbTransferred; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RecipientsContractProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RecipientsContractProperties.java deleted file mode 100644 index 06e5bf7f1e3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RecipientsContractProperties.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Notification Parameter contract. - */ -public class RecipientsContractProperties { - /** - * List of Emails subscribed for the notification. - */ - @JsonProperty(value = "emails") - private List emails; - - /** - * List of Users subscribed for the notification. - */ - @JsonProperty(value = "users") - private List users; - - /** - * Get the emails value. - * - * @return the emails value - */ - public List emails() { - return this.emails; - } - - /** - * Set the emails value. - * - * @param emails the emails value to set - * @return the RecipientsContractProperties object itself. - */ - public RecipientsContractProperties withEmails(List emails) { - this.emails = emails; - return this; - } - - /** - * Get the users value. - * - * @return the users value - */ - public List users() { - return this.users; - } - - /** - * Set the users value. - * - * @param users the users value to set - * @return the RecipientsContractProperties object itself. - */ - public RecipientsContractProperties withUsers(List users) { - this.users = users; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RegistrationDelegationSettingsProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RegistrationDelegationSettingsProperties.java deleted file mode 100644 index ad3c7ec9c84..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RegistrationDelegationSettingsProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * User registration delegation settings properties. - */ -public class RegistrationDelegationSettingsProperties { - /** - * Enable or disable delegation for user registration. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the RegistrationDelegationSettingsProperties object itself. - */ - public RegistrationDelegationSettingsProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RepresentationContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RepresentationContract.java deleted file mode 100644 index d9e3ea60ade..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RepresentationContract.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Operation request/response representation details. - */ -public class RepresentationContract { - /** - * Specifies a registered or custom content type for this representation, - * e.g. application/xml. - */ - @JsonProperty(value = "contentType", required = true) - private String contentType; - - /** - * An example of the representation. - */ - @JsonProperty(value = "sample") - private String sample; - - /** - * Schema identifier. Applicable only if 'contentType' value is neither - * 'application/x-www-form-urlencoded' nor 'multipart/form-data'. - */ - @JsonProperty(value = "schemaId") - private String schemaId; - - /** - * Type name defined by the schema. Applicable only if 'contentType' value - * is neither 'application/x-www-form-urlencoded' nor - * 'multipart/form-data'. - */ - @JsonProperty(value = "typeName") - private String typeName; - - /** - * Collection of form parameters. Required if 'contentType' value is either - * 'application/x-www-form-urlencoded' or 'multipart/form-data'.. - */ - @JsonProperty(value = "formParameters") - private List formParameters; - - /** - * Get the contentType value. - * - * @return the contentType value - */ - public String contentType() { - return this.contentType; - } - - /** - * Set the contentType value. - * - * @param contentType the contentType value to set - * @return the RepresentationContract object itself. - */ - public RepresentationContract withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the sample value. - * - * @return the sample value - */ - public String sample() { - return this.sample; - } - - /** - * Set the sample value. - * - * @param sample the sample value to set - * @return the RepresentationContract object itself. - */ - public RepresentationContract withSample(String sample) { - this.sample = sample; - return this; - } - - /** - * Get the schemaId value. - * - * @return the schemaId value - */ - public String schemaId() { - return this.schemaId; - } - - /** - * Set the schemaId value. - * - * @param schemaId the schemaId value to set - * @return the RepresentationContract object itself. - */ - public RepresentationContract withSchemaId(String schemaId) { - this.schemaId = schemaId; - return this; - } - - /** - * Get the typeName value. - * - * @return the typeName value - */ - public String typeName() { - return this.typeName; - } - - /** - * Set the typeName value. - * - * @param typeName the typeName value to set - * @return the RepresentationContract object itself. - */ - public RepresentationContract withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - - /** - * Get the formParameters value. - * - * @return the formParameters value - */ - public List formParameters() { - return this.formParameters; - } - - /** - * Set the formParameters value. - * - * @param formParameters the formParameters value to set - * @return the RepresentationContract object itself. - */ - public RepresentationContract withFormParameters(List formParameters) { - this.formParameters = formParameters; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RequestContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RequestContract.java deleted file mode 100644 index e2a3e23a2a9..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/RequestContract.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Operation request details. - */ -public class RequestContract { - /** - * Operation request description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Collection of operation request query parameters. - */ - @JsonProperty(value = "queryParameters") - private List queryParameters; - - /** - * Collection of operation request headers. - */ - @JsonProperty(value = "headers") - private List headers; - - /** - * Collection of operation request representations. - */ - @JsonProperty(value = "representations") - private List representations; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the RequestContract object itself. - */ - public RequestContract withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the queryParameters value. - * - * @return the queryParameters value - */ - public List queryParameters() { - return this.queryParameters; - } - - /** - * Set the queryParameters value. - * - * @param queryParameters the queryParameters value to set - * @return the RequestContract object itself. - */ - public RequestContract withQueryParameters(List queryParameters) { - this.queryParameters = queryParameters; - return this; - } - - /** - * Get the headers value. - * - * @return the headers value - */ - public List headers() { - return this.headers; - } - - /** - * Set the headers value. - * - * @param headers the headers value to set - * @return the RequestContract object itself. - */ - public RequestContract withHeaders(List headers) { - this.headers = headers; - return this; - } - - /** - * Get the representations value. - * - * @return the representations value - */ - public List representations() { - return this.representations; - } - - /** - * Set the representations value. - * - * @param representations the representations value to set - * @return the RequestContract object itself. - */ - public RequestContract withRepresentations(List representations) { - this.representations = representations; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ResponseContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ResponseContract.java deleted file mode 100644 index 87b6c5d07b6..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/ResponseContract.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Operation response details. - */ -public class ResponseContract { - /** - * Operation response HTTP status code. - */ - @JsonProperty(value = "statusCode", required = true) - private int statusCode; - - /** - * Operation response description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Collection of operation response representations. - */ - @JsonProperty(value = "representations") - private List representations; - - /** - * Collection of operation response headers. - */ - @JsonProperty(value = "headers") - private List headers; - - /** - * Get the statusCode value. - * - * @return the statusCode value - */ - public int statusCode() { - return this.statusCode; - } - - /** - * Set the statusCode value. - * - * @param statusCode the statusCode value to set - * @return the ResponseContract object itself. - */ - public ResponseContract withStatusCode(int statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ResponseContract object itself. - */ - public ResponseContract withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the representations value. - * - * @return the representations value - */ - public List representations() { - return this.representations; - } - - /** - * Set the representations value. - * - * @param representations the representations value to set - * @return the ResponseContract object itself. - */ - public ResponseContract withRepresentations(List representations) { - this.representations = representations; - return this; - } - - /** - * Get the headers value. - * - * @return the headers value - */ - public List headers() { - return this.headers; - } - - /** - * Set the headers value. - * - * @param headers the headers value to set - * @return the ResponseContract object itself. - */ - public ResponseContract withHeaders(List headers) { - this.headers = headers; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SkuType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SkuType.java deleted file mode 100644 index e3ae76a5292..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SkuType.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for SkuType. - */ -public final class SkuType extends ExpandableStringEnum { - /** Static value Developer for SkuType. */ - public static final SkuType DEVELOPER = fromString("Developer"); - - /** Static value Standard for SkuType. */ - public static final SkuType STANDARD = fromString("Standard"); - - /** Static value Premium for SkuType. */ - public static final SkuType PREMIUM = fromString("Premium"); - - /** Static value Basic for SkuType. */ - public static final SkuType BASIC = fromString("Basic"); - - /** - * Creates or finds a SkuType from its string representation. - * @param name a name to look for - * @return the corresponding SkuType - */ - @JsonCreator - public static SkuType fromString(String name) { - return fromString(name, SkuType.class); - } - - /** - * @return known SkuType values - */ - public static Collection values() { - return values(SkuType.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SoapApiType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SoapApiType.java deleted file mode 100644 index b7ede269db1..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SoapApiType.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for SoapApiType. - */ -public final class SoapApiType extends ExpandableStringEnum { - /** Static value http for SoapApiType. */ - public static final SoapApiType SOAP_TO_REST = fromString("http"); - - /** Static value soap for SoapApiType. */ - public static final SoapApiType SOAP_PASS_THROUGH = fromString("soap"); - - /** - * Creates or finds a SoapApiType from its string representation. - * @param name a name to look for - * @return the corresponding SoapApiType - */ - @JsonCreator - public static SoapApiType fromString(String name) { - return fromString(name, SoapApiType.class); - } - - /** - * @return known SoapApiType values - */ - public static Collection values() { - return values(SoapApiType.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionKeyParameterNamesContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionKeyParameterNamesContract.java deleted file mode 100644 index c7853928bea..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionKeyParameterNamesContract.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Subscription key parameter names details. - */ -public class SubscriptionKeyParameterNamesContract { - /** - * Subscription key header name. - */ - @JsonProperty(value = "header") - private String headerProperty; - - /** - * Subscription key query string parameter name. - */ - @JsonProperty(value = "query") - private String query; - - /** - * Get the headerProperty value. - * - * @return the headerProperty value - */ - public String headerProperty() { - return this.headerProperty; - } - - /** - * Set the headerProperty value. - * - * @param headerProperty the headerProperty value to set - * @return the SubscriptionKeyParameterNamesContract object itself. - */ - public SubscriptionKeyParameterNamesContract withHeaderProperty(String headerProperty) { - this.headerProperty = headerProperty; - return this; - } - - /** - * Get the query value. - * - * @return the query value - */ - public String query() { - return this.query; - } - - /** - * Set the query value. - * - * @param query the query value to set - * @return the SubscriptionKeyParameterNamesContract object itself. - */ - public SubscriptionKeyParameterNamesContract withQuery(String query) { - this.query = query; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionState.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionState.java deleted file mode 100644 index dfd732e35dc..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionState.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SubscriptionState. - */ -public enum SubscriptionState { - /** Enum value suspended. */ - SUSPENDED("suspended"), - - /** Enum value active. */ - ACTIVE("active"), - - /** Enum value expired. */ - EXPIRED("expired"), - - /** Enum value submitted. */ - SUBMITTED("submitted"), - - /** Enum value rejected. */ - REJECTED("rejected"), - - /** Enum value cancelled. */ - CANCELLED("cancelled"); - - /** The actual serialized value for a SubscriptionState instance. */ - private String value; - - SubscriptionState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SubscriptionState instance. - * - * @param value the serialized value to parse. - * @return the parsed SubscriptionState object, or null if unable to parse. - */ - @JsonCreator - public static SubscriptionState fromString(String value) { - SubscriptionState[] items = SubscriptionState.values(); - for (SubscriptionState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionsDelegationSettingsProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionsDelegationSettingsProperties.java deleted file mode 100644 index 09509870a9a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/SubscriptionsDelegationSettingsProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Subscriptions delegation settings properties. - */ -public class SubscriptionsDelegationSettingsProperties { - /** - * Enable or disable delegation for subscriptions. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the SubscriptionsDelegationSettingsProperties object itself. - */ - public SubscriptionsDelegationSettingsProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TagCreateUpdateParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TagCreateUpdateParameters.java deleted file mode 100644 index 195b6371c5a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TagCreateUpdateParameters.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters supplied to Create/Update Tag operations. - */ -@JsonFlatten -public class TagCreateUpdateParameters { - /** - * Tag name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the TagCreateUpdateParameters object itself. - */ - public TagCreateUpdateParameters withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TagTagResourceContractProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TagTagResourceContractProperties.java deleted file mode 100644 index 3165c98ebf3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TagTagResourceContractProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Contract defining the Tag property in the Tag Resource Contract. - */ -public class TagTagResourceContractProperties { - /** - * Tag identifier. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Tag Name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the TagTagResourceContractProperties object itself. - */ - public TagTagResourceContractProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the TagTagResourceContractProperties object itself. - */ - public TagTagResourceContractProperties withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TemplateName.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TemplateName.java deleted file mode 100644 index 96e94dc71b6..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TemplateName.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for TemplateName. - */ -public final class TemplateName extends ExpandableStringEnum { - /** Static value applicationApprovedNotificationMessage for TemplateName. */ - public static final TemplateName APPLICATION_APPROVED_NOTIFICATION_MESSAGE = fromString("applicationApprovedNotificationMessage"); - - /** Static value accountClosedDeveloper for TemplateName. */ - public static final TemplateName ACCOUNT_CLOSED_DEVELOPER = fromString("accountClosedDeveloper"); - - /** Static value quotaLimitApproachingDeveloperNotificationMessage for TemplateName. */ - public static final TemplateName QUOTA_LIMIT_APPROACHING_DEVELOPER_NOTIFICATION_MESSAGE = fromString("quotaLimitApproachingDeveloperNotificationMessage"); - - /** Static value newDeveloperNotificationMessage for TemplateName. */ - public static final TemplateName NEW_DEVELOPER_NOTIFICATION_MESSAGE = fromString("newDeveloperNotificationMessage"); - - /** Static value emailChangeIdentityDefault for TemplateName. */ - public static final TemplateName EMAIL_CHANGE_IDENTITY_DEFAULT = fromString("emailChangeIdentityDefault"); - - /** Static value inviteUserNotificationMessage for TemplateName. */ - public static final TemplateName INVITE_USER_NOTIFICATION_MESSAGE = fromString("inviteUserNotificationMessage"); - - /** Static value newCommentNotificationMessage for TemplateName. */ - public static final TemplateName NEW_COMMENT_NOTIFICATION_MESSAGE = fromString("newCommentNotificationMessage"); - - /** Static value confirmSignUpIdentityDefault for TemplateName. */ - public static final TemplateName CONFIRM_SIGN_UP_IDENTITY_DEFAULT = fromString("confirmSignUpIdentityDefault"); - - /** Static value newIssueNotificationMessage for TemplateName. */ - public static final TemplateName NEW_ISSUE_NOTIFICATION_MESSAGE = fromString("newIssueNotificationMessage"); - - /** Static value purchaseDeveloperNotificationMessage for TemplateName. */ - public static final TemplateName PURCHASE_DEVELOPER_NOTIFICATION_MESSAGE = fromString("purchaseDeveloperNotificationMessage"); - - /** Static value passwordResetIdentityDefault for TemplateName. */ - public static final TemplateName PASSWORD_RESET_IDENTITY_DEFAULT = fromString("passwordResetIdentityDefault"); - - /** Static value passwordResetByAdminNotificationMessage for TemplateName. */ - public static final TemplateName PASSWORD_RESET_BY_ADMIN_NOTIFICATION_MESSAGE = fromString("passwordResetByAdminNotificationMessage"); - - /** Static value rejectDeveloperNotificationMessage for TemplateName. */ - public static final TemplateName REJECT_DEVELOPER_NOTIFICATION_MESSAGE = fromString("rejectDeveloperNotificationMessage"); - - /** Static value requestDeveloperNotificationMessage for TemplateName. */ - public static final TemplateName REQUEST_DEVELOPER_NOTIFICATION_MESSAGE = fromString("requestDeveloperNotificationMessage"); - - /** - * Creates or finds a TemplateName from its string representation. - * @param name a name to look for - * @return the corresponding TemplateName - */ - @JsonCreator - public static TemplateName fromString(String name) { - return fromString(name, TemplateName.class); - } - - /** - * @return known TemplateName values - */ - public static Collection values() { - return values(TemplateName.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TermsOfServiceProperties.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TermsOfServiceProperties.java deleted file mode 100644 index 4ef19427f01..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TermsOfServiceProperties.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Terms of service contract properties. - */ -public class TermsOfServiceProperties { - /** - * A terms of service text. - */ - @JsonProperty(value = "text") - private String text; - - /** - * Display terms of service during a sign-up process. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /** - * Ask user for consent to the terms of service. - */ - @JsonProperty(value = "consentRequired") - private Boolean consentRequired; - - /** - * Get the text value. - * - * @return the text value - */ - public String text() { - return this.text; - } - - /** - * Set the text value. - * - * @param text the text value to set - * @return the TermsOfServiceProperties object itself. - */ - public TermsOfServiceProperties withText(String text) { - this.text = text; - return this; - } - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the TermsOfServiceProperties object itself. - */ - public TermsOfServiceProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the consentRequired value. - * - * @return the consentRequired value - */ - public Boolean consentRequired() { - return this.consentRequired; - } - - /** - * Set the consentRequired value. - * - * @param consentRequired the consentRequired value to set - * @return the TermsOfServiceProperties object itself. - */ - public TermsOfServiceProperties withConsentRequired(Boolean consentRequired) { - this.consentRequired = consentRequired; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TokenBodyParameterContract.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TokenBodyParameterContract.java deleted file mode 100644 index 07ee601e14d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/TokenBodyParameterContract.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * OAuth acquire token request body parameter (www-url-form-encoded). - */ -public class TokenBodyParameterContract { - /** - * body parameter name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * body parameter value. - */ - @JsonProperty(value = "value", required = true) - private String value; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the TokenBodyParameterContract object itself. - */ - public TokenBodyParameterContract withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the TokenBodyParameterContract object itself. - */ - public TokenBodyParameterContract withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/UserEntityBaseParameters.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/UserEntityBaseParameters.java deleted file mode 100644 index 8d27c533aeb..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/UserEntityBaseParameters.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.implementation.UserIdentityContractInner; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * User Entity Base Parameters set. - */ -public class UserEntityBaseParameters { - /** - * Account state. Specifies whether the user is active or not. Blocked - * users are unable to sign into the developer portal or call any APIs of - * subscribed products. Default state is Active. Possible values include: - * 'active', 'blocked', 'pending', 'deleted'. - */ - @JsonProperty(value = "state") - private UserState state; - - /** - * Optional note about a user set by the administrator. - */ - @JsonProperty(value = "note") - private String note; - - /** - * Collection of user identities. - */ - @JsonProperty(value = "identities", access = JsonProperty.Access.WRITE_ONLY) - private List identities; - - /** - * Get the state value. - * - * @return the state value - */ - public UserState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the UserEntityBaseParameters object itself. - */ - public UserEntityBaseParameters withState(UserState state) { - this.state = state; - return this; - } - - /** - * Get the note value. - * - * @return the note value - */ - public String note() { - return this.note; - } - - /** - * Set the note value. - * - * @param note the note value to set - * @return the UserEntityBaseParameters object itself. - */ - public UserEntityBaseParameters withNote(String note) { - this.note = note; - return this; - } - - /** - * Get the identities value. - * - * @return the identities value - */ - public List identities() { - return this.identities; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/UserState.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/UserState.java deleted file mode 100644 index bcf4a1ebbcd..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/UserState.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for UserState. - */ -public final class UserState extends ExpandableStringEnum { - /** Static value active for UserState. */ - public static final UserState ACTIVE = fromString("active"); - - /** Static value blocked for UserState. */ - public static final UserState BLOCKED = fromString("blocked"); - - /** Static value pending for UserState. */ - public static final UserState PENDING = fromString("pending"); - - /** Static value deleted for UserState. */ - public static final UserState DELETED = fromString("deleted"); - - /** - * Creates or finds a UserState from its string representation. - * @param name a name to look for - * @return the corresponding UserState - */ - @JsonCreator - public static UserState fromString(String name) { - return fromString(name, UserState.class); - } - - /** - * @return known UserState values - */ - public static Collection values() { - return values(UserState.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VersioningScheme.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VersioningScheme.java deleted file mode 100644 index ce7b08663ab..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VersioningScheme.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for VersioningScheme. - */ -public final class VersioningScheme extends ExpandableStringEnum { - /** Static value Segment for VersioningScheme. */ - public static final VersioningScheme SEGMENT = fromString("Segment"); - - /** Static value Query for VersioningScheme. */ - public static final VersioningScheme QUERY = fromString("Query"); - - /** Static value Header for VersioningScheme. */ - public static final VersioningScheme HEADER = fromString("Header"); - - /** - * Creates or finds a VersioningScheme from its string representation. - * @param name a name to look for - * @return the corresponding VersioningScheme - */ - @JsonCreator - public static VersioningScheme fromString(String name) { - return fromString(name, VersioningScheme.class); - } - - /** - * @return known VersioningScheme values - */ - public static Collection values() { - return values(VersioningScheme.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VirtualNetworkConfiguration.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VirtualNetworkConfiguration.java deleted file mode 100644 index 8cebe22546a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VirtualNetworkConfiguration.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Configuration of a virtual network to which API Management service is - * deployed. - */ -public class VirtualNetworkConfiguration { - /** - * The virtual network ID. This is typically a GUID. Expect a null GUID by - * default. - */ - @JsonProperty(value = "vnetid", access = JsonProperty.Access.WRITE_ONLY) - private String vnetid; - - /** - * The name of the subnet. - */ - @JsonProperty(value = "subnetname", access = JsonProperty.Access.WRITE_ONLY) - private String subnetname; - - /** - * The full resource ID of a subnet in a virtual network to deploy the API - * Management service in. - */ - @JsonProperty(value = "subnetResourceId") - private String subnetResourceId; - - /** - * Get the vnetid value. - * - * @return the vnetid value - */ - public String vnetid() { - return this.vnetid; - } - - /** - * Get the subnetname value. - * - * @return the subnetname value - */ - public String subnetname() { - return this.subnetname; - } - - /** - * Get the subnetResourceId value. - * - * @return the subnetResourceId value - */ - public String subnetResourceId() { - return this.subnetResourceId; - } - - /** - * Set the subnetResourceId value. - * - * @param subnetResourceId the subnetResourceId value to set - * @return the VirtualNetworkConfiguration object itself. - */ - public VirtualNetworkConfiguration withSubnetResourceId(String subnetResourceId) { - this.subnetResourceId = subnetResourceId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VirtualNetworkType.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VirtualNetworkType.java deleted file mode 100644 index 24a1d214c0a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/VirtualNetworkType.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for VirtualNetworkType. - */ -public final class VirtualNetworkType extends ExpandableStringEnum { - /** Static value None for VirtualNetworkType. */ - public static final VirtualNetworkType NONE = fromString("None"); - - /** Static value External for VirtualNetworkType. */ - public static final VirtualNetworkType EXTERNAL = fromString("External"); - - /** Static value Internal for VirtualNetworkType. */ - public static final VirtualNetworkType INTERNAL = fromString("Internal"); - - /** - * Creates or finds a VirtualNetworkType from its string representation. - * @param name a name to look for - * @return the corresponding VirtualNetworkType - */ - @JsonCreator - public static VirtualNetworkType fromString(String name) { - return fromString(name, VirtualNetworkType.class); - } - - /** - * @return known VirtualNetworkType values - */ - public static Collection values() { - return values(VirtualNetworkType.class); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/X509CertificateName.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/X509CertificateName.java deleted file mode 100644 index 91e28049f4a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/X509CertificateName.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of server X509Names. - */ -public class X509CertificateName { - /** - * Common Name of the Certificate. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Thumbprint for the Issuer of the Certificate. - */ - @JsonProperty(value = "issuerCertificateThumbprint") - private String issuerCertificateThumbprint; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the X509CertificateName object itself. - */ - public X509CertificateName withName(String name) { - this.name = name; - return this; - } - - /** - * Get the issuerCertificateThumbprint value. - * - * @return the issuerCertificateThumbprint value - */ - public String issuerCertificateThumbprint() { - return this.issuerCertificateThumbprint; - } - - /** - * Set the issuerCertificateThumbprint value. - * - * @param issuerCertificateThumbprint the issuerCertificateThumbprint value to set - * @return the X509CertificateName object itself. - */ - public X509CertificateName withIssuerCertificateThumbprint(String issuerCertificateThumbprint) { - this.issuerCertificateThumbprint = issuerCertificateThumbprint; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AccessInformationContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AccessInformationContractInner.java deleted file mode 100644 index 050ede4bea2..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AccessInformationContractInner.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Tenant access information contract of the API Management service. - */ -public class AccessInformationContractInner { - /** - * Identifier. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Primary access key. - */ - @JsonProperty(value = "primaryKey") - private String primaryKey; - - /** - * Secondary access key. - */ - @JsonProperty(value = "secondaryKey") - private String secondaryKey; - - /** - * Tenant access information of the API Management service. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the AccessInformationContractInner object itself. - */ - public AccessInformationContractInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the AccessInformationContractInner object itself. - */ - public AccessInformationContractInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the AccessInformationContractInner object itself. - */ - public AccessInformationContractInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the AccessInformationContractInner object itself. - */ - public AccessInformationContractInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiContractInner.java deleted file mode 100644 index e53066d3b10..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiContractInner.java +++ /dev/null @@ -1,372 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.AuthenticationSettingsContract; -import com.microsoft.azure.management.apimanagement.SubscriptionKeyParameterNamesContract; -import com.microsoft.azure.management.apimanagement.ApiType; -import java.util.List; -import com.microsoft.azure.management.apimanagement.Protocol; -import com.microsoft.azure.management.apimanagement.ApiVersionSetContractDetails; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * API details. - */ -@JsonFlatten -public class ApiContractInner extends Resource { - /** - * Description of the API. May include HTML formatting tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Collection of authentication settings included into this API. - */ - @JsonProperty(value = "properties.authenticationSettings") - private AuthenticationSettingsContract authenticationSettings; - - /** - * Protocols over which API is made available. - */ - @JsonProperty(value = "properties.subscriptionKeyParameterNames") - private SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames; - - /** - * Type of API. Possible values include: 'http', 'soap'. - */ - @JsonProperty(value = "properties.type") - private ApiType apiType; - - /** - * Describes the Revision of the Api. If no value is provided, default - * revision 1 is created. - */ - @JsonProperty(value = "properties.apiRevision") - private String apiRevision; - - /** - * Indicates the Version identifier of the API if the API is versioned. - */ - @JsonProperty(value = "properties.apiVersion") - private String apiVersion; - - /** - * Indicates if API revision is current api revision. - */ - @JsonProperty(value = "properties.isCurrent", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCurrent; - - /** - * Indicates if API revision is accessible via the gateway. - */ - @JsonProperty(value = "properties.isOnline", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isOnline; - - /** - * A resource identifier for the related ApiVersionSet. - */ - @JsonProperty(value = "properties.apiVersionSetId") - private String apiVersionSetId; - - /** - * API name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Absolute URL of the backend service implementing this API. - */ - @JsonProperty(value = "properties.serviceUrl") - private String serviceUrl; - - /** - * Relative URL uniquely identifying this API and all of its resource paths - * within the API Management service instance. It is appended to the API - * endpoint base URL specified during the service instance creation to form - * a public URL for this API. - */ - @JsonProperty(value = "properties.path", required = true) - private String path; - - /** - * Describes on which protocols the operations in this API can be invoked. - */ - @JsonProperty(value = "properties.protocols") - private List protocols; - - /** - * The apiVersionSet property. - */ - @JsonProperty(value = "properties.apiVersionSet") - private ApiVersionSetContractDetails apiVersionSet; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the authenticationSettings value. - * - * @return the authenticationSettings value - */ - public AuthenticationSettingsContract authenticationSettings() { - return this.authenticationSettings; - } - - /** - * Set the authenticationSettings value. - * - * @param authenticationSettings the authenticationSettings value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withAuthenticationSettings(AuthenticationSettingsContract authenticationSettings) { - this.authenticationSettings = authenticationSettings; - return this; - } - - /** - * Get the subscriptionKeyParameterNames value. - * - * @return the subscriptionKeyParameterNames value - */ - public SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames() { - return this.subscriptionKeyParameterNames; - } - - /** - * Set the subscriptionKeyParameterNames value. - * - * @param subscriptionKeyParameterNames the subscriptionKeyParameterNames value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withSubscriptionKeyParameterNames(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) { - this.subscriptionKeyParameterNames = subscriptionKeyParameterNames; - return this; - } - - /** - * Get the apiType value. - * - * @return the apiType value - */ - public ApiType apiType() { - return this.apiType; - } - - /** - * Set the apiType value. - * - * @param apiType the apiType value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withApiType(ApiType apiType) { - this.apiType = apiType; - return this; - } - - /** - * Get the apiRevision value. - * - * @return the apiRevision value - */ - public String apiRevision() { - return this.apiRevision; - } - - /** - * Set the apiRevision value. - * - * @param apiRevision the apiRevision value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withApiRevision(String apiRevision) { - this.apiRevision = apiRevision; - return this; - } - - /** - * Get the apiVersion value. - * - * @return the apiVersion value - */ - public String apiVersion() { - return this.apiVersion; - } - - /** - * Set the apiVersion value. - * - * @param apiVersion the apiVersion value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - return this; - } - - /** - * Get the isCurrent value. - * - * @return the isCurrent value - */ - public Boolean isCurrent() { - return this.isCurrent; - } - - /** - * Get the isOnline value. - * - * @return the isOnline value - */ - public Boolean isOnline() { - return this.isOnline; - } - - /** - * Get the apiVersionSetId value. - * - * @return the apiVersionSetId value - */ - public String apiVersionSetId() { - return this.apiVersionSetId; - } - - /** - * Set the apiVersionSetId value. - * - * @param apiVersionSetId the apiVersionSetId value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withApiVersionSetId(String apiVersionSetId) { - this.apiVersionSetId = apiVersionSetId; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the serviceUrl value. - * - * @return the serviceUrl value - */ - public String serviceUrl() { - return this.serviceUrl; - } - - /** - * Set the serviceUrl value. - * - * @param serviceUrl the serviceUrl value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withServiceUrl(String serviceUrl) { - this.serviceUrl = serviceUrl; - return this; - } - - /** - * Get the path value. - * - * @return the path value - */ - public String path() { - return this.path; - } - - /** - * Set the path value. - * - * @param path the path value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the protocols value. - * - * @return the protocols value - */ - public List protocols() { - return this.protocols; - } - - /** - * Set the protocols value. - * - * @param protocols the protocols value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withProtocols(List protocols) { - this.protocols = protocols; - return this; - } - - /** - * Get the apiVersionSet value. - * - * @return the apiVersionSet value - */ - public ApiVersionSetContractDetails apiVersionSet() { - return this.apiVersionSet; - } - - /** - * Set the apiVersionSet value. - * - * @param apiVersionSet the apiVersionSet value to set - * @return the ApiContractInner object itself. - */ - public ApiContractInner withApiVersionSet(ApiVersionSetContractDetails apiVersionSet) { - this.apiVersionSet = apiVersionSet; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiCreateOrUpdateHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiCreateOrUpdateHeadersInner.java deleted file mode 100644 index 56a5f29afcc..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiCreateOrUpdateHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for CreateOrUpdate operation. - */ -public class ApiCreateOrUpdateHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiCreateOrUpdateHeadersInner object itself. - */ - public ApiCreateOrUpdateHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiCreateOrUpdateParameterInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiCreateOrUpdateParameterInner.java deleted file mode 100644 index 40a5f812a06..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiCreateOrUpdateParameterInner.java +++ /dev/null @@ -1,483 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.AuthenticationSettingsContract; -import com.microsoft.azure.management.apimanagement.SubscriptionKeyParameterNamesContract; -import com.microsoft.azure.management.apimanagement.ApiType; -import java.util.List; -import com.microsoft.azure.management.apimanagement.Protocol; -import com.microsoft.azure.management.apimanagement.ApiVersionSetContractDetails; -import com.microsoft.azure.management.apimanagement.ContentFormat; -import com.microsoft.azure.management.apimanagement.ApiCreateOrUpdatePropertiesWsdlSelector; -import com.microsoft.azure.management.apimanagement.SoapApiType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * API Create or Update Parameters. - */ -@JsonFlatten -public class ApiCreateOrUpdateParameterInner { - /** - * Description of the API. May include HTML formatting tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Collection of authentication settings included into this API. - */ - @JsonProperty(value = "properties.authenticationSettings") - private AuthenticationSettingsContract authenticationSettings; - - /** - * Protocols over which API is made available. - */ - @JsonProperty(value = "properties.subscriptionKeyParameterNames") - private SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames; - - /** - * Type of API. Possible values include: 'http', 'soap'. - */ - @JsonProperty(value = "properties.type") - private ApiType apiType; - - /** - * Describes the Revision of the Api. If no value is provided, default - * revision 1 is created. - */ - @JsonProperty(value = "properties.apiRevision") - private String apiRevision; - - /** - * Indicates the Version identifier of the API if the API is versioned. - */ - @JsonProperty(value = "properties.apiVersion") - private String apiVersion; - - /** - * Indicates if API revision is current api revision. - */ - @JsonProperty(value = "properties.isCurrent", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCurrent; - - /** - * Indicates if API revision is accessible via the gateway. - */ - @JsonProperty(value = "properties.isOnline", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isOnline; - - /** - * A resource identifier for the related ApiVersionSet. - */ - @JsonProperty(value = "properties.apiVersionSetId") - private String apiVersionSetId; - - /** - * API name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Absolute URL of the backend service implementing this API. - */ - @JsonProperty(value = "properties.serviceUrl") - private String serviceUrl; - - /** - * Relative URL uniquely identifying this API and all of its resource paths - * within the API Management service instance. It is appended to the API - * endpoint base URL specified during the service instance creation to form - * a public URL for this API. - */ - @JsonProperty(value = "properties.path", required = true) - private String path; - - /** - * Describes on which protocols the operations in this API can be invoked. - */ - @JsonProperty(value = "properties.protocols") - private List protocols; - - /** - * The apiVersionSet property. - */ - @JsonProperty(value = "properties.apiVersionSet") - private ApiVersionSetContractDetails apiVersionSet; - - /** - * Content value when Importing an API. - */ - @JsonProperty(value = "properties.contentValue") - private String contentValue; - - /** - * Format of the Content in which the API is getting imported. Possible - * values include: 'wadl-xml', 'wadl-link-json', 'swagger-json', - * 'swagger-link-json', 'wsdl', 'wsdl-link'. - */ - @JsonProperty(value = "properties.contentFormat") - private ContentFormat contentFormat; - - /** - * Criteria to limit import of WSDL to a subset of the document. - */ - @JsonProperty(value = "properties.wsdlSelector") - private ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector; - - /** - * Type of Api to create. - * * `http` creates a SOAP to REST API - * * `soap` creates a SOAP pass-through API. Possible values include: - * 'SoapToRest', 'SoapPassThrough'. - */ - @JsonProperty(value = "properties.apiType") - private SoapApiType soapApiType; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the authenticationSettings value. - * - * @return the authenticationSettings value - */ - public AuthenticationSettingsContract authenticationSettings() { - return this.authenticationSettings; - } - - /** - * Set the authenticationSettings value. - * - * @param authenticationSettings the authenticationSettings value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withAuthenticationSettings(AuthenticationSettingsContract authenticationSettings) { - this.authenticationSettings = authenticationSettings; - return this; - } - - /** - * Get the subscriptionKeyParameterNames value. - * - * @return the subscriptionKeyParameterNames value - */ - public SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames() { - return this.subscriptionKeyParameterNames; - } - - /** - * Set the subscriptionKeyParameterNames value. - * - * @param subscriptionKeyParameterNames the subscriptionKeyParameterNames value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withSubscriptionKeyParameterNames(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) { - this.subscriptionKeyParameterNames = subscriptionKeyParameterNames; - return this; - } - - /** - * Get the apiType value. - * - * @return the apiType value - */ - public ApiType apiType() { - return this.apiType; - } - - /** - * Set the apiType value. - * - * @param apiType the apiType value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withApiType(ApiType apiType) { - this.apiType = apiType; - return this; - } - - /** - * Get the apiRevision value. - * - * @return the apiRevision value - */ - public String apiRevision() { - return this.apiRevision; - } - - /** - * Set the apiRevision value. - * - * @param apiRevision the apiRevision value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withApiRevision(String apiRevision) { - this.apiRevision = apiRevision; - return this; - } - - /** - * Get the apiVersion value. - * - * @return the apiVersion value - */ - public String apiVersion() { - return this.apiVersion; - } - - /** - * Set the apiVersion value. - * - * @param apiVersion the apiVersion value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - return this; - } - - /** - * Get the isCurrent value. - * - * @return the isCurrent value - */ - public Boolean isCurrent() { - return this.isCurrent; - } - - /** - * Get the isOnline value. - * - * @return the isOnline value - */ - public Boolean isOnline() { - return this.isOnline; - } - - /** - * Get the apiVersionSetId value. - * - * @return the apiVersionSetId value - */ - public String apiVersionSetId() { - return this.apiVersionSetId; - } - - /** - * Set the apiVersionSetId value. - * - * @param apiVersionSetId the apiVersionSetId value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withApiVersionSetId(String apiVersionSetId) { - this.apiVersionSetId = apiVersionSetId; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the serviceUrl value. - * - * @return the serviceUrl value - */ - public String serviceUrl() { - return this.serviceUrl; - } - - /** - * Set the serviceUrl value. - * - * @param serviceUrl the serviceUrl value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withServiceUrl(String serviceUrl) { - this.serviceUrl = serviceUrl; - return this; - } - - /** - * Get the path value. - * - * @return the path value - */ - public String path() { - return this.path; - } - - /** - * Set the path value. - * - * @param path the path value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the protocols value. - * - * @return the protocols value - */ - public List protocols() { - return this.protocols; - } - - /** - * Set the protocols value. - * - * @param protocols the protocols value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withProtocols(List protocols) { - this.protocols = protocols; - return this; - } - - /** - * Get the apiVersionSet value. - * - * @return the apiVersionSet value - */ - public ApiVersionSetContractDetails apiVersionSet() { - return this.apiVersionSet; - } - - /** - * Set the apiVersionSet value. - * - * @param apiVersionSet the apiVersionSet value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withApiVersionSet(ApiVersionSetContractDetails apiVersionSet) { - this.apiVersionSet = apiVersionSet; - return this; - } - - /** - * Get the contentValue value. - * - * @return the contentValue value - */ - public String contentValue() { - return this.contentValue; - } - - /** - * Set the contentValue value. - * - * @param contentValue the contentValue value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withContentValue(String contentValue) { - this.contentValue = contentValue; - return this; - } - - /** - * Get the contentFormat value. - * - * @return the contentFormat value - */ - public ContentFormat contentFormat() { - return this.contentFormat; - } - - /** - * Set the contentFormat value. - * - * @param contentFormat the contentFormat value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withContentFormat(ContentFormat contentFormat) { - this.contentFormat = contentFormat; - return this; - } - - /** - * Get the wsdlSelector value. - * - * @return the wsdlSelector value - */ - public ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector() { - return this.wsdlSelector; - } - - /** - * Set the wsdlSelector value. - * - * @param wsdlSelector the wsdlSelector value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withWsdlSelector(ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector) { - this.wsdlSelector = wsdlSelector; - return this; - } - - /** - * Get the soapApiType value. - * - * @return the soapApiType value - */ - public SoapApiType soapApiType() { - return this.soapApiType; - } - - /** - * Set the soapApiType value. - * - * @param soapApiType the soapApiType value to set - * @return the ApiCreateOrUpdateParameterInner object itself. - */ - public ApiCreateOrUpdateParameterInner withSoapApiType(SoapApiType soapApiType) { - this.soapApiType = soapApiType; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticGetEntityTagHeadersInner.java deleted file mode 100644 index b79cafaeb1f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ApiDiagnosticGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiDiagnosticGetEntityTagHeadersInner object itself. - */ - public ApiDiagnosticGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticGetHeadersInner.java deleted file mode 100644 index b4b170779e8..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ApiDiagnosticGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiDiagnosticGetHeadersInner object itself. - */ - public ApiDiagnosticGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticLoggersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticLoggersInner.java deleted file mode 100644 index 342e70b4f1f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticLoggersInner.java +++ /dev/null @@ -1,823 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiDiagnosticLoggers. - */ -public class ApiDiagnosticLoggersInner { - /** The Retrofit service to perform REST calls. */ - private ApiDiagnosticLoggersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiDiagnosticLoggersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiDiagnosticLoggersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiDiagnosticLoggersService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiDiagnosticLoggers to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiDiagnosticLoggersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnosticLoggers listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Path("diagnosticId") String diagnosticId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnosticLoggers checkEntityExists" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}") - Observable> checkEntityExists(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("diagnosticId") String diagnosticId, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnosticLoggers createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("diagnosticId") String diagnosticId, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnosticLoggers delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("diagnosticId") String diagnosticId, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnosticLoggers listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, diagnosticId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, diagnosticId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, diagnosticId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), diagnosticId, this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, diagnosticId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, diagnosticId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, diagnosticId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String diagnosticId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), diagnosticId, this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Checks that logger entity specified by identifier is associated with the diagnostics entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the boolean object if successful. - */ - public boolean checkEntityExists(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid).toBlocking().single().body(); - } - - /** - * Checks that logger entity specified by identifier is associated with the diagnostics entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkEntityExistsAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid), serviceCallback); - } - - /** - * Checks that logger entity specified by identifier is associated with the diagnostics entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable checkEntityExistsAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid).map(new Func1, Boolean>() { - @Override - public Boolean call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks that logger entity specified by identifier is associated with the diagnostics entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable> checkEntityExistsWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.checkEntityExists(resourceGroupName, serviceName, apiId, diagnosticId, loggerid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkEntityExistsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkEntityExistsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmpty(response); - } - - /** - * Attaches a logger to a dignostic for an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LoggerContractInner object if successful. - */ - public LoggerContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid).toBlocking().single().body(); - } - - /** - * Attaches a logger to a dignostic for an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid), serviceCallback); - } - - /** - * Attaches a logger to a dignostic for an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid).map(new Func1, LoggerContractInner>() { - @Override - public LoggerContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Attaches a logger to a dignostic for an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.createOrUpdate(resourceGroupName, serviceName, apiId, diagnosticId, loggerid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified Logger from Diagnostic for an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid).toBlocking().single().body(); - } - - /** - * Deletes the specified Logger from Diagnostic for an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid), serviceCallback); - } - - /** - * Deletes the specified Logger from Diagnostic for an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, loggerid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified Logger from Diagnostic for an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String loggerid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, apiId, diagnosticId, loggerid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of an API. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticsInner.java deleted file mode 100644 index 7eb197804e7..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiDiagnosticsInner.java +++ /dev/null @@ -1,1119 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiDiagnostics. - */ -public class ApiDiagnosticsInner { - /** The Retrofit service to perform REST calls. */ - private ApiDiagnosticsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiDiagnosticsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiDiagnosticsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiDiagnosticsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiDiagnostics to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiDiagnosticsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnostics listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnostics getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnostics get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnostics createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DiagnosticContractInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnostics update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DiagnosticContractInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnostics delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiDiagnostics listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiagnosticContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiagnosticContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiagnosticContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all diagnostics of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all diagnostics of an API. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiagnosticContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String apiId, String diagnosticId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, apiId, diagnosticId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ApiDiagnosticGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiagnosticContractInner object if successful. - */ - public DiagnosticContractInner get(String resourceGroupName, String serviceName, String apiId, String diagnosticId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId).toBlocking().single().body(); - } - - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId), serviceCallback); - } - - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId).map(new Func1, DiagnosticContractInner>() { - @Override - public DiagnosticContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, apiId, diagnosticId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiDiagnosticGetHeadersInner.class); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiagnosticContractInner object if successful. - */ - public DiagnosticContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String diagnosticId, boolean enabled) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, enabled).toBlocking().single().body(); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, boolean enabled, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, enabled), serviceCallback); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, boolean enabled) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, enabled).map(new Func1, DiagnosticContractInner>() { - @Override - public DiagnosticContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, boolean enabled) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String ifMatch = null; - DiagnosticContractInner parameters = new DiagnosticContractInner(); - parameters.withEnabled(enabled); - return service.createOrUpdate(resourceGroupName, serviceName, apiId, diagnosticId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiagnosticContractInner object if successful. - */ - public DiagnosticContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String diagnosticId, boolean enabled, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, enabled, ifMatch).toBlocking().single().body(); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, boolean enabled, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, enabled, ifMatch), serviceCallback); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, boolean enabled, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, enabled, ifMatch).map(new Func1, DiagnosticContractInner>() { - @Override - public DiagnosticContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, boolean enabled, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - DiagnosticContractInner parameters = new DiagnosticContractInner(); - parameters.withEnabled(enabled); - return service.createOrUpdate(resourceGroupName, serviceName, apiId, diagnosticId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String ifMatch, boolean enabled) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, enabled).toBlocking().single().body(); - } - - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String ifMatch, boolean enabled, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, enabled), serviceCallback); - } - - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String ifMatch, boolean enabled) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, enabled).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String ifMatch, boolean enabled) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - DiagnosticContractInner parameters = new DiagnosticContractInner(); - parameters.withEnabled(enabled); - return service.update(resourceGroupName, serviceName, apiId, diagnosticId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified Diagnostic from an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified Diagnostic from an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, ifMatch), serviceCallback); - } - - /** - * Deletes the specified Diagnostic from an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, diagnosticId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified Diagnostic from an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String diagnosticId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, apiId, diagnosticId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all diagnostics of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiagnosticContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all diagnostics of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all diagnostics of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all diagnostics of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all diagnostics of an API. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiagnosticContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiExportResultInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiExportResultInner.java deleted file mode 100644 index 0b18355984d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiExportResultInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * API Export result Blob Uri. - */ -public class ApiExportResultInner { - /** - * Link to the Storage Blob containing the result of the export operation. - * The Blob Uri is only valid for 5 minutes. - */ - @JsonProperty(value = "link") - private String link; - - /** - * Get the link value. - * - * @return the link value - */ - public String link() { - return this.link; - } - - /** - * Set the link value. - * - * @param link the link value to set - * @return the ApiExportResultInner object itself. - */ - public ApiExportResultInner withLink(String link) { - this.link = link; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiExportsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiExportsInner.java deleted file mode 100644 index 73f201e724f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiExportsInner.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.management.apimanagement.ExportFormat; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiExports. - */ -public class ApiExportsInner { - /** The Retrofit service to perform REST calls. */ - private ApiExportsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiExportsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiExportsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiExportsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiExports to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiExportsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiExports get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("format") ExportFormat format, @Query("export") String export, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. Possible values include: 'Swagger', 'Wsdl', 'Wadl' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiExportResultInner object if successful. - */ - public ApiExportResultInner get(String resourceGroupName, String serviceName, String apiId, ExportFormat format) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, format).toBlocking().single().body(); - } - - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. Possible values include: 'Swagger', 'Wsdl', 'Wadl' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, ExportFormat format, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, format), serviceCallback); - } - - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. Possible values include: 'Swagger', 'Wsdl', 'Wadl' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiExportResultInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId, ExportFormat format) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, format).map(new Func1, ApiExportResultInner>() { - @Override - public ApiExportResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. Possible values include: 'Swagger', 'Wsdl', 'Wadl' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiExportResultInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, ExportFormat format) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (format == null) { - throw new IllegalArgumentException("Parameter format is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String export = "true"; - return service.get(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), format, export, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiGetEntityTagHeadersInner.java deleted file mode 100644 index eaf2a4430fc..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ApiGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiGetEntityTagHeadersInner object itself. - */ - public ApiGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiGetHeadersInner.java deleted file mode 100644 index f80a240fe40..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ApiGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiGetHeadersInner object itself. - */ - public ApiGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementClientImpl.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementClientImpl.java deleted file mode 100644 index 39b600707b9..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementClientImpl.java +++ /dev/null @@ -1,966 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the ApiManagementClientImpl class. - */ -public class ApiManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Version of the API to be used with the client request. */ - private String apiVersion; - - /** - * Gets Version of the API to be used with the client request. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ - private String subscriptionId; - - /** - * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public ApiManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public ApiManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public ApiManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public ApiManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The PolicysInner object to access its operations. - */ - private PolicysInner policys; - - /** - * Gets the PolicysInner object to access its operations. - * @return the PolicysInner object. - */ - public PolicysInner policys() { - return this.policys; - } - - /** - * The PolicySnippetsInner object to access its operations. - */ - private PolicySnippetsInner policySnippets; - - /** - * Gets the PolicySnippetsInner object to access its operations. - * @return the PolicySnippetsInner object. - */ - public PolicySnippetsInner policySnippets() { - return this.policySnippets; - } - - /** - * The RegionsInner object to access its operations. - */ - private RegionsInner regions; - - /** - * Gets the RegionsInner object to access its operations. - * @return the RegionsInner object. - */ - public RegionsInner regions() { - return this.regions; - } - - /** - * The ApisInner object to access its operations. - */ - private ApisInner apis; - - /** - * Gets the ApisInner object to access its operations. - * @return the ApisInner object. - */ - public ApisInner apis() { - return this.apis; - } - - /** - * The ApiRevisionsInner object to access its operations. - */ - private ApiRevisionsInner apiRevisions; - - /** - * Gets the ApiRevisionsInner object to access its operations. - * @return the ApiRevisionsInner object. - */ - public ApiRevisionsInner apiRevisions() { - return this.apiRevisions; - } - - /** - * The ApiReleasesInner object to access its operations. - */ - private ApiReleasesInner apiReleases; - - /** - * Gets the ApiReleasesInner object to access its operations. - * @return the ApiReleasesInner object. - */ - public ApiReleasesInner apiReleases() { - return this.apiReleases; - } - - /** - * The ApiOperationsInner object to access its operations. - */ - private ApiOperationsInner apiOperations; - - /** - * Gets the ApiOperationsInner object to access its operations. - * @return the ApiOperationsInner object. - */ - public ApiOperationsInner apiOperations() { - return this.apiOperations; - } - - /** - * The ApiOperationPolicysInner object to access its operations. - */ - private ApiOperationPolicysInner apiOperationPolicys; - - /** - * Gets the ApiOperationPolicysInner object to access its operations. - * @return the ApiOperationPolicysInner object. - */ - public ApiOperationPolicysInner apiOperationPolicys() { - return this.apiOperationPolicys; - } - - /** - * The ApiProductsInner object to access its operations. - */ - private ApiProductsInner apiProducts; - - /** - * Gets the ApiProductsInner object to access its operations. - * @return the ApiProductsInner object. - */ - public ApiProductsInner apiProducts() { - return this.apiProducts; - } - - /** - * The ApiPolicysInner object to access its operations. - */ - private ApiPolicysInner apiPolicys; - - /** - * Gets the ApiPolicysInner object to access its operations. - * @return the ApiPolicysInner object. - */ - public ApiPolicysInner apiPolicys() { - return this.apiPolicys; - } - - /** - * The ApiSchemasInner object to access its operations. - */ - private ApiSchemasInner apiSchemas; - - /** - * Gets the ApiSchemasInner object to access its operations. - * @return the ApiSchemasInner object. - */ - public ApiSchemasInner apiSchemas() { - return this.apiSchemas; - } - - /** - * The ApiDiagnosticsInner object to access its operations. - */ - private ApiDiagnosticsInner apiDiagnostics; - - /** - * Gets the ApiDiagnosticsInner object to access its operations. - * @return the ApiDiagnosticsInner object. - */ - public ApiDiagnosticsInner apiDiagnostics() { - return this.apiDiagnostics; - } - - /** - * The ApiDiagnosticLoggersInner object to access its operations. - */ - private ApiDiagnosticLoggersInner apiDiagnosticLoggers; - - /** - * Gets the ApiDiagnosticLoggersInner object to access its operations. - * @return the ApiDiagnosticLoggersInner object. - */ - public ApiDiagnosticLoggersInner apiDiagnosticLoggers() { - return this.apiDiagnosticLoggers; - } - - /** - * The AuthorizationServersInner object to access its operations. - */ - private AuthorizationServersInner authorizationServers; - - /** - * Gets the AuthorizationServersInner object to access its operations. - * @return the AuthorizationServersInner object. - */ - public AuthorizationServersInner authorizationServers() { - return this.authorizationServers; - } - - /** - * The BackendsInner object to access its operations. - */ - private BackendsInner backends; - - /** - * Gets the BackendsInner object to access its operations. - * @return the BackendsInner object. - */ - public BackendsInner backends() { - return this.backends; - } - - /** - * The CertificatesInner object to access its operations. - */ - private CertificatesInner certificates; - - /** - * Gets the CertificatesInner object to access its operations. - * @return the CertificatesInner object. - */ - public CertificatesInner certificates() { - return this.certificates; - } - - /** - * The ApiManagementOperationsInner object to access its operations. - */ - private ApiManagementOperationsInner apiManagementOperations; - - /** - * Gets the ApiManagementOperationsInner object to access its operations. - * @return the ApiManagementOperationsInner object. - */ - public ApiManagementOperationsInner apiManagementOperations() { - return this.apiManagementOperations; - } - - /** - * The ApiManagementServicesInner object to access its operations. - */ - private ApiManagementServicesInner apiManagementServices; - - /** - * Gets the ApiManagementServicesInner object to access its operations. - * @return the ApiManagementServicesInner object. - */ - public ApiManagementServicesInner apiManagementServices() { - return this.apiManagementServices; - } - - /** - * The DiagnosticsInner object to access its operations. - */ - private DiagnosticsInner diagnostics; - - /** - * Gets the DiagnosticsInner object to access its operations. - * @return the DiagnosticsInner object. - */ - public DiagnosticsInner diagnostics() { - return this.diagnostics; - } - - /** - * The DiagnosticLoggersInner object to access its operations. - */ - private DiagnosticLoggersInner diagnosticLoggers; - - /** - * Gets the DiagnosticLoggersInner object to access its operations. - * @return the DiagnosticLoggersInner object. - */ - public DiagnosticLoggersInner diagnosticLoggers() { - return this.diagnosticLoggers; - } - - /** - * The EmailTemplatesInner object to access its operations. - */ - private EmailTemplatesInner emailTemplates; - - /** - * Gets the EmailTemplatesInner object to access its operations. - * @return the EmailTemplatesInner object. - */ - public EmailTemplatesInner emailTemplates() { - return this.emailTemplates; - } - - /** - * The GroupsInner object to access its operations. - */ - private GroupsInner groups; - - /** - * Gets the GroupsInner object to access its operations. - * @return the GroupsInner object. - */ - public GroupsInner groups() { - return this.groups; - } - - /** - * The GroupUsersInner object to access its operations. - */ - private GroupUsersInner groupUsers; - - /** - * Gets the GroupUsersInner object to access its operations. - * @return the GroupUsersInner object. - */ - public GroupUsersInner groupUsers() { - return this.groupUsers; - } - - /** - * The IdentityProvidersInner object to access its operations. - */ - private IdentityProvidersInner identityProviders; - - /** - * Gets the IdentityProvidersInner object to access its operations. - * @return the IdentityProvidersInner object. - */ - public IdentityProvidersInner identityProviders() { - return this.identityProviders; - } - - /** - * The LoggersInner object to access its operations. - */ - private LoggersInner loggers; - - /** - * Gets the LoggersInner object to access its operations. - * @return the LoggersInner object. - */ - public LoggersInner loggers() { - return this.loggers; - } - - /** - * The NotificationsInner object to access its operations. - */ - private NotificationsInner notifications; - - /** - * Gets the NotificationsInner object to access its operations. - * @return the NotificationsInner object. - */ - public NotificationsInner notifications() { - return this.notifications; - } - - /** - * The NotificationRecipientUsersInner object to access its operations. - */ - private NotificationRecipientUsersInner notificationRecipientUsers; - - /** - * Gets the NotificationRecipientUsersInner object to access its operations. - * @return the NotificationRecipientUsersInner object. - */ - public NotificationRecipientUsersInner notificationRecipientUsers() { - return this.notificationRecipientUsers; - } - - /** - * The NotificationRecipientEmailsInner object to access its operations. - */ - private NotificationRecipientEmailsInner notificationRecipientEmails; - - /** - * Gets the NotificationRecipientEmailsInner object to access its operations. - * @return the NotificationRecipientEmailsInner object. - */ - public NotificationRecipientEmailsInner notificationRecipientEmails() { - return this.notificationRecipientEmails; - } - - /** - * The NetworkStatusInner object to access its operations. - */ - private NetworkStatusInner networkStatus; - - /** - * Gets the NetworkStatusInner object to access its operations. - * @return the NetworkStatusInner object. - */ - public NetworkStatusInner networkStatus() { - return this.networkStatus; - } - - /** - * The OpenIdConnectProvidersInner object to access its operations. - */ - private OpenIdConnectProvidersInner openIdConnectProviders; - - /** - * Gets the OpenIdConnectProvidersInner object to access its operations. - * @return the OpenIdConnectProvidersInner object. - */ - public OpenIdConnectProvidersInner openIdConnectProviders() { - return this.openIdConnectProviders; - } - - /** - * The SignInSettingsInner object to access its operations. - */ - private SignInSettingsInner signInSettings; - - /** - * Gets the SignInSettingsInner object to access its operations. - * @return the SignInSettingsInner object. - */ - public SignInSettingsInner signInSettings() { - return this.signInSettings; - } - - /** - * The SignUpSettingsInner object to access its operations. - */ - private SignUpSettingsInner signUpSettings; - - /** - * Gets the SignUpSettingsInner object to access its operations. - * @return the SignUpSettingsInner object. - */ - public SignUpSettingsInner signUpSettings() { - return this.signUpSettings; - } - - /** - * The DelegationSettingsInner object to access its operations. - */ - private DelegationSettingsInner delegationSettings; - - /** - * Gets the DelegationSettingsInner object to access its operations. - * @return the DelegationSettingsInner object. - */ - public DelegationSettingsInner delegationSettings() { - return this.delegationSettings; - } - - /** - * The ProductsInner object to access its operations. - */ - private ProductsInner products; - - /** - * Gets the ProductsInner object to access its operations. - * @return the ProductsInner object. - */ - public ProductsInner products() { - return this.products; - } - - /** - * The ProductApisInner object to access its operations. - */ - private ProductApisInner productApis; - - /** - * Gets the ProductApisInner object to access its operations. - * @return the ProductApisInner object. - */ - public ProductApisInner productApis() { - return this.productApis; - } - - /** - * The ProductGroupsInner object to access its operations. - */ - private ProductGroupsInner productGroups; - - /** - * Gets the ProductGroupsInner object to access its operations. - * @return the ProductGroupsInner object. - */ - public ProductGroupsInner productGroups() { - return this.productGroups; - } - - /** - * The ProductSubscriptionsInner object to access its operations. - */ - private ProductSubscriptionsInner productSubscriptions; - - /** - * Gets the ProductSubscriptionsInner object to access its operations. - * @return the ProductSubscriptionsInner object. - */ - public ProductSubscriptionsInner productSubscriptions() { - return this.productSubscriptions; - } - - /** - * The ProductPolicysInner object to access its operations. - */ - private ProductPolicysInner productPolicys; - - /** - * Gets the ProductPolicysInner object to access its operations. - * @return the ProductPolicysInner object. - */ - public ProductPolicysInner productPolicys() { - return this.productPolicys; - } - - /** - * The PropertysInner object to access its operations. - */ - private PropertysInner propertys; - - /** - * Gets the PropertysInner object to access its operations. - * @return the PropertysInner object. - */ - public PropertysInner propertys() { - return this.propertys; - } - - /** - * The QuotaByCounterKeysInner object to access its operations. - */ - private QuotaByCounterKeysInner quotaByCounterKeys; - - /** - * Gets the QuotaByCounterKeysInner object to access its operations. - * @return the QuotaByCounterKeysInner object. - */ - public QuotaByCounterKeysInner quotaByCounterKeys() { - return this.quotaByCounterKeys; - } - - /** - * The QuotaByPeriodKeysInner object to access its operations. - */ - private QuotaByPeriodKeysInner quotaByPeriodKeys; - - /** - * Gets the QuotaByPeriodKeysInner object to access its operations. - * @return the QuotaByPeriodKeysInner object. - */ - public QuotaByPeriodKeysInner quotaByPeriodKeys() { - return this.quotaByPeriodKeys; - } - - /** - * The ReportsInner object to access its operations. - */ - private ReportsInner reports; - - /** - * Gets the ReportsInner object to access its operations. - * @return the ReportsInner object. - */ - public ReportsInner reports() { - return this.reports; - } - - /** - * The SubscriptionsInner object to access its operations. - */ - private SubscriptionsInner subscriptions; - - /** - * Gets the SubscriptionsInner object to access its operations. - * @return the SubscriptionsInner object. - */ - public SubscriptionsInner subscriptions() { - return this.subscriptions; - } - - /** - * The TagResourcesInner object to access its operations. - */ - private TagResourcesInner tagResources; - - /** - * Gets the TagResourcesInner object to access its operations. - * @return the TagResourcesInner object. - */ - public TagResourcesInner tagResources() { - return this.tagResources; - } - - /** - * The TagsInner object to access its operations. - */ - private TagsInner tags; - - /** - * Gets the TagsInner object to access its operations. - * @return the TagsInner object. - */ - public TagsInner tags() { - return this.tags; - } - - /** - * The TagDescriptionsInner object to access its operations. - */ - private TagDescriptionsInner tagDescriptions; - - /** - * Gets the TagDescriptionsInner object to access its operations. - * @return the TagDescriptionsInner object. - */ - public TagDescriptionsInner tagDescriptions() { - return this.tagDescriptions; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * The TenantAccessInner object to access its operations. - */ - private TenantAccessInner tenantAccess; - - /** - * Gets the TenantAccessInner object to access its operations. - * @return the TenantAccessInner object. - */ - public TenantAccessInner tenantAccess() { - return this.tenantAccess; - } - - /** - * The TenantAccessGitsInner object to access its operations. - */ - private TenantAccessGitsInner tenantAccessGits; - - /** - * Gets the TenantAccessGitsInner object to access its operations. - * @return the TenantAccessGitsInner object. - */ - public TenantAccessGitsInner tenantAccessGits() { - return this.tenantAccessGits; - } - - /** - * The TenantConfigurationsInner object to access its operations. - */ - private TenantConfigurationsInner tenantConfigurations; - - /** - * Gets the TenantConfigurationsInner object to access its operations. - * @return the TenantConfigurationsInner object. - */ - public TenantConfigurationsInner tenantConfigurations() { - return this.tenantConfigurations; - } - - /** - * The UsersInner object to access its operations. - */ - private UsersInner users; - - /** - * Gets the UsersInner object to access its operations. - * @return the UsersInner object. - */ - public UsersInner users() { - return this.users; - } - - /** - * The UserGroupsInner object to access its operations. - */ - private UserGroupsInner userGroups; - - /** - * Gets the UserGroupsInner object to access its operations. - * @return the UserGroupsInner object. - */ - public UserGroupsInner userGroups() { - return this.userGroups; - } - - /** - * The UserSubscriptionsInner object to access its operations. - */ - private UserSubscriptionsInner userSubscriptions; - - /** - * Gets the UserSubscriptionsInner object to access its operations. - * @return the UserSubscriptionsInner object. - */ - public UserSubscriptionsInner userSubscriptions() { - return this.userSubscriptions; - } - - /** - * The UserIdentitiesInner object to access its operations. - */ - private UserIdentitiesInner userIdentities; - - /** - * Gets the UserIdentitiesInner object to access its operations. - * @return the UserIdentitiesInner object. - */ - public UserIdentitiesInner userIdentities() { - return this.userIdentities; - } - - /** - * The ApiVersionSetsInner object to access its operations. - */ - private ApiVersionSetsInner apiVersionSets; - - /** - * Gets the ApiVersionSetsInner object to access its operations. - * @return the ApiVersionSetsInner object. - */ - public ApiVersionSetsInner apiVersionSets() { - return this.apiVersionSets; - } - - /** - * The ApiExportsInner object to access its operations. - */ - private ApiExportsInner apiExports; - - /** - * Gets the ApiExportsInner object to access its operations. - * @return the ApiExportsInner object. - */ - public ApiExportsInner apiExports() { - return this.apiExports; - } - - /** - * Initializes an instance of ApiManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public ApiManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of ApiManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public ApiManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of ApiManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public ApiManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2018-01-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.policys = new PolicysInner(restClient().retrofit(), this); - this.policySnippets = new PolicySnippetsInner(restClient().retrofit(), this); - this.regions = new RegionsInner(restClient().retrofit(), this); - this.apis = new ApisInner(restClient().retrofit(), this); - this.apiRevisions = new ApiRevisionsInner(restClient().retrofit(), this); - this.apiReleases = new ApiReleasesInner(restClient().retrofit(), this); - this.apiOperations = new ApiOperationsInner(restClient().retrofit(), this); - this.apiOperationPolicys = new ApiOperationPolicysInner(restClient().retrofit(), this); - this.apiProducts = new ApiProductsInner(restClient().retrofit(), this); - this.apiPolicys = new ApiPolicysInner(restClient().retrofit(), this); - this.apiSchemas = new ApiSchemasInner(restClient().retrofit(), this); - this.apiDiagnostics = new ApiDiagnosticsInner(restClient().retrofit(), this); - this.apiDiagnosticLoggers = new ApiDiagnosticLoggersInner(restClient().retrofit(), this); - this.authorizationServers = new AuthorizationServersInner(restClient().retrofit(), this); - this.backends = new BackendsInner(restClient().retrofit(), this); - this.certificates = new CertificatesInner(restClient().retrofit(), this); - this.apiManagementOperations = new ApiManagementOperationsInner(restClient().retrofit(), this); - this.apiManagementServices = new ApiManagementServicesInner(restClient().retrofit(), this); - this.diagnostics = new DiagnosticsInner(restClient().retrofit(), this); - this.diagnosticLoggers = new DiagnosticLoggersInner(restClient().retrofit(), this); - this.emailTemplates = new EmailTemplatesInner(restClient().retrofit(), this); - this.groups = new GroupsInner(restClient().retrofit(), this); - this.groupUsers = new GroupUsersInner(restClient().retrofit(), this); - this.identityProviders = new IdentityProvidersInner(restClient().retrofit(), this); - this.loggers = new LoggersInner(restClient().retrofit(), this); - this.notifications = new NotificationsInner(restClient().retrofit(), this); - this.notificationRecipientUsers = new NotificationRecipientUsersInner(restClient().retrofit(), this); - this.notificationRecipientEmails = new NotificationRecipientEmailsInner(restClient().retrofit(), this); - this.networkStatus = new NetworkStatusInner(restClient().retrofit(), this); - this.openIdConnectProviders = new OpenIdConnectProvidersInner(restClient().retrofit(), this); - this.signInSettings = new SignInSettingsInner(restClient().retrofit(), this); - this.signUpSettings = new SignUpSettingsInner(restClient().retrofit(), this); - this.delegationSettings = new DelegationSettingsInner(restClient().retrofit(), this); - this.products = new ProductsInner(restClient().retrofit(), this); - this.productApis = new ProductApisInner(restClient().retrofit(), this); - this.productGroups = new ProductGroupsInner(restClient().retrofit(), this); - this.productSubscriptions = new ProductSubscriptionsInner(restClient().retrofit(), this); - this.productPolicys = new ProductPolicysInner(restClient().retrofit(), this); - this.propertys = new PropertysInner(restClient().retrofit(), this); - this.quotaByCounterKeys = new QuotaByCounterKeysInner(restClient().retrofit(), this); - this.quotaByPeriodKeys = new QuotaByPeriodKeysInner(restClient().retrofit(), this); - this.reports = new ReportsInner(restClient().retrofit(), this); - this.subscriptions = new SubscriptionsInner(restClient().retrofit(), this); - this.tagResources = new TagResourcesInner(restClient().retrofit(), this); - this.tags = new TagsInner(restClient().retrofit(), this); - this.tagDescriptions = new TagDescriptionsInner(restClient().retrofit(), this); - this.operations = new OperationsInner(restClient().retrofit(), this); - this.tenantAccess = new TenantAccessInner(restClient().retrofit(), this); - this.tenantAccessGits = new TenantAccessGitsInner(restClient().retrofit(), this); - this.tenantConfigurations = new TenantConfigurationsInner(restClient().retrofit(), this); - this.users = new UsersInner(restClient().retrofit(), this); - this.userGroups = new UserGroupsInner(restClient().retrofit(), this); - this.userSubscriptions = new UserSubscriptionsInner(restClient().retrofit(), this); - this.userIdentities = new UserIdentitiesInner(restClient().retrofit(), this); - this.apiVersionSets = new ApiVersionSetsInner(restClient().retrofit(), this); - this.apiExports = new ApiExportsInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "ApiManagementClient", "2018-01-01"); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementManager.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementManager.java deleted file mode 100644 index 700ce52ae0a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure ApiManagement resource management. - */ -@Beta(SinceVersion.V1_8_0) -public final class ApiManagementManager extends Manager { - /** - * Get a Configurable instance that can be used to create ApiManagementManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new ApiManagementManager.ConfigurableImpl(); - } - /** - * Creates an instance of ApiManagementManager that exposes ApiManagement resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the ApiManagementManager - */ - public static ApiManagementManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new ApiManagementManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .build(), subscriptionId); - } - /** - * Creates an instance of ApiManagementManager that exposes ApiManagement resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the ApiManagementManager - */ - public static ApiManagementManager authenticate(RestClient restClient, String subscriptionId) { - return new ApiManagementManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of ApiManagementManager that exposes ApiManagement management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing ApiManagement management API entry points that work across subscriptions - */ - ApiManagementManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public ApiManagementManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return ApiManagementManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private ApiManagementManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new ApiManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementOperationsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementOperationsInner.java deleted file mode 100644 index 78a5e27737e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementOperationsInner.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiManagementOperations. - */ -public class ApiManagementOperationsInner { - /** The Retrofit service to perform REST calls. */ - private ApiManagementOperationsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiManagementOperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiManagementOperationsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiManagementOperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiManagementOperations to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiManagementOperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementOperations list" }) - @GET("providers/Microsoft.ApiManagement/operations") - Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementOperations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceBackupRestoreParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceBackupRestoreParametersInner.java deleted file mode 100644 index 86a79476769..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceBackupRestoreParametersInner.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Backup/Restore of an API Management service - * operation. - */ -public class ApiManagementServiceBackupRestoreParametersInner { - /** - * Azure Cloud Storage account (used to place/retrieve the backup) name. - */ - @JsonProperty(value = "storageAccount", required = true) - private String storageAccount; - - /** - * Azure Cloud Storage account (used to place/retrieve the backup) access - * key. - */ - @JsonProperty(value = "accessKey", required = true) - private String accessKey; - - /** - * Azure Cloud Storage blob container name used to place/retrieve the - * backup. - */ - @JsonProperty(value = "containerName", required = true) - private String containerName; - - /** - * The name of the backup file to create. - */ - @JsonProperty(value = "backupName", required = true) - private String backupName; - - /** - * Get the storageAccount value. - * - * @return the storageAccount value - */ - public String storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount value. - * - * @param storageAccount the storageAccount value to set - * @return the ApiManagementServiceBackupRestoreParametersInner object itself. - */ - public ApiManagementServiceBackupRestoreParametersInner withStorageAccount(String storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Get the accessKey value. - * - * @return the accessKey value - */ - public String accessKey() { - return this.accessKey; - } - - /** - * Set the accessKey value. - * - * @param accessKey the accessKey value to set - * @return the ApiManagementServiceBackupRestoreParametersInner object itself. - */ - public ApiManagementServiceBackupRestoreParametersInner withAccessKey(String accessKey) { - this.accessKey = accessKey; - return this; - } - - /** - * Get the containerName value. - * - * @return the containerName value - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName value. - * - * @param containerName the containerName value to set - * @return the ApiManagementServiceBackupRestoreParametersInner object itself. - */ - public ApiManagementServiceBackupRestoreParametersInner withContainerName(String containerName) { - this.containerName = containerName; - return this; - } - - /** - * Get the backupName value. - * - * @return the backupName value - */ - public String backupName() { - return this.backupName; - } - - /** - * Set the backupName value. - * - * @param backupName the backupName value to set - * @return the ApiManagementServiceBackupRestoreParametersInner object itself. - */ - public ApiManagementServiceBackupRestoreParametersInner withBackupName(String backupName) { - this.backupName = backupName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceGetSsoTokenResultInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceGetSsoTokenResultInner.java deleted file mode 100644 index 1cdcd3fa359..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceGetSsoTokenResultInner.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The response of the GetSsoToken operation. - */ -public class ApiManagementServiceGetSsoTokenResultInner { - /** - * Redirect URL to the Publisher Portal containing the SSO token. - */ - @JsonProperty(value = "redirectUri") - private String redirectUri; - - /** - * Get the redirectUri value. - * - * @return the redirectUri value - */ - public String redirectUri() { - return this.redirectUri; - } - - /** - * Set the redirectUri value. - * - * @param redirectUri the redirectUri value to set - * @return the ApiManagementServiceGetSsoTokenResultInner object itself. - */ - public ApiManagementServiceGetSsoTokenResultInner withRedirectUri(String redirectUri) { - this.redirectUri = redirectUri; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceNameAvailabilityResultInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceNameAvailabilityResultInner.java deleted file mode 100644 index 928b1fcab5a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceNameAvailabilityResultInner.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.NameAvailabilityReason; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Response of the CheckNameAvailability operation. - */ -public class ApiManagementServiceNameAvailabilityResultInner { - /** - * True if the name is available and can be used to create a new API - * Management service; otherwise false. - */ - @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean nameAvailable; - - /** - * If reason == invalid, provide the user with the reason why the given - * name is invalid, and provide the resource naming requirements so that - * the user can select a valid name. If reason == AlreadyExists, explain - * that <resourceName> is already in use, and direct them to select a - * different name. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * Invalid indicates the name provided does not match the resource - * provider’s naming requirements (incorrect length, unsupported - * characters, etc.) AlreadyExists indicates that the name is already in - * use and is therefore unavailable. Possible values include: 'Valid', - * 'Invalid', 'AlreadyExists'. - */ - @JsonProperty(value = "reason") - private NameAvailabilityReason reason; - - /** - * Get the nameAvailable value. - * - * @return the nameAvailable value - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Get the reason value. - * - * @return the reason value - */ - public NameAvailabilityReason reason() { - return this.reason; - } - - /** - * Set the reason value. - * - * @param reason the reason value to set - * @return the ApiManagementServiceNameAvailabilityResultInner object itself. - */ - public ApiManagementServiceNameAvailabilityResultInner withReason(NameAvailabilityReason reason) { - this.reason = reason; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceResourceInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceResourceInner.java deleted file mode 100644 index 2c95b7f96c6..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceResourceInner.java +++ /dev/null @@ -1,529 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import java.util.List; -import com.microsoft.azure.management.apimanagement.HostnameConfiguration; -import com.microsoft.azure.management.apimanagement.VirtualNetworkConfiguration; -import com.microsoft.azure.management.apimanagement.AdditionalLocation; -import java.util.Map; -import com.microsoft.azure.management.apimanagement.CertificateConfiguration; -import com.microsoft.azure.management.apimanagement.VirtualNetworkType; -import com.microsoft.azure.management.apimanagement.ApiManagementServiceSkuProperties; -import com.microsoft.azure.management.apimanagement.ApiManagementServiceIdentity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.apimanagement.ApimResource; - -/** - * A single API Management service resource in List or Get response. - */ -@JsonFlatten -public class ApiManagementServiceResourceInner extends ApimResource { - /** - * Email address from which the notification will be sent. - */ - @JsonProperty(value = "properties.notificationSenderEmail") - private String notificationSenderEmail; - - /** - * The current provisioning state of the API Management service which can - * be one of the following: - * Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The provisioning state of the API Management service, which is targeted - * by the long running operation started on the service. - */ - @JsonProperty(value = "properties.targetProvisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String targetProvisioningState; - - /** - * Creation UTC date of the API Management service.The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "properties.createdAtUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdAtUtc; - - /** - * Gateway URL of the API Management service. - */ - @JsonProperty(value = "properties.gatewayUrl", access = JsonProperty.Access.WRITE_ONLY) - private String gatewayUrl; - - /** - * Gateway URL of the API Management service in the Default Region. - */ - @JsonProperty(value = "properties.gatewayRegionalUrl", access = JsonProperty.Access.WRITE_ONLY) - private String gatewayRegionalUrl; - - /** - * Publisher portal endpoint Url of the API Management service. - */ - @JsonProperty(value = "properties.portalUrl", access = JsonProperty.Access.WRITE_ONLY) - private String portalUrl; - - /** - * Management API endpoint URL of the API Management service. - */ - @JsonProperty(value = "properties.managementApiUrl", access = JsonProperty.Access.WRITE_ONLY) - private String managementApiUrl; - - /** - * SCM endpoint URL of the API Management service. - */ - @JsonProperty(value = "properties.scmUrl", access = JsonProperty.Access.WRITE_ONLY) - private String scmUrl; - - /** - * Custom hostname configuration of the API Management service. - */ - @JsonProperty(value = "properties.hostnameConfigurations") - private List hostnameConfigurations; - - /** - * Public Static Load Balanced IP addresses of the API Management service. - * Available only for Basic, Standard and Premium SKU. - */ - @JsonProperty(value = "properties.publicIPAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List publicIPAddresses; - - /** - * Private Static Load Balanced IP addresses of the API Management service - * which is deployed in an Internal Virtual Network. Available only for - * Basic, Standard and Premium SKU. - */ - @JsonProperty(value = "properties.privateIPAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List privateIPAddresses; - - /** - * Virtual network configuration of the API Management service. - */ - @JsonProperty(value = "properties.virtualNetworkConfiguration") - private VirtualNetworkConfiguration virtualNetworkConfiguration; - - /** - * Additional datacenter locations of the API Management service. - */ - @JsonProperty(value = "properties.additionalLocations") - private List additionalLocations; - - /** - * Custom properties of the API Management service. Setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - * will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, - * 1.1 and 1.2). Setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - * can be used to disable just TLS 1.1 and setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - * can be used to disable TLS 1.0 on an API Management service. - */ - @JsonProperty(value = "properties.customProperties") - private Map customProperties; - - /** - * List of Certificates that need to be installed in the API Management - * service. Max supported certificates that can be installed is 10. - */ - @JsonProperty(value = "properties.certificates") - private List certificates; - - /** - * The type of VPN in which API Managemet service needs to be configured - * in. None (Default Value) means the API Management service is not part of - * any Virtual Network, External means the API Management deployment is set - * up inside a Virtual Network having an Internet Facing Endpoint, and - * Internal means that API Management deployment is setup inside a Virtual - * Network having an Intranet Facing Endpoint only. Possible values - * include: 'None', 'External', 'Internal'. - */ - @JsonProperty(value = "properties.virtualNetworkType") - private VirtualNetworkType virtualNetworkType; - - /** - * Publisher email. - */ - @JsonProperty(value = "properties.publisherEmail", required = true) - private String publisherEmail; - - /** - * Publisher name. - */ - @JsonProperty(value = "properties.publisherName", required = true) - private String publisherName; - - /** - * SKU properties of the API Management service. - */ - @JsonProperty(value = "sku", required = true) - private ApiManagementServiceSkuProperties sku; - - /** - * Managed service identity of the Api Management service. - */ - @JsonProperty(value = "identity") - private ApiManagementServiceIdentity identity; - - /** - * Resource location. - */ - @JsonProperty(value = "location", required = true) - private String location; - - /** - * ETag of the resource. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the notificationSenderEmail value. - * - * @return the notificationSenderEmail value - */ - public String notificationSenderEmail() { - return this.notificationSenderEmail; - } - - /** - * Set the notificationSenderEmail value. - * - * @param notificationSenderEmail the notificationSenderEmail value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withNotificationSenderEmail(String notificationSenderEmail) { - this.notificationSenderEmail = notificationSenderEmail; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the targetProvisioningState value. - * - * @return the targetProvisioningState value - */ - public String targetProvisioningState() { - return this.targetProvisioningState; - } - - /** - * Get the createdAtUtc value. - * - * @return the createdAtUtc value - */ - public DateTime createdAtUtc() { - return this.createdAtUtc; - } - - /** - * Get the gatewayUrl value. - * - * @return the gatewayUrl value - */ - public String gatewayUrl() { - return this.gatewayUrl; - } - - /** - * Get the gatewayRegionalUrl value. - * - * @return the gatewayRegionalUrl value - */ - public String gatewayRegionalUrl() { - return this.gatewayRegionalUrl; - } - - /** - * Get the portalUrl value. - * - * @return the portalUrl value - */ - public String portalUrl() { - return this.portalUrl; - } - - /** - * Get the managementApiUrl value. - * - * @return the managementApiUrl value - */ - public String managementApiUrl() { - return this.managementApiUrl; - } - - /** - * Get the scmUrl value. - * - * @return the scmUrl value - */ - public String scmUrl() { - return this.scmUrl; - } - - /** - * Get the hostnameConfigurations value. - * - * @return the hostnameConfigurations value - */ - public List hostnameConfigurations() { - return this.hostnameConfigurations; - } - - /** - * Set the hostnameConfigurations value. - * - * @param hostnameConfigurations the hostnameConfigurations value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withHostnameConfigurations(List hostnameConfigurations) { - this.hostnameConfigurations = hostnameConfigurations; - return this; - } - - /** - * Get the publicIPAddresses value. - * - * @return the publicIPAddresses value - */ - public List publicIPAddresses() { - return this.publicIPAddresses; - } - - /** - * Get the privateIPAddresses value. - * - * @return the privateIPAddresses value - */ - public List privateIPAddresses() { - return this.privateIPAddresses; - } - - /** - * Get the virtualNetworkConfiguration value. - * - * @return the virtualNetworkConfiguration value - */ - public VirtualNetworkConfiguration virtualNetworkConfiguration() { - return this.virtualNetworkConfiguration; - } - - /** - * Set the virtualNetworkConfiguration value. - * - * @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration) { - this.virtualNetworkConfiguration = virtualNetworkConfiguration; - return this; - } - - /** - * Get the additionalLocations value. - * - * @return the additionalLocations value - */ - public List additionalLocations() { - return this.additionalLocations; - } - - /** - * Set the additionalLocations value. - * - * @param additionalLocations the additionalLocations value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withAdditionalLocations(List additionalLocations) { - this.additionalLocations = additionalLocations; - return this; - } - - /** - * Get the customProperties value. - * - * @return the customProperties value - */ - public Map customProperties() { - return this.customProperties; - } - - /** - * Set the customProperties value. - * - * @param customProperties the customProperties value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withCustomProperties(Map customProperties) { - this.customProperties = customProperties; - return this; - } - - /** - * Get the certificates value. - * - * @return the certificates value - */ - public List certificates() { - return this.certificates; - } - - /** - * Set the certificates value. - * - * @param certificates the certificates value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withCertificates(List certificates) { - this.certificates = certificates; - return this; - } - - /** - * Get the virtualNetworkType value. - * - * @return the virtualNetworkType value - */ - public VirtualNetworkType virtualNetworkType() { - return this.virtualNetworkType; - } - - /** - * Set the virtualNetworkType value. - * - * @param virtualNetworkType the virtualNetworkType value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withVirtualNetworkType(VirtualNetworkType virtualNetworkType) { - this.virtualNetworkType = virtualNetworkType; - return this; - } - - /** - * Get the publisherEmail value. - * - * @return the publisherEmail value - */ - public String publisherEmail() { - return this.publisherEmail; - } - - /** - * Set the publisherEmail value. - * - * @param publisherEmail the publisherEmail value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withPublisherEmail(String publisherEmail) { - this.publisherEmail = publisherEmail; - return this; - } - - /** - * Get the publisherName value. - * - * @return the publisherName value - */ - public String publisherName() { - return this.publisherName; - } - - /** - * Set the publisherName value. - * - * @param publisherName the publisherName value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withPublisherName(String publisherName) { - this.publisherName = publisherName; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public ApiManagementServiceSkuProperties sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withSku(ApiManagementServiceSkuProperties sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity value. - * - * @return the identity value - */ - public ApiManagementServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity value. - * - * @param identity the identity value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withIdentity(ApiManagementServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the ApiManagementServiceResourceInner object itself. - */ - public ApiManagementServiceResourceInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUpdateHostnameParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUpdateHostnameParametersInner.java deleted file mode 100644 index f21dbb7258e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUpdateHostnameParametersInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.HostnameConfigurationOld; -import com.microsoft.azure.management.apimanagement.HostnameType; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the UpdateHostname operation. - */ -public class ApiManagementServiceUpdateHostnameParametersInner { - /** - * Hostnames to create or update. - */ - @JsonProperty(value = "update") - private List update; - - /** - * Hostnames types to delete. - */ - @JsonProperty(value = "delete") - private List delete; - - /** - * Get the update value. - * - * @return the update value - */ - public List update() { - return this.update; - } - - /** - * Set the update value. - * - * @param update the update value to set - * @return the ApiManagementServiceUpdateHostnameParametersInner object itself. - */ - public ApiManagementServiceUpdateHostnameParametersInner withUpdate(List update) { - this.update = update; - return this; - } - - /** - * Get the delete value. - * - * @return the delete value - */ - public List delete() { - return this.delete; - } - - /** - * Set the delete value. - * - * @param delete the delete value to set - * @return the ApiManagementServiceUpdateHostnameParametersInner object itself. - */ - public ApiManagementServiceUpdateHostnameParametersInner withDelete(List delete) { - this.delete = delete; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUpdateParametersInner.java deleted file mode 100644 index 2c34304f5cd..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUpdateParametersInner.java +++ /dev/null @@ -1,503 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import java.util.List; -import com.microsoft.azure.management.apimanagement.HostnameConfiguration; -import com.microsoft.azure.management.apimanagement.VirtualNetworkConfiguration; -import com.microsoft.azure.management.apimanagement.AdditionalLocation; -import java.util.Map; -import com.microsoft.azure.management.apimanagement.CertificateConfiguration; -import com.microsoft.azure.management.apimanagement.VirtualNetworkType; -import com.microsoft.azure.management.apimanagement.ApiManagementServiceSkuProperties; -import com.microsoft.azure.management.apimanagement.ApiManagementServiceIdentity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.apimanagement.ApimResource; - -/** - * Parameter supplied to Update Api Management Service. - */ -@JsonFlatten -public class ApiManagementServiceUpdateParametersInner extends ApimResource { - /** - * Email address from which the notification will be sent. - */ - @JsonProperty(value = "properties.notificationSenderEmail") - private String notificationSenderEmail; - - /** - * The current provisioning state of the API Management service which can - * be one of the following: - * Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The provisioning state of the API Management service, which is targeted - * by the long running operation started on the service. - */ - @JsonProperty(value = "properties.targetProvisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String targetProvisioningState; - - /** - * Creation UTC date of the API Management service.The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "properties.createdAtUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdAtUtc; - - /** - * Gateway URL of the API Management service. - */ - @JsonProperty(value = "properties.gatewayUrl", access = JsonProperty.Access.WRITE_ONLY) - private String gatewayUrl; - - /** - * Gateway URL of the API Management service in the Default Region. - */ - @JsonProperty(value = "properties.gatewayRegionalUrl", access = JsonProperty.Access.WRITE_ONLY) - private String gatewayRegionalUrl; - - /** - * Publisher portal endpoint Url of the API Management service. - */ - @JsonProperty(value = "properties.portalUrl", access = JsonProperty.Access.WRITE_ONLY) - private String portalUrl; - - /** - * Management API endpoint URL of the API Management service. - */ - @JsonProperty(value = "properties.managementApiUrl", access = JsonProperty.Access.WRITE_ONLY) - private String managementApiUrl; - - /** - * SCM endpoint URL of the API Management service. - */ - @JsonProperty(value = "properties.scmUrl", access = JsonProperty.Access.WRITE_ONLY) - private String scmUrl; - - /** - * Custom hostname configuration of the API Management service. - */ - @JsonProperty(value = "properties.hostnameConfigurations") - private List hostnameConfigurations; - - /** - * Public Static Load Balanced IP addresses of the API Management service. - * Available only for Basic, Standard and Premium SKU. - */ - @JsonProperty(value = "properties.publicIPAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List publicIPAddresses; - - /** - * Private Static Load Balanced IP addresses of the API Management service - * which is deployed in an Internal Virtual Network. Available only for - * Basic, Standard and Premium SKU. - */ - @JsonProperty(value = "properties.privateIPAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List privateIPAddresses; - - /** - * Virtual network configuration of the API Management service. - */ - @JsonProperty(value = "properties.virtualNetworkConfiguration") - private VirtualNetworkConfiguration virtualNetworkConfiguration; - - /** - * Additional datacenter locations of the API Management service. - */ - @JsonProperty(value = "properties.additionalLocations") - private List additionalLocations; - - /** - * Custom properties of the API Management service. Setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - * will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, - * 1.1 and 1.2). Setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - * can be used to disable just TLS 1.1 and setting - * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - * can be used to disable TLS 1.0 on an API Management service. - */ - @JsonProperty(value = "properties.customProperties") - private Map customProperties; - - /** - * List of Certificates that need to be installed in the API Management - * service. Max supported certificates that can be installed is 10. - */ - @JsonProperty(value = "properties.certificates") - private List certificates; - - /** - * The type of VPN in which API Managemet service needs to be configured - * in. None (Default Value) means the API Management service is not part of - * any Virtual Network, External means the API Management deployment is set - * up inside a Virtual Network having an Internet Facing Endpoint, and - * Internal means that API Management deployment is setup inside a Virtual - * Network having an Intranet Facing Endpoint only. Possible values - * include: 'None', 'External', 'Internal'. - */ - @JsonProperty(value = "properties.virtualNetworkType") - private VirtualNetworkType virtualNetworkType; - - /** - * Publisher email. - */ - @JsonProperty(value = "properties.publisherEmail") - private String publisherEmail; - - /** - * Publisher name. - */ - @JsonProperty(value = "properties.publisherName") - private String publisherName; - - /** - * SKU properties of the API Management service. - */ - @JsonProperty(value = "sku") - private ApiManagementServiceSkuProperties sku; - - /** - * Managed service identity of the Api Management service. - */ - @JsonProperty(value = "identity") - private ApiManagementServiceIdentity identity; - - /** - * ETag of the resource. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the notificationSenderEmail value. - * - * @return the notificationSenderEmail value - */ - public String notificationSenderEmail() { - return this.notificationSenderEmail; - } - - /** - * Set the notificationSenderEmail value. - * - * @param notificationSenderEmail the notificationSenderEmail value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withNotificationSenderEmail(String notificationSenderEmail) { - this.notificationSenderEmail = notificationSenderEmail; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the targetProvisioningState value. - * - * @return the targetProvisioningState value - */ - public String targetProvisioningState() { - return this.targetProvisioningState; - } - - /** - * Get the createdAtUtc value. - * - * @return the createdAtUtc value - */ - public DateTime createdAtUtc() { - return this.createdAtUtc; - } - - /** - * Get the gatewayUrl value. - * - * @return the gatewayUrl value - */ - public String gatewayUrl() { - return this.gatewayUrl; - } - - /** - * Get the gatewayRegionalUrl value. - * - * @return the gatewayRegionalUrl value - */ - public String gatewayRegionalUrl() { - return this.gatewayRegionalUrl; - } - - /** - * Get the portalUrl value. - * - * @return the portalUrl value - */ - public String portalUrl() { - return this.portalUrl; - } - - /** - * Get the managementApiUrl value. - * - * @return the managementApiUrl value - */ - public String managementApiUrl() { - return this.managementApiUrl; - } - - /** - * Get the scmUrl value. - * - * @return the scmUrl value - */ - public String scmUrl() { - return this.scmUrl; - } - - /** - * Get the hostnameConfigurations value. - * - * @return the hostnameConfigurations value - */ - public List hostnameConfigurations() { - return this.hostnameConfigurations; - } - - /** - * Set the hostnameConfigurations value. - * - * @param hostnameConfigurations the hostnameConfigurations value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withHostnameConfigurations(List hostnameConfigurations) { - this.hostnameConfigurations = hostnameConfigurations; - return this; - } - - /** - * Get the publicIPAddresses value. - * - * @return the publicIPAddresses value - */ - public List publicIPAddresses() { - return this.publicIPAddresses; - } - - /** - * Get the privateIPAddresses value. - * - * @return the privateIPAddresses value - */ - public List privateIPAddresses() { - return this.privateIPAddresses; - } - - /** - * Get the virtualNetworkConfiguration value. - * - * @return the virtualNetworkConfiguration value - */ - public VirtualNetworkConfiguration virtualNetworkConfiguration() { - return this.virtualNetworkConfiguration; - } - - /** - * Set the virtualNetworkConfiguration value. - * - * @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration) { - this.virtualNetworkConfiguration = virtualNetworkConfiguration; - return this; - } - - /** - * Get the additionalLocations value. - * - * @return the additionalLocations value - */ - public List additionalLocations() { - return this.additionalLocations; - } - - /** - * Set the additionalLocations value. - * - * @param additionalLocations the additionalLocations value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withAdditionalLocations(List additionalLocations) { - this.additionalLocations = additionalLocations; - return this; - } - - /** - * Get the customProperties value. - * - * @return the customProperties value - */ - public Map customProperties() { - return this.customProperties; - } - - /** - * Set the customProperties value. - * - * @param customProperties the customProperties value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withCustomProperties(Map customProperties) { - this.customProperties = customProperties; - return this; - } - - /** - * Get the certificates value. - * - * @return the certificates value - */ - public List certificates() { - return this.certificates; - } - - /** - * Set the certificates value. - * - * @param certificates the certificates value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withCertificates(List certificates) { - this.certificates = certificates; - return this; - } - - /** - * Get the virtualNetworkType value. - * - * @return the virtualNetworkType value - */ - public VirtualNetworkType virtualNetworkType() { - return this.virtualNetworkType; - } - - /** - * Set the virtualNetworkType value. - * - * @param virtualNetworkType the virtualNetworkType value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withVirtualNetworkType(VirtualNetworkType virtualNetworkType) { - this.virtualNetworkType = virtualNetworkType; - return this; - } - - /** - * Get the publisherEmail value. - * - * @return the publisherEmail value - */ - public String publisherEmail() { - return this.publisherEmail; - } - - /** - * Set the publisherEmail value. - * - * @param publisherEmail the publisherEmail value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withPublisherEmail(String publisherEmail) { - this.publisherEmail = publisherEmail; - return this; - } - - /** - * Get the publisherName value. - * - * @return the publisherName value - */ - public String publisherName() { - return this.publisherName; - } - - /** - * Set the publisherName value. - * - * @param publisherName the publisherName value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withPublisherName(String publisherName) { - this.publisherName = publisherName; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public ApiManagementServiceSkuProperties sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withSku(ApiManagementServiceSkuProperties sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity value. - * - * @return the identity value - */ - public ApiManagementServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity value. - * - * @param identity the identity value to set - * @return the ApiManagementServiceUpdateParametersInner object itself. - */ - public ApiManagementServiceUpdateParametersInner withIdentity(ApiManagementServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUploadCertificateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUploadCertificateParametersInner.java deleted file mode 100644 index 7f31a71e066..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServiceUploadCertificateParametersInner.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.HostnameType; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Upload SSL certificate for an API Management - * service operation. - */ -public class ApiManagementServiceUploadCertificateParametersInner { - /** - * Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', - * 'Scm'. - */ - @JsonProperty(value = "type", required = true) - private HostnameType type; - - /** - * Base64 Encoded certificate. - */ - @JsonProperty(value = "certificate", required = true) - private String certificate; - - /** - * Certificate password. - */ - @JsonProperty(value = "certificate_password", required = true) - private String certificatePassword; - - /** - * Get the type value. - * - * @return the type value - */ - public HostnameType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ApiManagementServiceUploadCertificateParametersInner object itself. - */ - public ApiManagementServiceUploadCertificateParametersInner withType(HostnameType type) { - this.type = type; - return this; - } - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public String certificate() { - return this.certificate; - } - - /** - * Set the certificate value. - * - * @param certificate the certificate value to set - * @return the ApiManagementServiceUploadCertificateParametersInner object itself. - */ - public ApiManagementServiceUploadCertificateParametersInner withCertificate(String certificate) { - this.certificate = certificate; - return this; - } - - /** - * Get the certificatePassword value. - * - * @return the certificatePassword value - */ - public String certificatePassword() { - return this.certificatePassword; - } - - /** - * Set the certificatePassword value. - * - * @param certificatePassword the certificatePassword value to set - * @return the ApiManagementServiceUploadCertificateParametersInner object itself. - */ - public ApiManagementServiceUploadCertificateParametersInner withCertificatePassword(String certificatePassword) { - this.certificatePassword = certificatePassword; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServicesInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServicesInner.java deleted file mode 100644 index d4d6bfb1cf6..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiManagementServicesInner.java +++ /dev/null @@ -1,2222 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ApiManagementServiceApplyNetworkConfigurationParameters; -import com.microsoft.azure.management.apimanagement.ApiManagementServiceCheckNameAvailabilityParameters; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiManagementServices. - */ -public class ApiManagementServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private ApiManagementServicesService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiManagementServicesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiManagementServicesInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiManagementServicesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiManagementServices to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiManagementServicesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices restore" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore") - Observable> restore(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceBackupRestoreParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices beginRestore" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore") - Observable> beginRestore(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceBackupRestoreParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices backup" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup") - Observable> backup(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceBackupRestoreParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices beginBackup" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup") - Observable> beginBackup(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceBackupRestoreParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceResourceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceResourceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices beginUpdate" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}") - Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices getSsoToken" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken") - Observable> getSsoToken(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices checkNameAvailability" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability") - Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ApiManagementServiceCheckNameAvailabilityParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices applyNetworkConfigurationUpdates" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates") - Observable> applyNetworkConfigurationUpdates(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ApiManagementServiceApplyNetworkConfigurationParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices beginApplyNetworkConfigurationUpdates" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates") - Observable> beginApplyNetworkConfigurationUpdates(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ApiManagementServiceApplyNetworkConfigurationParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices uploadCertificate" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatecertificate") - Observable> uploadCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceUploadCertificateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices updateHostname" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatehostname") - Observable> updateHostname(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceUpdateHostnameParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices beginUpdateHostname" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatehostname") - Observable> beginUpdateHostname(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body ApiManagementServiceUpdateHostnameParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiManagementServices listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner restore(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - return restoreWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture restoreAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(restoreWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable restoreAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - return restoreWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> restoreWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.restore(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner beginRestore(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - return beginRestoreWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginRestoreAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginRestoreWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable beginRestoreAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - return beginRestoreWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable> beginRestoreWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginRestore(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginRestoreDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginRestoreDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner backup(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - return backupWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture backupAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(backupWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable backupAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - return backupWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> backupWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.backup(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner beginBackup(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - return beginBackupWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginBackupAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginBackupWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable beginBackupAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - return beginBackupWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable> beginBackupWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginBackup(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginBackupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginBackupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner createOrUpdate(String resourceGroupName, String serviceName, ApiManagementServiceResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, ApiManagementServiceResourceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, ApiManagementServiceResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceResourceInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceName, ApiManagementServiceResourceInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, ApiManagementServiceResourceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, ApiManagementServiceResourceInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceResourceInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner update(String resourceGroupName, String serviceName, ApiManagementServiceUpdateParametersInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); - } - - /** - * Updates an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Updates an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateParametersInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.update(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner beginUpdate(String resourceGroupName, String serviceName, ApiManagementServiceUpdateParametersInner parameters) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Updates an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Updates an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable beginUpdateAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateParametersInner parameters) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an API Management service resource description. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner getByResourceGroup(String resourceGroupName, String serviceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets an API Management service resource description. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets an API Management service resource description. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String serviceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an API Management service resource description. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Deletes an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Deletes an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an existing API Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List all API Management services within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiManagementServiceResourceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List all API Management services within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List all API Management services within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiManagementServiceResourceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List all API Management services within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiManagementServiceResourceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List all API Management services within a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiManagementServiceResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiManagementServiceResourceInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiManagementServiceResourceInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiManagementServiceResourceInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiManagementServiceResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceGetSsoTokenResultInner object if successful. - */ - public ApiManagementServiceGetSsoTokenResultInner getSsoToken(String resourceGroupName, String serviceName) { - return getSsoTokenWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getSsoTokenAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getSsoTokenWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceGetSsoTokenResultInner object - */ - public Observable getSsoTokenAsync(String resourceGroupName, String serviceName) { - return getSsoTokenWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ApiManagementServiceGetSsoTokenResultInner>() { - @Override - public ApiManagementServiceGetSsoTokenResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceGetSsoTokenResultInner object - */ - public Observable> getSsoTokenWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSsoToken(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getSsoTokenDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getSsoTokenDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Checks availability and correctness of a name for an API Management service. - * - * @param name The name to check for availability. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceNameAvailabilityResultInner object if successful. - */ - public ApiManagementServiceNameAvailabilityResultInner checkNameAvailability(String name) { - return checkNameAvailabilityWithServiceResponseAsync(name).toBlocking().single().body(); - } - - /** - * Checks availability and correctness of a name for an API Management service. - * - * @param name The name to check for availability. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkNameAvailabilityAsync(String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback); - } - - /** - * Checks availability and correctness of a name for an API Management service. - * - * @param name The name to check for availability. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceNameAvailabilityResultInner object - */ - public Observable checkNameAvailabilityAsync(String name) { - return checkNameAvailabilityWithServiceResponseAsync(name).map(new Func1, ApiManagementServiceNameAvailabilityResultInner>() { - @Override - public ApiManagementServiceNameAvailabilityResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks availability and correctness of a name for an API Management service. - * - * @param name The name to check for availability. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceNameAvailabilityResultInner object - */ - public Observable> checkNameAvailabilityWithServiceResponseAsync(String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - ApiManagementServiceCheckNameAvailabilityParameters parameters = new ApiManagementServiceCheckNameAvailabilityParameters(); - parameters.withName(name); - return service.checkNameAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner applyNetworkConfigurationUpdates(String resourceGroupName, String serviceName) { - return applyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().last().body(); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture applyNetworkConfigurationUpdatesAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(applyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable applyNetworkConfigurationUpdatesAsync(String resourceGroupName, String serviceName) { - return applyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> applyNetworkConfigurationUpdatesWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String location = null; - ApiManagementServiceApplyNetworkConfigurationParameters parameters = new ApiManagementServiceApplyNetworkConfigurationParameters(); - parameters.withLocation(null); - Observable> observable = service.applyNetworkConfigurationUpdates(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param location Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner applyNetworkConfigurationUpdates(String resourceGroupName, String serviceName, String location) { - return applyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName, location).toBlocking().last().body(); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param location Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture applyNetworkConfigurationUpdatesAsync(String resourceGroupName, String serviceName, String location, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(applyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName, location), serviceCallback); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param location Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable applyNetworkConfigurationUpdatesAsync(String resourceGroupName, String serviceName, String location) { - return applyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName, location).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param location Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> applyNetworkConfigurationUpdatesWithServiceResponseAsync(String resourceGroupName, String serviceName, String location) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - ApiManagementServiceApplyNetworkConfigurationParameters parameters = null; - if (location != null) { - parameters = new ApiManagementServiceApplyNetworkConfigurationParameters(); - parameters.withLocation(location); - } - Observable> observable = service.applyNetworkConfigurationUpdates(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner beginApplyNetworkConfigurationUpdates(String resourceGroupName, String serviceName) { - return beginApplyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginApplyNetworkConfigurationUpdatesAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginApplyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable beginApplyNetworkConfigurationUpdatesAsync(String resourceGroupName, String serviceName) { - return beginApplyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable> beginApplyNetworkConfigurationUpdatesWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String location = null; - ApiManagementServiceApplyNetworkConfigurationParameters parameters = new ApiManagementServiceApplyNetworkConfigurationParameters(); - parameters.withLocation(null); - return service.beginApplyNetworkConfigurationUpdates(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginApplyNetworkConfigurationUpdatesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param location Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner beginApplyNetworkConfigurationUpdates(String resourceGroupName, String serviceName, String location) { - return beginApplyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName, location).toBlocking().single().body(); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param location Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginApplyNetworkConfigurationUpdatesAsync(String resourceGroupName, String serviceName, String location, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginApplyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName, location), serviceCallback); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param location Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable beginApplyNetworkConfigurationUpdatesAsync(String resourceGroupName, String serviceName, String location) { - return beginApplyNetworkConfigurationUpdatesWithServiceResponseAsync(resourceGroupName, serviceName, location).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated network settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param location Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable> beginApplyNetworkConfigurationUpdatesWithServiceResponseAsync(String resourceGroupName, String serviceName, String location) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - ApiManagementServiceApplyNetworkConfigurationParameters parameters = null; - if (location != null) { - parameters = new ApiManagementServiceApplyNetworkConfigurationParameters(); - parameters.withLocation(location); - } - return service.beginApplyNetworkConfigurationUpdates(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginApplyNetworkConfigurationUpdatesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginApplyNetworkConfigurationUpdatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Upload Custom Domain SSL certificate for an API Management service. This operation will be deprecated in future releases. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Upload SSL certificate for an API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CertificateInformationInner object if successful. - */ - public CertificateInformationInner uploadCertificate(String resourceGroupName, String serviceName, ApiManagementServiceUploadCertificateParametersInner parameters) { - return uploadCertificateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Upload Custom Domain SSL certificate for an API Management service. This operation will be deprecated in future releases. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Upload SSL certificate for an API Management service operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture uploadCertificateAsync(String resourceGroupName, String serviceName, ApiManagementServiceUploadCertificateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(uploadCertificateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Upload Custom Domain SSL certificate for an API Management service. This operation will be deprecated in future releases. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Upload SSL certificate for an API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CertificateInformationInner object - */ - public Observable uploadCertificateAsync(String resourceGroupName, String serviceName, ApiManagementServiceUploadCertificateParametersInner parameters) { - return uploadCertificateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, CertificateInformationInner>() { - @Override - public CertificateInformationInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Upload Custom Domain SSL certificate for an API Management service. This operation will be deprecated in future releases. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Upload SSL certificate for an API Management service operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CertificateInformationInner object - */ - public Observable> uploadCertificateWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceUploadCertificateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.uploadCertificate(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = uploadCertificateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse uploadCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the UpdateHostname operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner updateHostname(String resourceGroupName, String serviceName, ApiManagementServiceUpdateHostnameParametersInner parameters) { - return updateHostnameWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); - } - - /** - * Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the UpdateHostname operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateHostnameAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateHostnameParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateHostnameWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the UpdateHostname operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateHostnameAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateHostnameParametersInner parameters) { - return updateHostnameWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the UpdateHostname operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateHostnameWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateHostnameParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.updateHostname(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the UpdateHostname operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiManagementServiceResourceInner object if successful. - */ - public ApiManagementServiceResourceInner beginUpdateHostname(String resourceGroupName, String serviceName, ApiManagementServiceUpdateHostnameParametersInner parameters) { - return beginUpdateHostnameWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the UpdateHostname operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginUpdateHostnameAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateHostnameParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateHostnameWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the UpdateHostname operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable beginUpdateHostnameAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateHostnameParametersInner parameters) { - return beginUpdateHostnameWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, ApiManagementServiceResourceInner>() { - @Override - public ApiManagementServiceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the UpdateHostname operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiManagementServiceResourceInner object - */ - public Observable> beginUpdateHostnameWithServiceResponseAsync(String resourceGroupName, String serviceName, ApiManagementServiceUpdateHostnameParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginUpdateHostname(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateHostnameDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateHostnameDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List all API Management services within a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiManagementServiceResourceInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List all API Management services within a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List all API Management services within a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiManagementServiceResourceInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List all API Management services within a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiManagementServiceResourceInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List all API Management services within a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiManagementServiceResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiManagementServiceResourceInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiManagementServiceResourceInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all API Management services within an Azure subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiManagementServiceResourceInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all API Management services within an Azure subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiManagementServiceResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationGetEntityTagHeadersInner.java deleted file mode 100644 index 5322cce86b1..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ApiOperationGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiOperationGetEntityTagHeadersInner object itself. - */ - public ApiOperationGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationGetHeadersInner.java deleted file mode 100644 index e9bcc8c39ef..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ApiOperationGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiOperationGetHeadersInner object itself. - */ - public ApiOperationGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicyGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicyGetEntityTagHeadersInner.java deleted file mode 100644 index 05664d008be..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicyGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ApiOperationPolicyGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiOperationPolicyGetEntityTagHeadersInner object itself. - */ - public ApiOperationPolicyGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicyGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicyGetHeadersInner.java deleted file mode 100644 index 862a150494f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicyGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ApiOperationPolicyGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiOperationPolicyGetHeadersInner object itself. - */ - public ApiOperationPolicyGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicysInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicysInner.java deleted file mode 100644 index 9d100942dae..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationPolicysInner.java +++ /dev/null @@ -1,708 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiOperationPolicys. - */ -public class ApiOperationPolicysInner { - /** The Retrofit service to perform REST calls. */ - private ApiOperationPolicysService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiOperationPolicysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiOperationPolicysInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiOperationPolicysService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiOperationPolicys to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiOperationPolicysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperationPolicys listByOperation" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies") - Observable> listByOperation(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperationPolicys getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperationPolicys get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperationPolicys createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Body PolicyContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperationPolicys delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get the list of policy configuration at the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyCollectionInner object if successful. - */ - public PolicyCollectionInner listByOperation(String resourceGroupName, String serviceName, String apiId, String operationId) { - return listByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).toBlocking().single().body(); - } - - /** - * Get the list of policy configuration at the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId), serviceCallback); - } - - /** - * Get the list of policy configuration at the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable listByOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - return listByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).map(new Func1, PolicyCollectionInner>() { - @Override - public PolicyCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get the list of policy configuration at the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable> listByOperationWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByOperation(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByOperationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listByOperationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String apiId, String operationId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String operationId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.getEntityTag(resourceGroupName, serviceName, apiId, operationId, policyId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ApiOperationPolicyGetEntityTagHeadersInner.class); - } - - /** - * Get the policy configuration at the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner get(String resourceGroupName, String serviceName, String apiId, String operationId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).toBlocking().single().body(); - } - - /** - * Get the policy configuration at the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, String operationId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId), serviceCallback); - } - - /** - * Get the policy configuration at the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get the policy configuration at the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.get(resourceGroupName, serviceName, apiId, operationId, policyId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiOperationPolicyGetHeadersInner.class); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String operationId, PolicyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, PolicyContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters), serviceCallback); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, PolicyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, PolicyContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String policyId = "policy"; - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, apiId, operationId, policyId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String operationId, PolicyContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, PolicyContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, PolicyContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, PolicyContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String policyId = "policy"; - return service.createOrUpdate(resourceGroupName, serviceName, apiId, operationId, policyId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the policy configuration at the Api Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the policy configuration at the Api Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch), serviceCallback); - } - - /** - * Deletes the policy configuration at the Api Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the policy configuration at the Api Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.delete(resourceGroupName, serviceName, apiId, operationId, policyId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationsInner.java deleted file mode 100644 index 0c47c759124..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiOperationsInner.java +++ /dev/null @@ -1,1141 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiOperations. - */ -public class ApiOperationsInner { - /** The Retrofit service to perform REST calls. */ - private ApiOperationsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiOperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiOperationsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiOperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiOperations to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiOperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperations listByApi" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations") - Observable> listByApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperations getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperations get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperations createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Body OperationContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperations update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Body OperationUpdateContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperations delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiOperations listByApiNext" }) - @GET - Observable> listByApiNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponse> response = listByApiSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationContractInner> object - */ - public Observable>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByApi(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationContractInner> object - */ - public Observable>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the operations for the specified API. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByApi(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String apiId, String operationId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String operationId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ApiOperationGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the API Operation specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationContractInner object if successful. - */ - public OperationContractInner get(String resourceGroupName, String serviceName, String apiId, String operationId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).toBlocking().single().body(); - } - - /** - * Gets the details of the API Operation specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, String operationId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId), serviceCallback); - } - - /** - * Gets the details of the API Operation specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId).map(new Func1, OperationContractInner>() { - @Override - public OperationContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the API Operation specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiOperationGetHeadersInner.class); - } - - /** - * Creates a new operation in the API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationContractInner object if successful. - */ - public OperationContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String operationId, OperationContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters).toBlocking().single().body(); - } - - /** - * Creates a new operation in the API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters), serviceCallback); - } - - /** - * Creates a new operation in the API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters).map(new Func1, OperationContractInner>() { - @Override - public OperationContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a new operation in the API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates a new operation in the API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationContractInner object if successful. - */ - public OperationContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String operationId, OperationContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates a new operation in the API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates a new operation in the API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch).map(new Func1, OperationContractInner>() { - @Override - public OperationContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a new operation in the API or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the operation in the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters API Operation Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String apiId, String operationId, OperationUpdateContractInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the details of the operation in the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters API Operation Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationUpdateContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the details of the operation in the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters API Operation Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationUpdateContractInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the operation in the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param parameters API Operation Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, OperationUpdateContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified operation in the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified operation in the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch), serviceCallback); - } - - /** - * Deletes the specified operation in the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified operation in the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationContractInner> object if successful. - */ - public PagedList listByApiNext(final String nextPageLink) { - ServiceResponse> response = listByApiNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationContractInner> object - */ - public Observable> listByApiNextAsync(final String nextPageLink) { - return listByApiNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the operations for the specified API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationContractInner> object - */ - public Observable>> listByApiNextWithServiceResponseAsync(final String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the operations for the specified API. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByApiNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApiNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyGetEntityTagHeadersInner.java deleted file mode 100644 index 497da3240d0..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ApiPolicyGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiPolicyGetEntityTagHeadersInner object itself. - */ - public ApiPolicyGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyGetHeadersInner.java deleted file mode 100644 index 674db93b3da..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ApiPolicyGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiPolicyGetHeadersInner object itself. - */ - public ApiPolicyGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyListByApiHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyListByApiHeadersInner.java deleted file mode 100644 index 52f088fd20a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicyListByApiHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for ListByApi operation. - */ -public class ApiPolicyListByApiHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiPolicyListByApiHeadersInner object itself. - */ - public ApiPolicyListByApiHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicysInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicysInner.java deleted file mode 100644 index ee5cfe6581d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiPolicysInner.java +++ /dev/null @@ -1,666 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiPolicys. - */ -public class ApiPolicysInner { - /** The Retrofit service to perform REST calls. */ - private ApiPolicysService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiPolicysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiPolicysInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiPolicysService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiPolicys to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiPolicysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiPolicys listByApi" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies") - Observable> listByApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiPolicys getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiPolicys get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiPolicys createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Body PolicyContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiPolicys delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get the policy configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyCollectionInner object if successful. - */ - public PolicyCollectionInner listByApi(String resourceGroupName, String serviceName, String apiId) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId).toBlocking().single().body(); - } - - /** - * Get the policy configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByApiAsync(String resourceGroupName, String serviceName, String apiId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId), serviceCallback); - } - - /** - * Get the policy configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable listByApiAsync(String resourceGroupName, String serviceName, String apiId) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId).map(new Func1, PolicyCollectionInner>() { - @Override - public PolicyCollectionInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get the policy configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable> listByApiWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByApi(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = listByApiDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders listByApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiPolicyListByApiHeadersInner.class); - } - - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String apiId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String apiId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.getEntityTag(resourceGroupName, serviceName, apiId, policyId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ApiPolicyGetEntityTagHeadersInner.class); - } - - /** - * Get the policy configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner get(String resourceGroupName, String serviceName, String apiId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId).toBlocking().single().body(); - } - - /** - * Get the policy configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId), serviceCallback); - } - - /** - * Get the policy configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get the policy configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.get(resourceGroupName, serviceName, apiId, policyId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiPolicyGetHeadersInner.class); - } - - /** - * Creates or updates policy configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, PolicyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates policy configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters The policy contents to apply. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, PolicyContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters), serviceCallback); - } - - /** - * Creates or updates policy configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, PolicyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates policy configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, PolicyContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String policyId = "policy"; - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, apiId, policyId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates policy configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, PolicyContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or updates policy configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, PolicyContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or updates policy configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, PolicyContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates policy configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, PolicyContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String policyId = "policy"; - return service.createOrUpdate(resourceGroupName, serviceName, apiId, policyId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the policy configuration at the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the policy configuration at the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch), serviceCallback); - } - - /** - * Deletes the policy configuration at the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the policy configuration at the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.delete(resourceGroupName, serviceName, apiId, policyId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiProductsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiProductsInner.java deleted file mode 100644 index 969eca3be14..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiProductsInner.java +++ /dev/null @@ -1,463 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiProducts. - */ -public class ApiProductsInner { - /** The Retrofit service to perform REST calls. */ - private ApiProductsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiProductsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiProductsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiProductsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiProducts to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiProductsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiProducts listByApis" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products") - Observable> listByApis(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiProducts listByApisNext" }) - @GET - Observable> listByApisNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProductContractInner> object if successful. - */ - public PagedList listByApis(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponse> response = listByApisSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApisNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApisAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApisSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApisNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable> listByApisAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApisWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable>> listByApisWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApisSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApisNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProductContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApisSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByApis(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApisDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProductContractInner> object if successful. - */ - public PagedList listByApis(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByApisSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApisNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApisAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApisSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApisNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable> listByApisAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByApisWithServiceResponseAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Products, which the API is part of. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable>> listByApisWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByApisSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApisNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Products, which the API is part of. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProductContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApisSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByApis(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApisDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApisDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all Products, which the API is part of. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProductContractInner> object if successful. - */ - public PagedList listByApisNext(final String nextPageLink) { - ServiceResponse> response = listByApisNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApisNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Products, which the API is part of. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApisNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApisNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApisNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Products, which the API is part of. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable> listByApisNextAsync(final String nextPageLink) { - return listByApisNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Products, which the API is part of. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable>> listByApisNextWithServiceResponseAsync(final String nextPageLink) { - return listByApisNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApisNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Products, which the API is part of. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProductContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApisNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByApisNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApisNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApisNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleaseContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleaseContractInner.java deleted file mode 100644 index 75c6dd0c4af..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleaseContractInner.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Api Release details. - */ -@JsonFlatten -public class ApiReleaseContractInner extends Resource { - /** - * Identifier of the API the release belongs to. - */ - @JsonProperty(value = "properties.apiId") - private String apiId; - - /** - * The time the API was released. The date conforms to the following - * format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "properties.createdDateTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDateTime; - - /** - * The time the API release was updated. - */ - @JsonProperty(value = "properties.updatedDateTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime updatedDateTime; - - /** - * Release Notes. - */ - @JsonProperty(value = "properties.notes") - private String notes; - - /** - * Get the apiId value. - * - * @return the apiId value - */ - public String apiId() { - return this.apiId; - } - - /** - * Set the apiId value. - * - * @param apiId the apiId value to set - * @return the ApiReleaseContractInner object itself. - */ - public ApiReleaseContractInner withApiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * Get the createdDateTime value. - * - * @return the createdDateTime value - */ - public DateTime createdDateTime() { - return this.createdDateTime; - } - - /** - * Get the updatedDateTime value. - * - * @return the updatedDateTime value - */ - public DateTime updatedDateTime() { - return this.updatedDateTime; - } - - /** - * Get the notes value. - * - * @return the notes value - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes value. - * - * @param notes the notes value to set - * @return the ApiReleaseContractInner object itself. - */ - public ApiReleaseContractInner withNotes(String notes) { - this.notes = notes; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleaseGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleaseGetEntityTagHeadersInner.java deleted file mode 100644 index 1d728449ceb..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleaseGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ApiReleaseGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiReleaseGetEntityTagHeadersInner object itself. - */ - public ApiReleaseGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleasesInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleasesInner.java deleted file mode 100644 index 2aeb60481d5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiReleasesInner.java +++ /dev/null @@ -1,1025 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiReleases. - */ -public class ApiReleasesInner { - /** The Retrofit service to perform REST calls. */ - private ApiReleasesService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiReleasesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiReleasesInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiReleasesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiReleases to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiReleasesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiReleases list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiReleases getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("apiId") String apiId, @Path("releaseId") String releaseId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiReleases get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("apiId") String apiId, @Path("releaseId") String releaseId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiReleases create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}") - Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("apiId") String apiId, @Path("releaseId") String releaseId, @Query("api-version") String apiVersion, @Body ApiReleaseContractInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiReleases update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("apiId") String apiId, @Path("releaseId") String releaseId, @Query("api-version") String apiVersion, @Body ApiReleaseContractInner parameters, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiReleases delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("apiId") String apiId, @Path("releaseId") String releaseId, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiReleases listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiReleaseContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiReleaseContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiReleaseContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiReleaseContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.list(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - |notes|ge le eq ne gt lt|substringof contains startswith endswith| - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiReleaseContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - |notes|ge le eq ne gt lt|substringof contains startswith endswith| - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - |notes|ge le eq ne gt lt|substringof contains startswith endswith| - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiReleaseContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - |notes|ge le eq ne gt lt|substringof contains startswith endswith| - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiReleaseContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - |notes|ge le eq ne gt lt|substringof contains startswith endswith| - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiReleaseContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Returns the etag of an API release. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String apiId, String releaseId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId).toBlocking().single().body(); - } - - /** - * Returns the etag of an API release. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId), serviceCallback); - } - - /** - * Returns the etag of an API release. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String releaseId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Returns the etag of an API release. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String releaseId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (releaseId == null) { - throw new IllegalArgumentException("Parameter releaseId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, this.client.subscriptionId(), apiId, releaseId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ApiReleaseGetEntityTagHeadersInner.class); - } - - /** - * Returns the details of an API release. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiReleaseContractInner object if successful. - */ - public ApiReleaseContractInner get(String resourceGroupName, String serviceName, String apiId, String releaseId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId).toBlocking().single().body(); - } - - /** - * Returns the details of an API release. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId), serviceCallback); - } - - /** - * Returns the details of an API release. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiReleaseContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId, String releaseId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId).map(new Func1, ApiReleaseContractInner>() { - @Override - public ApiReleaseContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Returns the details of an API release. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiReleaseContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String releaseId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (releaseId == null) { - throw new IllegalArgumentException("Parameter releaseId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, this.client.subscriptionId(), apiId, releaseId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Creates a new Release for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiReleaseContractInner object if successful. - */ - public ApiReleaseContractInner create(String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters) { - return createWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, parameters).toBlocking().single().body(); - } - - /** - * Creates a new Release for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, parameters), serviceCallback); - } - - /** - * Creates a new Release for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiReleaseContractInner object - */ - public Observable createAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters) { - return createWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, parameters).map(new Func1, ApiReleaseContractInner>() { - @Override - public ApiReleaseContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a new Release for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiReleaseContractInner object - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (releaseId == null) { - throw new IllegalArgumentException("Parameter releaseId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - return service.create(resourceGroupName, serviceName, this.client.subscriptionId(), apiId, releaseId, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the release of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param parameters API Release Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the details of the release of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param parameters API Release Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the details of the release of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param parameters API Release Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the release of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param parameters API Release Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (releaseId == null) { - throw new IllegalArgumentException("Parameter releaseId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, this.client.subscriptionId(), apiId, releaseId, this.client.apiVersion(), parameters, ifMatch, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified release in the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String releaseId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified release in the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, ifMatch), serviceCallback); - } - - /** - * Deletes the specified release in the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, releaseId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified release in the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String releaseId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (releaseId == null) { - throw new IllegalArgumentException("Parameter releaseId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, this.client.subscriptionId(), apiId, releaseId, this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiReleaseContractInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiReleaseContractInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiReleaseContractInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiReleaseContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiRevisionContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiRevisionContractInner.java deleted file mode 100644 index 278771c834a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiRevisionContractInner.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Summary of revision metadata. - */ -public class ApiRevisionContractInner { - /** - * Identifier of the API Revision. - */ - @JsonProperty(value = "apiId", access = JsonProperty.Access.WRITE_ONLY) - private String apiId; - - /** - * Revision number of API. - */ - @JsonProperty(value = "apiRevision", access = JsonProperty.Access.WRITE_ONLY) - private String apiRevision; - - /** - * The time the API Revision was created. The date conforms to the - * following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "createdDateTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDateTime; - - /** - * The time the API Revision were updated. The date conforms to the - * following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "updatedDateTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime updatedDateTime; - - /** - * Description of the API Revision. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * Gateway URL for accessing the non-current API Revision. - */ - @JsonProperty(value = "privateUrl", access = JsonProperty.Access.WRITE_ONLY) - private String privateUrl; - - /** - * Indicates if API revision is the current api revision. - */ - @JsonProperty(value = "isOnline", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isOnline; - - /** - * Indicates if API revision is accessible via the gateway. - */ - @JsonProperty(value = "isCurrent", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCurrent; - - /** - * Get the apiId value. - * - * @return the apiId value - */ - public String apiId() { - return this.apiId; - } - - /** - * Get the apiRevision value. - * - * @return the apiRevision value - */ - public String apiRevision() { - return this.apiRevision; - } - - /** - * Get the createdDateTime value. - * - * @return the createdDateTime value - */ - public DateTime createdDateTime() { - return this.createdDateTime; - } - - /** - * Get the updatedDateTime value. - * - * @return the updatedDateTime value - */ - public DateTime updatedDateTime() { - return this.updatedDateTime; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Get the privateUrl value. - * - * @return the privateUrl value - */ - public String privateUrl() { - return this.privateUrl; - } - - /** - * Get the isOnline value. - * - * @return the isOnline value - */ - public Boolean isOnline() { - return this.isOnline; - } - - /** - * Get the isCurrent value. - * - * @return the isCurrent value - */ - public Boolean isCurrent() { - return this.isCurrent; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiRevisionsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiRevisionsInner.java deleted file mode 100644 index d036db33022..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiRevisionsInner.java +++ /dev/null @@ -1,463 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiRevisions. - */ -public class ApiRevisionsInner { - /** The Retrofit service to perform REST calls. */ - private ApiRevisionsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiRevisionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiRevisionsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiRevisionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiRevisions to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiRevisionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiRevisions list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("apiId") String apiId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiRevisions listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiRevisionContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiRevisionContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiRevisionContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiRevisionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.list(resourceGroupName, serviceName, this.client.subscriptionId(), apiId, this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiRevisionContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiRevisionContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all revisions of an API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiRevisionContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all revisions of an API. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiRevisionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, serviceName, this.client.subscriptionId(), apiId, this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all revisions of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiRevisionContractInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all revisions of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all revisions of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiRevisionContractInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all revisions of an API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiRevisionContractInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all revisions of an API. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiRevisionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaGetEntityTagHeadersInner.java deleted file mode 100644 index c3c046262dc..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ApiSchemaGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiSchemaGetEntityTagHeadersInner object itself. - */ - public ApiSchemaGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaGetHeadersInner.java deleted file mode 100644 index cd84de995a3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ApiSchemaGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiSchemaGetHeadersInner object itself. - */ - public ApiSchemaGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaListByApiHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaListByApiHeadersInner.java deleted file mode 100644 index 496062c21e2..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemaListByApiHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for ListByApi operation. - */ -public class ApiSchemaListByApiHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiSchemaListByApiHeadersInner object itself. - */ - public ApiSchemaListByApiHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemasInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemasInner.java deleted file mode 100644 index d0260c7f1a4..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiSchemasInner.java +++ /dev/null @@ -1,855 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiSchemas. - */ -public class ApiSchemasInner { - /** The Retrofit service to perform REST calls. */ - private ApiSchemasService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiSchemasInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiSchemasInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiSchemasService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiSchemas to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiSchemasService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiSchemas listByApi" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas") - Observable> listByApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiSchemas getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("schemaId") String schemaId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiSchemas get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("schemaId") String schemaId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiSchemas createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("schemaId") String schemaId, @Path("subscriptionId") String subscriptionId, @Body SchemaContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiSchemas delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("schemaId") String schemaId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiSchemas listByApiNext" }) - @GET - Observable> listByApiNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get the schema configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SchemaContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> response = listByApiSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the schema configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromHeaderPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1, ApiSchemaListByApiHeadersInner>>>() { - @Override - public Observable, ApiSchemaListByApiHeadersInner>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the schema configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SchemaContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1, ApiSchemaListByApiHeadersInner>, Page>() { - @Override - public Page call(ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> response) { - return response.body(); - } - }); - } - - /** - * Get the schema configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SchemaContractInner> object - */ - public Observable, ApiSchemaListByApiHeadersInner>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1, ApiSchemaListByApiHeadersInner>, Observable, ApiSchemaListByApiHeadersInner>>>() { - @Override - public Observable, ApiSchemaListByApiHeadersInner>> call(ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the schema configuration at the API level. - * - ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> * @param resourceGroupName The name of the resource group. - ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> * @param serviceName The name of the API Management service. - ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SchemaContractInner> object wrapped in {@link ServiceResponseWithHeaders} if successful. - */ - public Observable, ApiSchemaListByApiHeadersInner>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByApi(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable, ApiSchemaListByApiHeadersInner>>>() { - @Override - public Observable, ApiSchemaListByApiHeadersInner>> call(Response response) { - try { - ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> result = listByApiDelegate(response); - return Observable.just(new ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner>(result.body(), result.headers(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> listByApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiSchemaListByApiHeadersInner.class); - } - - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String apiId, String schemaId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String schemaId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String schemaId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (schemaId == null) { - throw new IllegalArgumentException("Parameter schemaId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, apiId, schemaId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ApiSchemaGetEntityTagHeadersInner.class); - } - - /** - * Get the schema configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SchemaContractInner object if successful. - */ - public SchemaContractInner get(String resourceGroupName, String serviceName, String apiId, String schemaId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId).toBlocking().single().body(); - } - - /** - * Get the schema configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId), serviceCallback); - } - - /** - * Get the schema configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SchemaContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId, String schemaId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId).map(new Func1, SchemaContractInner>() { - @Override - public SchemaContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get the schema configuration at the API level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SchemaContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String schemaId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (schemaId == null) { - throw new IllegalArgumentException("Parameter schemaId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, apiId, schemaId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiSchemaGetHeadersInner.class); - } - - /** - * Creates or updates schema configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SchemaContractInner object if successful. - */ - public SchemaContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates schema configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, parameters), serviceCallback); - } - - /** - * Creates or updates schema configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SchemaContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, parameters).map(new Func1, SchemaContractInner>() { - @Override - public SchemaContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates schema configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SchemaContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (schemaId == null) { - throw new IllegalArgumentException("Parameter schemaId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, apiId, schemaId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates schema configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SchemaContractInner object if successful. - */ - public SchemaContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or updates schema configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or updates schema configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SchemaContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch).map(new Func1, SchemaContractInner>() { - @Override - public SchemaContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates schema configuration for the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SchemaContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (schemaId == null) { - throw new IllegalArgumentException("Parameter schemaId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, apiId, schemaId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the schema configuration at the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String schemaId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the schema configuration at the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, ifMatch), serviceCallback); - } - - /** - * Deletes the schema configuration at the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, schemaId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the schema configuration at the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String schemaId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (schemaId == null) { - throw new IllegalArgumentException("Parameter schemaId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, apiId, schemaId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Get the schema configuration at the API level. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SchemaContractInner> object if successful. - */ - public PagedList listByApiNext(final String nextPageLink) { - ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> response = listByApiNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the schema configuration at the API level. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromHeaderPageResponse( - listByApiNextSinglePageAsync(nextPageLink), - new Func1, ApiSchemaListByApiHeadersInner>>>() { - @Override - public Observable, ApiSchemaListByApiHeadersInner>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the schema configuration at the API level. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SchemaContractInner> object - */ - public Observable> listByApiNextAsync(final String nextPageLink) { - return listByApiNextWithServiceResponseAsync(nextPageLink) - .map(new Func1, ApiSchemaListByApiHeadersInner>, Page>() { - @Override - public Page call(ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> response) { - return response.body(); - } - }); - } - - /** - * Get the schema configuration at the API level. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SchemaContractInner> object - */ - public Observable, ApiSchemaListByApiHeadersInner>> listByApiNextWithServiceResponseAsync(final String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink) - .concatMap(new Func1, ApiSchemaListByApiHeadersInner>, Observable, ApiSchemaListByApiHeadersInner>>>() { - @Override - public Observable, ApiSchemaListByApiHeadersInner>> call(ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the schema configuration at the API level. - * - ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SchemaContractInner> object wrapped in {@link ServiceResponseWithHeaders} if successful. - */ - public Observable, ApiSchemaListByApiHeadersInner>> listByApiNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByApiNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable, ApiSchemaListByApiHeadersInner>>>() { - @Override - public Observable, ApiSchemaListByApiHeadersInner>> call(Response response) { - try { - ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> result = listByApiNextDelegate(response); - return Observable.just(new ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner>(result.body(), result.headers(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders, ApiSchemaListByApiHeadersInner> listByApiNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiSchemaListByApiHeadersInner.class); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiUpdateContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiUpdateContractInner.java deleted file mode 100644 index d9abef68c10..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiUpdateContractInner.java +++ /dev/null @@ -1,344 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.AuthenticationSettingsContract; -import com.microsoft.azure.management.apimanagement.SubscriptionKeyParameterNamesContract; -import com.microsoft.azure.management.apimanagement.ApiType; -import java.util.List; -import com.microsoft.azure.management.apimanagement.Protocol; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * API update contract details. - */ -@JsonFlatten -public class ApiUpdateContractInner { - /** - * Description of the API. May include HTML formatting tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Collection of authentication settings included into this API. - */ - @JsonProperty(value = "properties.authenticationSettings") - private AuthenticationSettingsContract authenticationSettings; - - /** - * Protocols over which API is made available. - */ - @JsonProperty(value = "properties.subscriptionKeyParameterNames") - private SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames; - - /** - * Type of API. Possible values include: 'http', 'soap'. - */ - @JsonProperty(value = "properties.type") - private ApiType apiType; - - /** - * Describes the Revision of the Api. If no value is provided, default - * revision 1 is created. - */ - @JsonProperty(value = "properties.apiRevision") - private String apiRevision; - - /** - * Indicates the Version identifier of the API if the API is versioned. - */ - @JsonProperty(value = "properties.apiVersion") - private String apiVersion; - - /** - * Indicates if API revision is current api revision. - */ - @JsonProperty(value = "properties.isCurrent", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCurrent; - - /** - * Indicates if API revision is accessible via the gateway. - */ - @JsonProperty(value = "properties.isOnline", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isOnline; - - /** - * A resource identifier for the related ApiVersionSet. - */ - @JsonProperty(value = "properties.apiVersionSetId") - private String apiVersionSetId; - - /** - * API name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Absolute URL of the backend service implementing this API. - */ - @JsonProperty(value = "properties.serviceUrl") - private String serviceUrl; - - /** - * Relative URL uniquely identifying this API and all of its resource paths - * within the API Management service instance. It is appended to the API - * endpoint base URL specified during the service instance creation to form - * a public URL for this API. - */ - @JsonProperty(value = "properties.path") - private String path; - - /** - * Describes on which protocols the operations in this API can be invoked. - */ - @JsonProperty(value = "properties.protocols") - private List protocols; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the authenticationSettings value. - * - * @return the authenticationSettings value - */ - public AuthenticationSettingsContract authenticationSettings() { - return this.authenticationSettings; - } - - /** - * Set the authenticationSettings value. - * - * @param authenticationSettings the authenticationSettings value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withAuthenticationSettings(AuthenticationSettingsContract authenticationSettings) { - this.authenticationSettings = authenticationSettings; - return this; - } - - /** - * Get the subscriptionKeyParameterNames value. - * - * @return the subscriptionKeyParameterNames value - */ - public SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames() { - return this.subscriptionKeyParameterNames; - } - - /** - * Set the subscriptionKeyParameterNames value. - * - * @param subscriptionKeyParameterNames the subscriptionKeyParameterNames value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withSubscriptionKeyParameterNames(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) { - this.subscriptionKeyParameterNames = subscriptionKeyParameterNames; - return this; - } - - /** - * Get the apiType value. - * - * @return the apiType value - */ - public ApiType apiType() { - return this.apiType; - } - - /** - * Set the apiType value. - * - * @param apiType the apiType value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withApiType(ApiType apiType) { - this.apiType = apiType; - return this; - } - - /** - * Get the apiRevision value. - * - * @return the apiRevision value - */ - public String apiRevision() { - return this.apiRevision; - } - - /** - * Set the apiRevision value. - * - * @param apiRevision the apiRevision value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withApiRevision(String apiRevision) { - this.apiRevision = apiRevision; - return this; - } - - /** - * Get the apiVersion value. - * - * @return the apiVersion value - */ - public String apiVersion() { - return this.apiVersion; - } - - /** - * Set the apiVersion value. - * - * @param apiVersion the apiVersion value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - return this; - } - - /** - * Get the isCurrent value. - * - * @return the isCurrent value - */ - public Boolean isCurrent() { - return this.isCurrent; - } - - /** - * Get the isOnline value. - * - * @return the isOnline value - */ - public Boolean isOnline() { - return this.isOnline; - } - - /** - * Get the apiVersionSetId value. - * - * @return the apiVersionSetId value - */ - public String apiVersionSetId() { - return this.apiVersionSetId; - } - - /** - * Set the apiVersionSetId value. - * - * @param apiVersionSetId the apiVersionSetId value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withApiVersionSetId(String apiVersionSetId) { - this.apiVersionSetId = apiVersionSetId; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the serviceUrl value. - * - * @return the serviceUrl value - */ - public String serviceUrl() { - return this.serviceUrl; - } - - /** - * Set the serviceUrl value. - * - * @param serviceUrl the serviceUrl value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withServiceUrl(String serviceUrl) { - this.serviceUrl = serviceUrl; - return this; - } - - /** - * Get the path value. - * - * @return the path value - */ - public String path() { - return this.path; - } - - /** - * Set the path value. - * - * @param path the path value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the protocols value. - * - * @return the protocols value - */ - public List protocols() { - return this.protocols; - } - - /** - * Set the protocols value. - * - * @param protocols the protocols value to set - * @return the ApiUpdateContractInner object itself. - */ - public ApiUpdateContractInner withProtocols(List protocols) { - this.protocols = protocols; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetContractInner.java deleted file mode 100644 index 9da3f034f11..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetContractInner.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.VersioningScheme; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Api Version Set Contract details. - */ -@JsonFlatten -public class ApiVersionSetContractInner extends Resource { - /** - * Description of API Version Set. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Name of query parameter that indicates the API Version if - * versioningScheme is set to `query`. - */ - @JsonProperty(value = "properties.versionQueryName") - private String versionQueryName; - - /** - * Name of HTTP header parameter that indicates the API Version if - * versioningScheme is set to `header`. - */ - @JsonProperty(value = "properties.versionHeaderName") - private String versionHeaderName; - - /** - * Name of API Version Set. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * An value that determines where the API Version identifer will be located - * in a HTTP request. Possible values include: 'Segment', 'Query', - * 'Header'. - */ - @JsonProperty(value = "properties.versioningScheme", required = true) - private VersioningScheme versioningScheme; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ApiVersionSetContractInner object itself. - */ - public ApiVersionSetContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the versionQueryName value. - * - * @return the versionQueryName value - */ - public String versionQueryName() { - return this.versionQueryName; - } - - /** - * Set the versionQueryName value. - * - * @param versionQueryName the versionQueryName value to set - * @return the ApiVersionSetContractInner object itself. - */ - public ApiVersionSetContractInner withVersionQueryName(String versionQueryName) { - this.versionQueryName = versionQueryName; - return this; - } - - /** - * Get the versionHeaderName value. - * - * @return the versionHeaderName value - */ - public String versionHeaderName() { - return this.versionHeaderName; - } - - /** - * Set the versionHeaderName value. - * - * @param versionHeaderName the versionHeaderName value to set - * @return the ApiVersionSetContractInner object itself. - */ - public ApiVersionSetContractInner withVersionHeaderName(String versionHeaderName) { - this.versionHeaderName = versionHeaderName; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ApiVersionSetContractInner object itself. - */ - public ApiVersionSetContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the versioningScheme value. - * - * @return the versioningScheme value - */ - public VersioningScheme versioningScheme() { - return this.versioningScheme; - } - - /** - * Set the versioningScheme value. - * - * @param versioningScheme the versioningScheme value to set - * @return the ApiVersionSetContractInner object itself. - */ - public ApiVersionSetContractInner withVersioningScheme(VersioningScheme versioningScheme) { - this.versioningScheme = versioningScheme; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetGetEntityTagHeadersInner.java deleted file mode 100644 index 6cbfa2f6de4..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ApiVersionSetGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiVersionSetGetEntityTagHeadersInner object itself. - */ - public ApiVersionSetGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetGetHeadersInner.java deleted file mode 100644 index 0dae2a17363..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ApiVersionSetGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ApiVersionSetGetHeadersInner object itself. - */ - public ApiVersionSetGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetUpdateParametersInner.java deleted file mode 100644 index 33c4c485a4b..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetUpdateParametersInner.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.VersioningScheme; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters to update or create an Api Version Set Contract. - */ -@JsonFlatten -public class ApiVersionSetUpdateParametersInner { - /** - * Description of API Version Set. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Name of query parameter that indicates the API Version if - * versioningScheme is set to `query`. - */ - @JsonProperty(value = "properties.versionQueryName") - private String versionQueryName; - - /** - * Name of HTTP header parameter that indicates the API Version if - * versioningScheme is set to `header`. - */ - @JsonProperty(value = "properties.versionHeaderName") - private String versionHeaderName; - - /** - * Name of API Version Set. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * An value that determines where the API Version identifer will be located - * in a HTTP request. Possible values include: 'Segment', 'Query', - * 'Header'. - */ - @JsonProperty(value = "properties.versioningScheme") - private VersioningScheme versioningScheme; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ApiVersionSetUpdateParametersInner object itself. - */ - public ApiVersionSetUpdateParametersInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the versionQueryName value. - * - * @return the versionQueryName value - */ - public String versionQueryName() { - return this.versionQueryName; - } - - /** - * Set the versionQueryName value. - * - * @param versionQueryName the versionQueryName value to set - * @return the ApiVersionSetUpdateParametersInner object itself. - */ - public ApiVersionSetUpdateParametersInner withVersionQueryName(String versionQueryName) { - this.versionQueryName = versionQueryName; - return this; - } - - /** - * Get the versionHeaderName value. - * - * @return the versionHeaderName value - */ - public String versionHeaderName() { - return this.versionHeaderName; - } - - /** - * Set the versionHeaderName value. - * - * @param versionHeaderName the versionHeaderName value to set - * @return the ApiVersionSetUpdateParametersInner object itself. - */ - public ApiVersionSetUpdateParametersInner withVersionHeaderName(String versionHeaderName) { - this.versionHeaderName = versionHeaderName; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ApiVersionSetUpdateParametersInner object itself. - */ - public ApiVersionSetUpdateParametersInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the versioningScheme value. - * - * @return the versioningScheme value - */ - public VersioningScheme versioningScheme() { - return this.versioningScheme; - } - - /** - * Set the versioningScheme value. - * - * @param versioningScheme the versioningScheme value to set - * @return the ApiVersionSetUpdateParametersInner object itself. - */ - public ApiVersionSetUpdateParametersInner withVersioningScheme(VersioningScheme versioningScheme) { - this.versioningScheme = versioningScheme; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetsInner.java deleted file mode 100644 index 1f985872599..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApiVersionSetsInner.java +++ /dev/null @@ -1,1098 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApiVersionSets. - */ -public class ApiVersionSetsInner { - /** The Retrofit service to perform REST calls. */ - private ApiVersionSetsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApiVersionSetsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApiVersionSetsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApiVersionSetsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApiVersionSets to be - * used by Retrofit to perform actually REST calls. - */ - interface ApiVersionSetsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiVersionSets listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiVersionSets getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("versionSetId") String versionSetId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiVersionSets get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("versionSetId") String versionSetId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiVersionSets createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("versionSetId") String versionSetId, @Query("api-version") String apiVersion, @Body ApiVersionSetContractInner parameters, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiVersionSets update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("versionSetId") String versionSetId, @Query("api-version") String apiVersion, @Body ApiVersionSetUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiVersionSets delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("versionSetId") String versionSetId, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ApiVersionSets listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiVersionSetContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiVersionSetContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiVersionSetContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiVersionSetContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiVersionSetContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiVersionSetContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiVersionSetContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiVersionSetContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String versionSetId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String versionSetId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String versionSetId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String versionSetId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (versionSetId == null) { - throw new IllegalArgumentException("Parameter versionSetId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, this.client.subscriptionId(), versionSetId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ApiVersionSetGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the Api Version Set specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiVersionSetContractInner object if successful. - */ - public ApiVersionSetContractInner get(String resourceGroupName, String serviceName, String versionSetId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId).toBlocking().single().body(); - } - - /** - * Gets the details of the Api Version Set specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String versionSetId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId), serviceCallback); - } - - /** - * Gets the details of the Api Version Set specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiVersionSetContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String versionSetId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId).map(new Func1, ApiVersionSetContractInner>() { - @Override - public ApiVersionSetContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the Api Version Set specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiVersionSetContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String versionSetId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (versionSetId == null) { - throw new IllegalArgumentException("Parameter versionSetId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, this.client.subscriptionId(), versionSetId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiVersionSetGetHeadersInner.class); - } - - /** - * Creates or Updates a Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiVersionSetContractInner object if successful. - */ - public ApiVersionSetContractInner createOrUpdate(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates a Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters), serviceCallback); - } - - /** - * Creates or Updates a Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiVersionSetContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters).map(new Func1, ApiVersionSetContractInner>() { - @Override - public ApiVersionSetContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiVersionSetContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (versionSetId == null) { - throw new IllegalArgumentException("Parameter versionSetId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), versionSetId, this.client.apiVersion(), parameters, ifMatch, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates a Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiVersionSetContractInner object if successful. - */ - public ApiVersionSetContractInner createOrUpdate(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or Updates a Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or Updates a Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiVersionSetContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters, ifMatch).map(new Func1, ApiVersionSetContractInner>() { - @Override - public ApiVersionSetContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiVersionSetContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (versionSetId == null) { - throw new IllegalArgumentException("Parameter versionSetId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), versionSetId, this.client.apiVersion(), parameters, ifMatch, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the Api VersionSet specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetUpdateParametersInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the details of the Api VersionSet specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the details of the Api VersionSet specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetUpdateParametersInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the Api VersionSet specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String versionSetId, ApiVersionSetUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (versionSetId == null) { - throw new IllegalArgumentException("Parameter versionSetId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, this.client.subscriptionId(), versionSetId, this.client.apiVersion(), parameters, ifMatch, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes specific Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String versionSetId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes specific Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String versionSetId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, ifMatch), serviceCallback); - } - - /** - * Deletes specific Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String versionSetId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, versionSetId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific Api Version Set. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String versionSetId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (versionSetId == null) { - throw new IllegalArgumentException("Parameter versionSetId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, this.client.subscriptionId(), versionSetId, this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiVersionSetContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiVersionSetContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiVersionSetContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiVersionSetContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApisInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApisInner.java deleted file mode 100644 index a3baee5dbf2..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ApisInner.java +++ /dev/null @@ -1,1613 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Apis. - */ -public class ApisInner { - /** The Retrofit service to perform REST calls. */ - private ApisService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ApisInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApisInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ApisService.class); - this.client = client; - } - - /** - * The interface defining all the services for Apis to be - * used by Retrofit to perform actually REST calls. - */ - interface ApisService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Query("expandApiVersionSet") Boolean expandApiVersionSet, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Body ApiCreateOrUpdateParameterInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Body ApiUpdateContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("deleteRevisions") Boolean deleteRevisions, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis listByTags" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags") - Observable> listByTags(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Apis listByTagsNext" }) - @GET - Observable> listByTagsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - final Boolean expandApiVersionSet = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), expandApiVersionSet, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param expandApiVersionSet Include full ApiVersionSet resource in response - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandApiVersionSet) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip, expandApiVersionSet).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param expandApiVersionSet Include full ApiVersionSet resource in response - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandApiVersionSet, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip, expandApiVersionSet), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param expandApiVersionSet Include full ApiVersionSet resource in response - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandApiVersionSet) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip, expandApiVersionSet) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param expandApiVersionSet Include full ApiVersionSet resource in response - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandApiVersionSet) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip, expandApiVersionSet) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all APIs of the API Management service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - ServiceResponse> * @param expandApiVersionSet Include full ApiVersionSet resource in response - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandApiVersionSet) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), expandApiVersionSet, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String apiId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String apiId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, apiId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ApiGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiContractInner object if successful. - */ - public ApiContractInner get(String resourceGroupName, String serviceName, String apiId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId).toBlocking().single().body(); - } - - /** - * Gets the details of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId), serviceCallback); - } - - /** - * Gets the details of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId).map(new Func1, ApiContractInner>() { - @Override - public ApiContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the API specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiGetHeadersInner.class); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiContractInner object if successful. - */ - public ApiContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, ApiCreateOrUpdateParameterInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters).toBlocking().single().body(); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, ApiCreateOrUpdateParameterInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters), serviceCallback); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, ApiCreateOrUpdateParameterInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters).map(new Func1, ApiContractInner>() { - @Override - public ApiContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, ApiCreateOrUpdateParameterInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiContractInner object if successful. - */ - public ApiContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, ApiCreateOrUpdateParameterInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, ApiCreateOrUpdateParameterInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, ApiCreateOrUpdateParameterInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).map(new Func1, ApiContractInner>() { - @Override - public ApiContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, ApiCreateOrUpdateParameterInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ApiCreateOrUpdateHeadersInner.class); - } - - /** - * Updates the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters API Update Contract parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String apiId, ApiUpdateContractInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters API Update Contract parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String apiId, ApiUpdateContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters API Update Contract parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String apiId, ApiUpdateContractInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters API Update Contract parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, ApiUpdateContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch), serviceCallback); - } - - /** - * Deletes the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean deleteRevisions = null; - return service.delete(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), deleteRevisions, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Deletes the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteRevisions Delete all revisions of the Api. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String ifMatch, Boolean deleteRevisions) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch, deleteRevisions).toBlocking().single().body(); - } - - /** - * Deletes the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteRevisions Delete all revisions of the Api. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch, Boolean deleteRevisions, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch, deleteRevisions), serviceCallback); - } - - /** - * Deletes the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteRevisions Delete all revisions of the Api. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch, Boolean deleteRevisions) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, ifMatch, deleteRevisions).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified API of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteRevisions Delete all revisions of the Api. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String ifMatch, Boolean deleteRevisions) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), deleteRevisions, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByTags(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByTagsSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTagsAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTagsSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByTagsAsync(final String resourceGroupName, final String serviceName) { - return listByTagsWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByTagsWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByTagsSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTagsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTagsSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByTags(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTagsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | eq | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByTags(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByTagsSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | eq | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTagsAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTagsSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | eq | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByTagsAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByTagsWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | eq | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByTagsWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByTagsSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTagsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of apis associated with tags. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | eq | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTagsSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByTags(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTagsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all APIs of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all APIs of the API Management service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByTagsNext(final String nextPageLink) { - ServiceResponse> response = listByTagsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of apis associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTagsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTagsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByTagsNextAsync(final String nextPageLink) { - return listByTagsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of apis associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByTagsNextWithServiceResponseAsync(final String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTagsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of apis associated with tags. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTagsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByTagsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTagsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByTagsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerContractInner.java deleted file mode 100644 index 25ed661116d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerContractInner.java +++ /dev/null @@ -1,460 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.AuthorizationMethod; -import com.microsoft.azure.management.apimanagement.ClientAuthenticationMethod; -import com.microsoft.azure.management.apimanagement.TokenBodyParameterContract; -import com.microsoft.azure.management.apimanagement.BearerTokenSendingMethod; -import com.microsoft.azure.management.apimanagement.GrantType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * External OAuth authorization server settings. - */ -@JsonFlatten -public class AuthorizationServerContractInner extends Resource { - /** - * Description of the authorization server. Can contain HTML formatting - * tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * HTTP verbs supported by the authorization endpoint. GET must be always - * present. POST is optional. - */ - @JsonProperty(value = "properties.authorizationMethods") - private List authorizationMethods; - - /** - * Method of authentication supported by the token endpoint of this - * authorization server. Possible values are Basic and/or Body. When Body - * is specified, client credentials and other parameters are passed within - * the request body in the application/x-www-form-urlencoded format. - */ - @JsonProperty(value = "properties.clientAuthenticationMethod") - private List clientAuthenticationMethod; - - /** - * Additional parameters required by the token endpoint of this - * authorization server represented as an array of JSON objects with name - * and value string properties, i.e. {"name" : "name value", "value": "a - * value"}. - */ - @JsonProperty(value = "properties.tokenBodyParameters") - private List tokenBodyParameters; - - /** - * OAuth token endpoint. Contains absolute URI to entity being referenced. - */ - @JsonProperty(value = "properties.tokenEndpoint") - private String tokenEndpoint; - - /** - * If true, authorization server will include state parameter from the - * authorization request to its response. Client may use state parameter to - * raise protocol security. - */ - @JsonProperty(value = "properties.supportState") - private Boolean supportState; - - /** - * Access token scope that is going to be requested by default. Can be - * overridden at the API level. Should be provided in the form of a string - * containing space-delimited values. - */ - @JsonProperty(value = "properties.defaultScope") - private String defaultScope; - - /** - * Specifies the mechanism by which access token is passed to the API. - */ - @JsonProperty(value = "properties.bearerTokenSendingMethods") - private List bearerTokenSendingMethods; - - /** - * Client or app secret registered with this authorization server. - */ - @JsonProperty(value = "properties.clientSecret") - private String clientSecret; - - /** - * Can be optionally specified when resource owner password grant type is - * supported by this authorization server. Default resource owner username. - */ - @JsonProperty(value = "properties.resourceOwnerUsername") - private String resourceOwnerUsername; - - /** - * Can be optionally specified when resource owner password grant type is - * supported by this authorization server. Default resource owner password. - */ - @JsonProperty(value = "properties.resourceOwnerPassword") - private String resourceOwnerPassword; - - /** - * User-friendly authorization server name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * Optional reference to a page where client or app registration for this - * authorization server is performed. Contains absolute URL to entity being - * referenced. - */ - @JsonProperty(value = "properties.clientRegistrationEndpoint", required = true) - private String clientRegistrationEndpoint; - - /** - * OAuth authorization endpoint. See - * http://tools.ietf.org/html/rfc6749#section-3.2. - */ - @JsonProperty(value = "properties.authorizationEndpoint", required = true) - private String authorizationEndpoint; - - /** - * Form of an authorization grant, which the client uses to request the - * access token. - */ - @JsonProperty(value = "properties.grantTypes", required = true) - private List grantTypes; - - /** - * Client or app id registered with this authorization server. - */ - @JsonProperty(value = "properties.clientId", required = true) - private String clientId; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the authorizationMethods value. - * - * @return the authorizationMethods value - */ - public List authorizationMethods() { - return this.authorizationMethods; - } - - /** - * Set the authorizationMethods value. - * - * @param authorizationMethods the authorizationMethods value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withAuthorizationMethods(List authorizationMethods) { - this.authorizationMethods = authorizationMethods; - return this; - } - - /** - * Get the clientAuthenticationMethod value. - * - * @return the clientAuthenticationMethod value - */ - public List clientAuthenticationMethod() { - return this.clientAuthenticationMethod; - } - - /** - * Set the clientAuthenticationMethod value. - * - * @param clientAuthenticationMethod the clientAuthenticationMethod value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withClientAuthenticationMethod(List clientAuthenticationMethod) { - this.clientAuthenticationMethod = clientAuthenticationMethod; - return this; - } - - /** - * Get the tokenBodyParameters value. - * - * @return the tokenBodyParameters value - */ - public List tokenBodyParameters() { - return this.tokenBodyParameters; - } - - /** - * Set the tokenBodyParameters value. - * - * @param tokenBodyParameters the tokenBodyParameters value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withTokenBodyParameters(List tokenBodyParameters) { - this.tokenBodyParameters = tokenBodyParameters; - return this; - } - - /** - * Get the tokenEndpoint value. - * - * @return the tokenEndpoint value - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * Set the tokenEndpoint value. - * - * @param tokenEndpoint the tokenEndpoint value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withTokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - return this; - } - - /** - * Get the supportState value. - * - * @return the supportState value - */ - public Boolean supportState() { - return this.supportState; - } - - /** - * Set the supportState value. - * - * @param supportState the supportState value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withSupportState(Boolean supportState) { - this.supportState = supportState; - return this; - } - - /** - * Get the defaultScope value. - * - * @return the defaultScope value - */ - public String defaultScope() { - return this.defaultScope; - } - - /** - * Set the defaultScope value. - * - * @param defaultScope the defaultScope value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withDefaultScope(String defaultScope) { - this.defaultScope = defaultScope; - return this; - } - - /** - * Get the bearerTokenSendingMethods value. - * - * @return the bearerTokenSendingMethods value - */ - public List bearerTokenSendingMethods() { - return this.bearerTokenSendingMethods; - } - - /** - * Set the bearerTokenSendingMethods value. - * - * @param bearerTokenSendingMethods the bearerTokenSendingMethods value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withBearerTokenSendingMethods(List bearerTokenSendingMethods) { - this.bearerTokenSendingMethods = bearerTokenSendingMethods; - return this; - } - - /** - * Get the clientSecret value. - * - * @return the clientSecret value - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret value. - * - * @param clientSecret the clientSecret value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the resourceOwnerUsername value. - * - * @return the resourceOwnerUsername value - */ - public String resourceOwnerUsername() { - return this.resourceOwnerUsername; - } - - /** - * Set the resourceOwnerUsername value. - * - * @param resourceOwnerUsername the resourceOwnerUsername value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withResourceOwnerUsername(String resourceOwnerUsername) { - this.resourceOwnerUsername = resourceOwnerUsername; - return this; - } - - /** - * Get the resourceOwnerPassword value. - * - * @return the resourceOwnerPassword value - */ - public String resourceOwnerPassword() { - return this.resourceOwnerPassword; - } - - /** - * Set the resourceOwnerPassword value. - * - * @param resourceOwnerPassword the resourceOwnerPassword value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withResourceOwnerPassword(String resourceOwnerPassword) { - this.resourceOwnerPassword = resourceOwnerPassword; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the clientRegistrationEndpoint value. - * - * @return the clientRegistrationEndpoint value - */ - public String clientRegistrationEndpoint() { - return this.clientRegistrationEndpoint; - } - - /** - * Set the clientRegistrationEndpoint value. - * - * @param clientRegistrationEndpoint the clientRegistrationEndpoint value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withClientRegistrationEndpoint(String clientRegistrationEndpoint) { - this.clientRegistrationEndpoint = clientRegistrationEndpoint; - return this; - } - - /** - * Get the authorizationEndpoint value. - * - * @return the authorizationEndpoint value - */ - public String authorizationEndpoint() { - return this.authorizationEndpoint; - } - - /** - * Set the authorizationEndpoint value. - * - * @param authorizationEndpoint the authorizationEndpoint value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withAuthorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - /** - * Get the grantTypes value. - * - * @return the grantTypes value - */ - public List grantTypes() { - return this.grantTypes; - } - - /** - * Set the grantTypes value. - * - * @param grantTypes the grantTypes value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withGrantTypes(List grantTypes) { - this.grantTypes = grantTypes; - return this; - } - - /** - * Get the clientId value. - * - * @return the clientId value - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId value. - * - * @param clientId the clientId value to set - * @return the AuthorizationServerContractInner object itself. - */ - public AuthorizationServerContractInner withClientId(String clientId) { - this.clientId = clientId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerGetEntityTagHeadersInner.java deleted file mode 100644 index db5761cf2ae..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class AuthorizationServerGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the AuthorizationServerGetEntityTagHeadersInner object itself. - */ - public AuthorizationServerGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerGetHeadersInner.java deleted file mode 100644 index d8100b704d5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class AuthorizationServerGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the AuthorizationServerGetHeadersInner object itself. - */ - public AuthorizationServerGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerUpdateContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerUpdateContractInner.java deleted file mode 100644 index a56eb1f8d1a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServerUpdateContractInner.java +++ /dev/null @@ -1,460 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.AuthorizationMethod; -import com.microsoft.azure.management.apimanagement.ClientAuthenticationMethod; -import com.microsoft.azure.management.apimanagement.TokenBodyParameterContract; -import com.microsoft.azure.management.apimanagement.BearerTokenSendingMethod; -import com.microsoft.azure.management.apimanagement.GrantType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * External OAuth authorization server settings. - */ -@JsonFlatten -public class AuthorizationServerUpdateContractInner extends Resource { - /** - * Description of the authorization server. Can contain HTML formatting - * tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * HTTP verbs supported by the authorization endpoint. GET must be always - * present. POST is optional. - */ - @JsonProperty(value = "properties.authorizationMethods") - private List authorizationMethods; - - /** - * Method of authentication supported by the token endpoint of this - * authorization server. Possible values are Basic and/or Body. When Body - * is specified, client credentials and other parameters are passed within - * the request body in the application/x-www-form-urlencoded format. - */ - @JsonProperty(value = "properties.clientAuthenticationMethod") - private List clientAuthenticationMethod; - - /** - * Additional parameters required by the token endpoint of this - * authorization server represented as an array of JSON objects with name - * and value string properties, i.e. {"name" : "name value", "value": "a - * value"}. - */ - @JsonProperty(value = "properties.tokenBodyParameters") - private List tokenBodyParameters; - - /** - * OAuth token endpoint. Contains absolute URI to entity being referenced. - */ - @JsonProperty(value = "properties.tokenEndpoint") - private String tokenEndpoint; - - /** - * If true, authorization server will include state parameter from the - * authorization request to its response. Client may use state parameter to - * raise protocol security. - */ - @JsonProperty(value = "properties.supportState") - private Boolean supportState; - - /** - * Access token scope that is going to be requested by default. Can be - * overridden at the API level. Should be provided in the form of a string - * containing space-delimited values. - */ - @JsonProperty(value = "properties.defaultScope") - private String defaultScope; - - /** - * Specifies the mechanism by which access token is passed to the API. - */ - @JsonProperty(value = "properties.bearerTokenSendingMethods") - private List bearerTokenSendingMethods; - - /** - * Client or app secret registered with this authorization server. - */ - @JsonProperty(value = "properties.clientSecret") - private String clientSecret; - - /** - * Can be optionally specified when resource owner password grant type is - * supported by this authorization server. Default resource owner username. - */ - @JsonProperty(value = "properties.resourceOwnerUsername") - private String resourceOwnerUsername; - - /** - * Can be optionally specified when resource owner password grant type is - * supported by this authorization server. Default resource owner password. - */ - @JsonProperty(value = "properties.resourceOwnerPassword") - private String resourceOwnerPassword; - - /** - * User-friendly authorization server name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Optional reference to a page where client or app registration for this - * authorization server is performed. Contains absolute URL to entity being - * referenced. - */ - @JsonProperty(value = "properties.clientRegistrationEndpoint") - private String clientRegistrationEndpoint; - - /** - * OAuth authorization endpoint. See - * http://tools.ietf.org/html/rfc6749#section-3.2. - */ - @JsonProperty(value = "properties.authorizationEndpoint") - private String authorizationEndpoint; - - /** - * Form of an authorization grant, which the client uses to request the - * access token. - */ - @JsonProperty(value = "properties.grantTypes") - private List grantTypes; - - /** - * Client or app id registered with this authorization server. - */ - @JsonProperty(value = "properties.clientId") - private String clientId; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the authorizationMethods value. - * - * @return the authorizationMethods value - */ - public List authorizationMethods() { - return this.authorizationMethods; - } - - /** - * Set the authorizationMethods value. - * - * @param authorizationMethods the authorizationMethods value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withAuthorizationMethods(List authorizationMethods) { - this.authorizationMethods = authorizationMethods; - return this; - } - - /** - * Get the clientAuthenticationMethod value. - * - * @return the clientAuthenticationMethod value - */ - public List clientAuthenticationMethod() { - return this.clientAuthenticationMethod; - } - - /** - * Set the clientAuthenticationMethod value. - * - * @param clientAuthenticationMethod the clientAuthenticationMethod value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withClientAuthenticationMethod(List clientAuthenticationMethod) { - this.clientAuthenticationMethod = clientAuthenticationMethod; - return this; - } - - /** - * Get the tokenBodyParameters value. - * - * @return the tokenBodyParameters value - */ - public List tokenBodyParameters() { - return this.tokenBodyParameters; - } - - /** - * Set the tokenBodyParameters value. - * - * @param tokenBodyParameters the tokenBodyParameters value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withTokenBodyParameters(List tokenBodyParameters) { - this.tokenBodyParameters = tokenBodyParameters; - return this; - } - - /** - * Get the tokenEndpoint value. - * - * @return the tokenEndpoint value - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * Set the tokenEndpoint value. - * - * @param tokenEndpoint the tokenEndpoint value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withTokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - return this; - } - - /** - * Get the supportState value. - * - * @return the supportState value - */ - public Boolean supportState() { - return this.supportState; - } - - /** - * Set the supportState value. - * - * @param supportState the supportState value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withSupportState(Boolean supportState) { - this.supportState = supportState; - return this; - } - - /** - * Get the defaultScope value. - * - * @return the defaultScope value - */ - public String defaultScope() { - return this.defaultScope; - } - - /** - * Set the defaultScope value. - * - * @param defaultScope the defaultScope value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withDefaultScope(String defaultScope) { - this.defaultScope = defaultScope; - return this; - } - - /** - * Get the bearerTokenSendingMethods value. - * - * @return the bearerTokenSendingMethods value - */ - public List bearerTokenSendingMethods() { - return this.bearerTokenSendingMethods; - } - - /** - * Set the bearerTokenSendingMethods value. - * - * @param bearerTokenSendingMethods the bearerTokenSendingMethods value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withBearerTokenSendingMethods(List bearerTokenSendingMethods) { - this.bearerTokenSendingMethods = bearerTokenSendingMethods; - return this; - } - - /** - * Get the clientSecret value. - * - * @return the clientSecret value - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret value. - * - * @param clientSecret the clientSecret value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the resourceOwnerUsername value. - * - * @return the resourceOwnerUsername value - */ - public String resourceOwnerUsername() { - return this.resourceOwnerUsername; - } - - /** - * Set the resourceOwnerUsername value. - * - * @param resourceOwnerUsername the resourceOwnerUsername value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withResourceOwnerUsername(String resourceOwnerUsername) { - this.resourceOwnerUsername = resourceOwnerUsername; - return this; - } - - /** - * Get the resourceOwnerPassword value. - * - * @return the resourceOwnerPassword value - */ - public String resourceOwnerPassword() { - return this.resourceOwnerPassword; - } - - /** - * Set the resourceOwnerPassword value. - * - * @param resourceOwnerPassword the resourceOwnerPassword value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withResourceOwnerPassword(String resourceOwnerPassword) { - this.resourceOwnerPassword = resourceOwnerPassword; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the clientRegistrationEndpoint value. - * - * @return the clientRegistrationEndpoint value - */ - public String clientRegistrationEndpoint() { - return this.clientRegistrationEndpoint; - } - - /** - * Set the clientRegistrationEndpoint value. - * - * @param clientRegistrationEndpoint the clientRegistrationEndpoint value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withClientRegistrationEndpoint(String clientRegistrationEndpoint) { - this.clientRegistrationEndpoint = clientRegistrationEndpoint; - return this; - } - - /** - * Get the authorizationEndpoint value. - * - * @return the authorizationEndpoint value - */ - public String authorizationEndpoint() { - return this.authorizationEndpoint; - } - - /** - * Set the authorizationEndpoint value. - * - * @param authorizationEndpoint the authorizationEndpoint value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withAuthorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - /** - * Get the grantTypes value. - * - * @return the grantTypes value - */ - public List grantTypes() { - return this.grantTypes; - } - - /** - * Set the grantTypes value. - * - * @param grantTypes the grantTypes value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withGrantTypes(List grantTypes) { - this.grantTypes = grantTypes; - return this; - } - - /** - * Get the clientId value. - * - * @return the clientId value - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId value. - * - * @param clientId the clientId value to set - * @return the AuthorizationServerUpdateContractInner object itself. - */ - public AuthorizationServerUpdateContractInner withClientId(String clientId) { - this.clientId = clientId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServersInner.java deleted file mode 100644 index 6048491e27a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/AuthorizationServersInner.java +++ /dev/null @@ -1,1074 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in AuthorizationServers. - */ -public class AuthorizationServersInner { - /** The Retrofit service to perform REST calls. */ - private AuthorizationServersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of AuthorizationServersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public AuthorizationServersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(AuthorizationServersService.class); - this.client = client; - } - - /** - * The interface defining all the services for AuthorizationServers to be - * used by Retrofit to perform actually REST calls. - */ - interface AuthorizationServersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.AuthorizationServers listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.AuthorizationServers getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("authsid") String authsid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.AuthorizationServers get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("authsid") String authsid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.AuthorizationServers createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("authsid") String authsid, @Path("subscriptionId") String subscriptionId, @Body AuthorizationServerContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.AuthorizationServers update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("authsid") String authsid, @Path("subscriptionId") String subscriptionId, @Body AuthorizationServerUpdateContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.AuthorizationServers delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("authsid") String authsid, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.AuthorizationServers listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationServerContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationServerContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationServerContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationServerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationServerContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationServerContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationServerContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationServerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String authsid) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, authsid).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String authsid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, authsid), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String authsid) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, authsid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String authsid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (authsid == null) { - throw new IllegalArgumentException("Parameter authsid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, authsid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, AuthorizationServerGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the authorization server specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationServerContractInner object if successful. - */ - public AuthorizationServerContractInner get(String resourceGroupName, String serviceName, String authsid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, authsid).toBlocking().single().body(); - } - - /** - * Gets the details of the authorization server specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String authsid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, authsid), serviceCallback); - } - - /** - * Gets the details of the authorization server specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationServerContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String authsid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, authsid).map(new Func1, AuthorizationServerContractInner>() { - @Override - public AuthorizationServerContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the authorization server specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationServerContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String authsid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (authsid == null) { - throw new IllegalArgumentException("Parameter authsid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, authsid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, AuthorizationServerGetHeadersInner.class); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationServerContractInner object if successful. - */ - public AuthorizationServerContractInner createOrUpdate(String resourceGroupName, String serviceName, String authsid, AuthorizationServerContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters).toBlocking().single().body(); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters), serviceCallback); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationServerContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters).map(new Func1, AuthorizationServerContractInner>() { - @Override - public AuthorizationServerContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationServerContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (authsid == null) { - throw new IllegalArgumentException("Parameter authsid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, authsid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationServerContractInner object if successful. - */ - public AuthorizationServerContractInner createOrUpdate(String resourceGroupName, String serviceName, String authsid, AuthorizationServerContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters, ifMatch), serviceCallback); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationServerContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters, ifMatch).map(new Func1, AuthorizationServerContractInner>() { - @Override - public AuthorizationServerContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationServerContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (authsid == null) { - throw new IllegalArgumentException("Parameter authsid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, authsid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the authorization server specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters OAuth2 Server settings Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String authsid, AuthorizationServerUpdateContractInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the details of the authorization server specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters OAuth2 Server settings Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerUpdateContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the details of the authorization server specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters OAuth2 Server settings Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerUpdateContractInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, authsid, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the authorization server specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters OAuth2 Server settings Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String authsid, AuthorizationServerUpdateContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (authsid == null) { - throw new IllegalArgumentException("Parameter authsid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, authsid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes specific authorization server instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String authsid, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, authsid, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes specific authorization server instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String authsid, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, authsid, ifMatch), serviceCallback); - } - - /** - * Deletes specific authorization server instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String authsid, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, authsid, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific authorization server instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String authsid, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (authsid == null) { - throw new IllegalArgumentException("Parameter authsid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, authsid, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationServerContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationServerContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationServerContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationServerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendContractInner.java deleted file mode 100644 index 48c41731686..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendContractInner.java +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.BackendProperties; -import com.microsoft.azure.management.apimanagement.BackendCredentialsContract; -import com.microsoft.azure.management.apimanagement.BackendProxyContract; -import com.microsoft.azure.management.apimanagement.BackendTlsProperties; -import com.microsoft.azure.management.apimanagement.BackendProtocol; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Backend details. - */ -@JsonFlatten -public class BackendContractInner extends Resource { - /** - * Backend Title. - */ - @JsonProperty(value = "properties.title") - private String title; - - /** - * Backend Description. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Management Uri of the Resource in External System. This url can be the - * Arm Resource Id of Logic Apps, Function Apps or Api Apps. - */ - @JsonProperty(value = "properties.resourceId") - private String resourceId; - - /** - * Backend Properties contract. - */ - @JsonProperty(value = "properties.properties") - private BackendProperties properties; - - /** - * Backend Credentials Contract Properties. - */ - @JsonProperty(value = "properties.credentials") - private BackendCredentialsContract credentials; - - /** - * Backend Proxy Contract Properties. - */ - @JsonProperty(value = "properties.proxy") - private BackendProxyContract proxy; - - /** - * Backend TLS Properties. - */ - @JsonProperty(value = "properties.tls") - private BackendTlsProperties tls; - - /** - * Runtime Url of the Backend. - */ - @JsonProperty(value = "properties.url", required = true) - private String url; - - /** - * Backend communication protocol. Possible values include: 'http', 'soap'. - */ - @JsonProperty(value = "properties.protocol", required = true) - private BackendProtocol protocol; - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public BackendProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withProperties(BackendProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the credentials value. - * - * @return the credentials value - */ - public BackendCredentialsContract credentials() { - return this.credentials; - } - - /** - * Set the credentials value. - * - * @param credentials the credentials value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withCredentials(BackendCredentialsContract credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the proxy value. - * - * @return the proxy value - */ - public BackendProxyContract proxy() { - return this.proxy; - } - - /** - * Set the proxy value. - * - * @param proxy the proxy value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withProxy(BackendProxyContract proxy) { - this.proxy = proxy; - return this; - } - - /** - * Get the tls value. - * - * @return the tls value - */ - public BackendTlsProperties tls() { - return this.tls; - } - - /** - * Set the tls value. - * - * @param tls the tls value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withTls(BackendTlsProperties tls) { - this.tls = tls; - return this; - } - - /** - * Get the url value. - * - * @return the url value - */ - public String url() { - return this.url; - } - - /** - * Set the url value. - * - * @param url the url value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the protocol value. - * - * @return the protocol value - */ - public BackendProtocol protocol() { - return this.protocol; - } - - /** - * Set the protocol value. - * - * @param protocol the protocol value to set - * @return the BackendContractInner object itself. - */ - public BackendContractInner withProtocol(BackendProtocol protocol) { - this.protocol = protocol; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendGetEntityTagHeadersInner.java deleted file mode 100644 index 3d53f060384..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class BackendGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the BackendGetEntityTagHeadersInner object itself. - */ - public BackendGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendGetHeadersInner.java deleted file mode 100644 index e2610d2cded..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class BackendGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the BackendGetHeadersInner object itself. - */ - public BackendGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendReconnectContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendReconnectContractInner.java deleted file mode 100644 index 0adc4862828..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendReconnectContractInner.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Reconnect request parameters. - */ -@JsonFlatten -public class BackendReconnectContractInner extends Resource { - /** - * Duration in ISO8601 format after which reconnect will be initiated. - * Minimum duration of the Reconect is PT2M. - */ - @JsonProperty(value = "properties.after") - private Period after; - - /** - * Get the after value. - * - * @return the after value - */ - public Period after() { - return this.after; - } - - /** - * Set the after value. - * - * @param after the after value to set - * @return the BackendReconnectContractInner object itself. - */ - public BackendReconnectContractInner withAfter(Period after) { - this.after = after; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendUpdateParametersInner.java deleted file mode 100644 index 46e97146421..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendUpdateParametersInner.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.BackendProperties; -import com.microsoft.azure.management.apimanagement.BackendCredentialsContract; -import com.microsoft.azure.management.apimanagement.BackendProxyContract; -import com.microsoft.azure.management.apimanagement.BackendTlsProperties; -import com.microsoft.azure.management.apimanagement.BackendProtocol; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Backend update parameters. - */ -@JsonFlatten -public class BackendUpdateParametersInner { - /** - * Backend Title. - */ - @JsonProperty(value = "properties.title") - private String title; - - /** - * Backend Description. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Management Uri of the Resource in External System. This url can be the - * Arm Resource Id of Logic Apps, Function Apps or Api Apps. - */ - @JsonProperty(value = "properties.resourceId") - private String resourceId; - - /** - * Backend Properties contract. - */ - @JsonProperty(value = "properties.properties") - private BackendProperties properties; - - /** - * Backend Credentials Contract Properties. - */ - @JsonProperty(value = "properties.credentials") - private BackendCredentialsContract credentials; - - /** - * Backend Proxy Contract Properties. - */ - @JsonProperty(value = "properties.proxy") - private BackendProxyContract proxy; - - /** - * Backend TLS Properties. - */ - @JsonProperty(value = "properties.tls") - private BackendTlsProperties tls; - - /** - * Runtime Url of the Backend. - */ - @JsonProperty(value = "properties.url") - private String url; - - /** - * Backend communication protocol. Possible values include: 'http', 'soap'. - */ - @JsonProperty(value = "properties.protocol") - private BackendProtocol protocol; - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public BackendProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withProperties(BackendProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the credentials value. - * - * @return the credentials value - */ - public BackendCredentialsContract credentials() { - return this.credentials; - } - - /** - * Set the credentials value. - * - * @param credentials the credentials value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withCredentials(BackendCredentialsContract credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the proxy value. - * - * @return the proxy value - */ - public BackendProxyContract proxy() { - return this.proxy; - } - - /** - * Set the proxy value. - * - * @param proxy the proxy value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withProxy(BackendProxyContract proxy) { - this.proxy = proxy; - return this; - } - - /** - * Get the tls value. - * - * @return the tls value - */ - public BackendTlsProperties tls() { - return this.tls; - } - - /** - * Set the tls value. - * - * @param tls the tls value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withTls(BackendTlsProperties tls) { - this.tls = tls; - return this; - } - - /** - * Get the url value. - * - * @return the url value - */ - public String url() { - return this.url; - } - - /** - * Set the url value. - * - * @param url the url value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the protocol value. - * - * @return the protocol value - */ - public BackendProtocol protocol() { - return this.protocol; - } - - /** - * Set the protocol value. - * - * @param protocol the protocol value to set - * @return the BackendUpdateParametersInner object itself. - */ - public BackendUpdateParametersInner withProtocol(BackendProtocol protocol) { - this.protocol = protocol; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendsInner.java deleted file mode 100644 index 8db0479f48a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/BackendsInner.java +++ /dev/null @@ -1,1268 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import org.joda.time.Period; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Backends. - */ -public class BackendsInner { - /** The Retrofit service to perform REST calls. */ - private BackendsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of BackendsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public BackendsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(BackendsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Backends to be - * used by Retrofit to perform actually REST calls. - */ - interface BackendsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Backends listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Backends getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("backendid") String backendid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Backends get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("backendid") String backendid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Backends createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("backendid") String backendid, @Path("subscriptionId") String subscriptionId, @Body BackendContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Backends update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("backendid") String backendid, @Path("subscriptionId") String subscriptionId, @Body BackendUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Backends delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("backendid") String backendid, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Backends reconnect" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}/reconnect") - Observable> reconnect(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("backendid") String backendid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BackendReconnectContractInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Backends listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BackendContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BackendContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BackendContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BackendContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BackendContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BackendContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BackendContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of backends in the specified service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BackendContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String backendid) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, backendid).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String backendid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, backendid), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String backendid) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, backendid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String backendid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (backendid == null) { - throw new IllegalArgumentException("Parameter backendid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, backendid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, BackendGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the backend specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BackendContractInner object if successful. - */ - public BackendContractInner get(String resourceGroupName, String serviceName, String backendid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, backendid).toBlocking().single().body(); - } - - /** - * Gets the details of the backend specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String backendid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, backendid), serviceCallback); - } - - /** - * Gets the details of the backend specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackendContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String backendid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, backendid).map(new Func1, BackendContractInner>() { - @Override - public BackendContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the backend specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackendContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String backendid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (backendid == null) { - throw new IllegalArgumentException("Parameter backendid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, backendid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, BackendGetHeadersInner.class); - } - - /** - * Creates or Updates a backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BackendContractInner object if successful. - */ - public BackendContractInner createOrUpdate(String resourceGroupName, String serviceName, String backendid, BackendContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates a backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String backendid, BackendContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters), serviceCallback); - } - - /** - * Creates or Updates a backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackendContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String backendid, BackendContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters).map(new Func1, BackendContractInner>() { - @Override - public BackendContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackendContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String backendid, BackendContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (backendid == null) { - throw new IllegalArgumentException("Parameter backendid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, backendid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates a backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BackendContractInner object if successful. - */ - public BackendContractInner createOrUpdate(String resourceGroupName, String serviceName, String backendid, BackendContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or Updates a backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String backendid, BackendContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or Updates a backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackendContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String backendid, BackendContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch).map(new Func1, BackendContractInner>() { - @Override - public BackendContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackendContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String backendid, BackendContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (backendid == null) { - throw new IllegalArgumentException("Parameter backendid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, backendid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates an existing backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String backendid, BackendUpdateParametersInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an existing backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String backendid, BackendUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch), serviceCallback); - } - - /** - * Updates an existing backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String backendid, BackendUpdateParametersInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an existing backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String backendid, BackendUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (backendid == null) { - throw new IllegalArgumentException("Parameter backendid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, backendid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String backendid, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, backendid, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String backendid, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, backendid, ifMatch), serviceCallback); - } - - /** - * Deletes the specified backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String backendid, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, backendid, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String backendid, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (backendid == null) { - throw new IllegalArgumentException("Parameter backendid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, backendid, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void reconnect(String resourceGroupName, String serviceName, String backendid) { - reconnectWithServiceResponseAsync(resourceGroupName, serviceName, backendid).toBlocking().single().body(); - } - - /** - * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture reconnectAsync(String resourceGroupName, String serviceName, String backendid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reconnectWithServiceResponseAsync(resourceGroupName, serviceName, backendid), serviceCallback); - } - - /** - * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable reconnectAsync(String resourceGroupName, String serviceName, String backendid) { - return reconnectWithServiceResponseAsync(resourceGroupName, serviceName, backendid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> reconnectWithServiceResponseAsync(String resourceGroupName, String serviceName, String backendid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (backendid == null) { - throw new IllegalArgumentException("Parameter backendid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Period after = null; - BackendReconnectContractInner parameters = new BackendReconnectContractInner(); - parameters.withAfter(null); - return service.reconnect(resourceGroupName, serviceName, backendid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = reconnectDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param after Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconect is PT2M. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void reconnect(String resourceGroupName, String serviceName, String backendid, Period after) { - reconnectWithServiceResponseAsync(resourceGroupName, serviceName, backendid, after).toBlocking().single().body(); - } - - /** - * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param after Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconect is PT2M. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture reconnectAsync(String resourceGroupName, String serviceName, String backendid, Period after, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reconnectWithServiceResponseAsync(resourceGroupName, serviceName, backendid, after), serviceCallback); - } - - /** - * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param after Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconect is PT2M. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable reconnectAsync(String resourceGroupName, String serviceName, String backendid, Period after) { - return reconnectWithServiceResponseAsync(resourceGroupName, serviceName, backendid, after).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param backendid Identifier of the Backend entity. Must be unique in the current API Management service instance. - * @param after Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconect is PT2M. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> reconnectWithServiceResponseAsync(String resourceGroupName, String serviceName, String backendid, Period after) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (backendid == null) { - throw new IllegalArgumentException("Parameter backendid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - BackendReconnectContractInner parameters = null; - if (after != null) { - parameters = new BackendReconnectContractInner(); - parameters.withAfter(after); - } - return service.reconnect(resourceGroupName, serviceName, backendid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = reconnectDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse reconnectDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BackendContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BackendContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of backends in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BackendContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of backends in the specified service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BackendContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateContractInner.java deleted file mode 100644 index 2afdc1f05f0..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateContractInner.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Certificate details. - */ -@JsonFlatten -public class CertificateContractInner extends Resource { - /** - * Subject attribute of the certificate. - */ - @JsonProperty(value = "properties.subject", required = true) - private String subject; - - /** - * Thumbprint of the certificate. - */ - @JsonProperty(value = "properties.thumbprint", required = true) - private String thumbprint; - - /** - * Expiration date of the certificate. The date conforms to the following - * format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "properties.expirationDate", required = true) - private DateTime expirationDate; - - /** - * Get the subject value. - * - * @return the subject value - */ - public String subject() { - return this.subject; - } - - /** - * Set the subject value. - * - * @param subject the subject value to set - * @return the CertificateContractInner object itself. - */ - public CertificateContractInner withSubject(String subject) { - this.subject = subject; - return this; - } - - /** - * Get the thumbprint value. - * - * @return the thumbprint value - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint value. - * - * @param thumbprint the thumbprint value to set - * @return the CertificateContractInner object itself. - */ - public CertificateContractInner withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - - /** - * Get the expirationDate value. - * - * @return the expirationDate value - */ - public DateTime expirationDate() { - return this.expirationDate; - } - - /** - * Set the expirationDate value. - * - * @param expirationDate the expirationDate value to set - * @return the CertificateContractInner object itself. - */ - public CertificateContractInner withExpirationDate(DateTime expirationDate) { - this.expirationDate = expirationDate; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateCreateOrUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateCreateOrUpdateParametersInner.java deleted file mode 100644 index 1b90ee8d2de..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateCreateOrUpdateParametersInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Certificate create or update details. - */ -@JsonFlatten -public class CertificateCreateOrUpdateParametersInner { - /** - * Base 64 encoded certificate using the application/x-pkcs12 - * representation. - */ - @JsonProperty(value = "properties.data", required = true) - private String data; - - /** - * Password for the Certificate. - */ - @JsonProperty(value = "properties.password", required = true) - private String password; - - /** - * Get the data value. - * - * @return the data value - */ - public String data() { - return this.data; - } - - /** - * Set the data value. - * - * @param data the data value to set - * @return the CertificateCreateOrUpdateParametersInner object itself. - */ - public CertificateCreateOrUpdateParametersInner withData(String data) { - this.data = data; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the CertificateCreateOrUpdateParametersInner object itself. - */ - public CertificateCreateOrUpdateParametersInner withPassword(String password) { - this.password = password; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateGetEntityTagHeadersInner.java deleted file mode 100644 index 36a28faa0c1..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class CertificateGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the CertificateGetEntityTagHeadersInner object itself. - */ - public CertificateGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateGetHeadersInner.java deleted file mode 100644 index f21efd56d4c..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class CertificateGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the CertificateGetHeadersInner object itself. - */ - public CertificateGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateInformationInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateInformationInner.java deleted file mode 100644 index 7c088337ac5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificateInformationInner.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * SSL certificate information. - */ -public class CertificateInformationInner { - /** - * Expiration date of the certificate. The date conforms to the following - * format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "expiry", required = true) - private DateTime expiry; - - /** - * Thumbprint of the certificate. - */ - @JsonProperty(value = "thumbprint", required = true) - private String thumbprint; - - /** - * Subject of the certificate. - */ - @JsonProperty(value = "subject", required = true) - private String subject; - - /** - * Get the expiry value. - * - * @return the expiry value - */ - public DateTime expiry() { - return this.expiry; - } - - /** - * Set the expiry value. - * - * @param expiry the expiry value to set - * @return the CertificateInformationInner object itself. - */ - public CertificateInformationInner withExpiry(DateTime expiry) { - this.expiry = expiry; - return this; - } - - /** - * Get the thumbprint value. - * - * @return the thumbprint value - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint value. - * - * @param thumbprint the thumbprint value to set - * @return the CertificateInformationInner object itself. - */ - public CertificateInformationInner withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - - /** - * Get the subject value. - * - * @return the subject value - */ - public String subject() { - return this.subject; - } - - /** - * Set the subject value. - * - * @param subject the subject value to set - * @return the CertificateInformationInner object itself. - */ - public CertificateInformationInner withSubject(String subject) { - this.subject = subject; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificatesInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificatesInner.java deleted file mode 100644 index 34d3e917dca..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/CertificatesInner.java +++ /dev/null @@ -1,971 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Certificates. - */ -public class CertificatesInner { - /** The Retrofit service to perform REST calls. */ - private CertificatesService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of CertificatesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public CertificatesInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(CertificatesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Certificates to be - * used by Retrofit to perform actually REST calls. - */ - interface CertificatesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Certificates listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Certificates getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("certificateId") String certificateId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Certificates get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("certificateId") String certificateId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Certificates createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("certificateId") String certificateId, @Path("subscriptionId") String subscriptionId, @Body CertificateCreateOrUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Certificates delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("certificateId") String certificateId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Certificates listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CertificateContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CertificateContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CertificateContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CertificateContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |----------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | subject | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | expirationDate | ge, le, eq, ne, gt, lt | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CertificateContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |----------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | subject | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | expirationDate | ge, le, eq, ne, gt, lt | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |----------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | subject | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | expirationDate | ge, le, eq, ne, gt, lt | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CertificateContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |----------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | subject | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | expirationDate | ge, le, eq, ne, gt, lt | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CertificateContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |----------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | subject | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | expirationDate | ge, le, eq, ne, gt, lt | N/A | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CertificateContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String certificateId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, certificateId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String certificateId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, certificateId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String certificateId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, certificateId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String certificateId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (certificateId == null) { - throw new IllegalArgumentException("Parameter certificateId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, certificateId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, CertificateGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the certificate specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CertificateContractInner object if successful. - */ - public CertificateContractInner get(String resourceGroupName, String serviceName, String certificateId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, certificateId).toBlocking().single().body(); - } - - /** - * Gets the details of the certificate specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String certificateId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, certificateId), serviceCallback); - } - - /** - * Gets the details of the certificate specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CertificateContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String certificateId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, certificateId).map(new Func1, CertificateContractInner>() { - @Override - public CertificateContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the certificate specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CertificateContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String certificateId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (certificateId == null) { - throw new IllegalArgumentException("Parameter certificateId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, certificateId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, CertificateGetHeadersInner.class); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param parameters Create or Update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CertificateContractInner object if successful. - */ - public CertificateContractInner createOrUpdate(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param parameters Create or Update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, parameters), serviceCallback); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param parameters Create or Update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CertificateContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, parameters).map(new Func1, CertificateContractInner>() { - @Override - public CertificateContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param parameters Create or Update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CertificateContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (certificateId == null) { - throw new IllegalArgumentException("Parameter certificateId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, certificateId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param parameters Create or Update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CertificateContractInner object if successful. - */ - public CertificateContractInner createOrUpdate(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param parameters Create or Update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param parameters Create or Update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CertificateContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, parameters, ifMatch).map(new Func1, CertificateContractInner>() { - @Override - public CertificateContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param parameters Create or Update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CertificateContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (certificateId == null) { - throw new IllegalArgumentException("Parameter certificateId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, certificateId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes specific certificate. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String certificateId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes specific certificate. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String certificateId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, ifMatch), serviceCallback); - } - - /** - * Deletes specific certificate. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String certificateId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, certificateId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific certificate. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String certificateId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (certificateId == null) { - throw new IllegalArgumentException("Parameter certificateId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, certificateId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CertificateContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CertificateContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CertificateContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of all certificates in the specified service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CertificateContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsGetEntityTagHeadersInner.java deleted file mode 100644 index 1edfb025f18..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class DelegationSettingsGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the DelegationSettingsGetEntityTagHeadersInner object itself. - */ - public DelegationSettingsGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsGetHeadersInner.java deleted file mode 100644 index fb71efc1408..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class DelegationSettingsGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the DelegationSettingsGetHeadersInner object itself. - */ - public DelegationSettingsGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsInner.java deleted file mode 100644 index 74cd8148435..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DelegationSettingsInner.java +++ /dev/null @@ -1,444 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in DelegationSettings. - */ -public class DelegationSettingsInner { - /** The Retrofit service to perform REST calls. */ - private DelegationSettingsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of DelegationSettingsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public DelegationSettingsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(DelegationSettingsService.class); - this.client = client; - } - - /** - * The interface defining all the services for DelegationSettings to be - * used by Retrofit to perform actually REST calls. - */ - interface DelegationSettingsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DelegationSettings getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DelegationSettings get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DelegationSettings update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body PortalDelegationSettingsInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DelegationSettings createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body PortalDelegationSettingsInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, DelegationSettingsGetEntityTagHeadersInner.class); - } - - /** - * Get Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PortalDelegationSettingsInner object if successful. - */ - public PortalDelegationSettingsInner get(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Get Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Get Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalDelegationSettingsInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, PortalDelegationSettingsInner>() { - @Override - public PortalDelegationSettingsInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalDelegationSettingsInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, DelegationSettingsGetHeadersInner.class); - } - - /** - * Update Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Update Delegation settings. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Update Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Update Delegation settings. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters, ifMatch), serviceCallback); - } - - /** - * Update Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Update Delegation settings. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Update Delegation settings. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Create or Update Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PortalDelegationSettingsInner object if successful. - */ - public PortalDelegationSettingsInner createOrUpdate(String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Create or Update Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Create or Update Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalDelegationSettingsInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, PortalDelegationSettingsInner>() { - @Override - public PortalDelegationSettingsInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or Update Delegation settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalDelegationSettingsInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DeployConfigurationParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DeployConfigurationParametersInner.java deleted file mode 100644 index 357bb11c331..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DeployConfigurationParametersInner.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Deploy Configuration operation. - */ -public class DeployConfigurationParametersInner { - /** - * The name of the Git branch from which the configuration is to be - * deployed to the configuration database. - */ - @JsonProperty(value = "branch", required = true) - private String branch; - - /** - * The value enforcing deleting subscriptions to products that are deleted - * in this update. - */ - @JsonProperty(value = "force") - private Boolean force; - - /** - * Get the branch value. - * - * @return the branch value - */ - public String branch() { - return this.branch; - } - - /** - * Set the branch value. - * - * @param branch the branch value to set - * @return the DeployConfigurationParametersInner object itself. - */ - public DeployConfigurationParametersInner withBranch(String branch) { - this.branch = branch; - return this; - } - - /** - * Get the force value. - * - * @return the force value - */ - public Boolean force() { - return this.force; - } - - /** - * Set the force value. - * - * @param force the force value to set - * @return the DeployConfigurationParametersInner object itself. - */ - public DeployConfigurationParametersInner withForce(Boolean force) { - this.force = force; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticContractInner.java deleted file mode 100644 index 6ce9a339e98..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticContractInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Diagnostic details. - */ -@JsonFlatten -public class DiagnosticContractInner extends Resource { - /** - * Indicates whether a diagnostic should receive data or not. - */ - @JsonProperty(value = "properties.enabled", required = true) - private boolean enabled; - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the DiagnosticContractInner object itself. - */ - public DiagnosticContractInner withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticGetEntityTagHeadersInner.java deleted file mode 100644 index 115ef0b8dac..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class DiagnosticGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the DiagnosticGetEntityTagHeadersInner object itself. - */ - public DiagnosticGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticGetHeadersInner.java deleted file mode 100644 index ac85b594a09..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class DiagnosticGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the DiagnosticGetHeadersInner object itself. - */ - public DiagnosticGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticLoggersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticLoggersInner.java deleted file mode 100644 index 4fbc661b7e3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticLoggersInner.java +++ /dev/null @@ -1,786 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in DiagnosticLoggers. - */ -public class DiagnosticLoggersInner { - /** The Retrofit service to perform REST calls. */ - private DiagnosticLoggersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of DiagnosticLoggersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public DiagnosticLoggersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(DiagnosticLoggersService.class); - this.client = client; - } - - /** - * The interface defining all the services for DiagnosticLoggers to be - * used by Retrofit to perform actually REST calls. - */ - interface DiagnosticLoggersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DiagnosticLoggers listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("diagnosticId") String diagnosticId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DiagnosticLoggers checkEntityExists" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}") - Observable> checkEntityExists(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("diagnosticId") String diagnosticId, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DiagnosticLoggers createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("diagnosticId") String diagnosticId, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DiagnosticLoggers delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("diagnosticId") String diagnosticId, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.DiagnosticLoggers listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String diagnosticId) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, diagnosticId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String diagnosticId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, diagnosticId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String diagnosticId) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String diagnosticId) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, diagnosticId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String diagnosticId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), diagnosticId, this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String diagnosticId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, diagnosticId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String diagnosticId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, diagnosticId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String diagnosticId, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String diagnosticId, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, diagnosticId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - | type | eq | | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String diagnosticId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), diagnosticId, this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Checks that logger entity specified by identifier is associated with the diagnostics entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the boolean object if successful. - */ - public boolean checkEntityExists(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid).toBlocking().single().body(); - } - - /** - * Checks that logger entity specified by identifier is associated with the diagnostics entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkEntityExistsAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid), serviceCallback); - } - - /** - * Checks that logger entity specified by identifier is associated with the diagnostics entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable checkEntityExistsAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid).map(new Func1, Boolean>() { - @Override - public Boolean call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks that logger entity specified by identifier is associated with the diagnostics entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable> checkEntityExistsWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.checkEntityExists(resourceGroupName, serviceName, diagnosticId, loggerid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkEntityExistsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkEntityExistsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmpty(response); - } - - /** - * Attaches a logger to a dignostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LoggerContractInner object if successful. - */ - public LoggerContractInner createOrUpdate(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid).toBlocking().single().body(); - } - - /** - * Attaches a logger to a dignostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid), serviceCallback); - } - - /** - * Attaches a logger to a dignostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid).map(new Func1, LoggerContractInner>() { - @Override - public LoggerContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Attaches a logger to a dignostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.createOrUpdate(resourceGroupName, serviceName, diagnosticId, loggerid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified Logger from Diagnostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid).toBlocking().single().body(); - } - - /** - * Deletes the specified Logger from Diagnostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid), serviceCallback); - } - - /** - * Deletes the specified Logger from Diagnostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, loggerid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified Logger from Diagnostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId, String loggerid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, diagnosticId, loggerid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all loggers assosiated with the specified Diagnostic of the API Management service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticsInner.java deleted file mode 100644 index 9655f76ca4e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/DiagnosticsInner.java +++ /dev/null @@ -1,1061 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Diagnostics. - */ -public class DiagnosticsInner { - /** The Retrofit service to perform REST calls. */ - private DiagnosticsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of DiagnosticsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public DiagnosticsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(DiagnosticsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Diagnostics to be - * used by Retrofit to perform actually REST calls. - */ - interface DiagnosticsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Diagnostics listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Diagnostics getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Diagnostics get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Diagnostics createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DiagnosticContractInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Diagnostics update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DiagnosticContractInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Diagnostics delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("diagnosticId") String diagnosticId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Diagnostics listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiagnosticContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiagnosticContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiagnosticContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiagnosticContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), filter, top, skip, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String diagnosticId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String diagnosticId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String diagnosticId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, diagnosticId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, DiagnosticGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiagnosticContractInner object if successful. - */ - public DiagnosticContractInner get(String resourceGroupName, String serviceName, String diagnosticId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId).toBlocking().single().body(); - } - - /** - * Gets the details of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String diagnosticId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId), serviceCallback); - } - - /** - * Gets the details of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String diagnosticId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId).map(new Func1, DiagnosticContractInner>() { - @Override - public DiagnosticContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, diagnosticId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, DiagnosticGetHeadersInner.class); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiagnosticContractInner object if successful. - */ - public DiagnosticContractInner createOrUpdate(String resourceGroupName, String serviceName, String diagnosticId, boolean enabled) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, enabled).toBlocking().single().body(); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String diagnosticId, boolean enabled, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, enabled), serviceCallback); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String diagnosticId, boolean enabled) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, enabled).map(new Func1, DiagnosticContractInner>() { - @Override - public DiagnosticContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId, boolean enabled) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String ifMatch = null; - DiagnosticContractInner parameters = new DiagnosticContractInner(); - parameters.withEnabled(enabled); - return service.createOrUpdate(resourceGroupName, serviceName, diagnosticId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiagnosticContractInner object if successful. - */ - public DiagnosticContractInner createOrUpdate(String resourceGroupName, String serviceName, String diagnosticId, boolean enabled, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, enabled, ifMatch).toBlocking().single().body(); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String diagnosticId, boolean enabled, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, enabled, ifMatch), serviceCallback); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String diagnosticId, boolean enabled, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, enabled, ifMatch).map(new Func1, DiagnosticContractInner>() { - @Override - public DiagnosticContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiagnosticContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId, boolean enabled, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - DiagnosticContractInner parameters = new DiagnosticContractInner(); - parameters.withEnabled(enabled); - return service.createOrUpdate(resourceGroupName, serviceName, diagnosticId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String diagnosticId, String ifMatch, boolean enabled) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, ifMatch, enabled).toBlocking().single().body(); - } - - /** - * Updates the details of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String diagnosticId, String ifMatch, boolean enabled, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, ifMatch, enabled), serviceCallback); - } - - /** - * Updates the details of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String diagnosticId, String ifMatch, boolean enabled) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, ifMatch, enabled).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the Diagnostic specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Indicates whether a diagnostic should receive data or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId, String ifMatch, boolean enabled) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - DiagnosticContractInner parameters = new DiagnosticContractInner(); - parameters.withEnabled(enabled); - return service.update(resourceGroupName, serviceName, diagnosticId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified Diagnostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String diagnosticId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified Diagnostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String diagnosticId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, ifMatch), serviceCallback); - } - - /** - * Deletes the specified Diagnostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String diagnosticId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, diagnosticId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified Diagnostic. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String diagnosticId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (diagnosticId == null) { - throw new IllegalArgumentException("Parameter diagnosticId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, diagnosticId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiagnosticContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiagnosticContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all diagnostics of the API Management service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiagnosticContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateContractInner.java deleted file mode 100644 index e56c2433131..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateContractInner.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.EmailTemplateParametersContractProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Email Template details. - */ -@JsonFlatten -public class EmailTemplateContractInner extends Resource { - /** - * Subject of the Template. - */ - @JsonProperty(value = "properties.subject", required = true) - private String subject; - - /** - * Email Template Body. This should be a valid XDocument. - */ - @JsonProperty(value = "properties.body", required = true) - private String body; - - /** - * Title of the Template. - */ - @JsonProperty(value = "properties.title") - private String title; - - /** - * Description of the Email Template. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Whether the template is the default template provided by Api Management - * or has been edited. - */ - @JsonProperty(value = "properties.isDefault", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDefault; - - /** - * Email Template Parameter values. - */ - @JsonProperty(value = "properties.parameters") - private List parameters; - - /** - * Get the subject value. - * - * @return the subject value - */ - public String subject() { - return this.subject; - } - - /** - * Set the subject value. - * - * @param subject the subject value to set - * @return the EmailTemplateContractInner object itself. - */ - public EmailTemplateContractInner withSubject(String subject) { - this.subject = subject; - return this; - } - - /** - * Get the body value. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set the body value. - * - * @param body the body value to set - * @return the EmailTemplateContractInner object itself. - */ - public EmailTemplateContractInner withBody(String body) { - this.body = body; - return this; - } - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the EmailTemplateContractInner object itself. - */ - public EmailTemplateContractInner withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the EmailTemplateContractInner object itself. - */ - public EmailTemplateContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the isDefault value. - * - * @return the isDefault value - */ - public Boolean isDefault() { - return this.isDefault; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the EmailTemplateContractInner object itself. - */ - public EmailTemplateContractInner withParameters(List parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateGetEntityTagHeadersInner.java deleted file mode 100644 index bf6b6e85774..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class EmailTemplateGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the EmailTemplateGetEntityTagHeadersInner object itself. - */ - public EmailTemplateGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateGetHeadersInner.java deleted file mode 100644 index 511a7394738..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class EmailTemplateGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the EmailTemplateGetHeadersInner object itself. - */ - public EmailTemplateGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateUpdateParametersInner.java deleted file mode 100644 index dbc14f1d03c..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplateUpdateParametersInner.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.EmailTemplateParametersContractProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Email Template update Parameters. - */ -@JsonFlatten -public class EmailTemplateUpdateParametersInner { - /** - * Subject of the Template. - */ - @JsonProperty(value = "properties.subject") - private String subject; - - /** - * Title of the Template. - */ - @JsonProperty(value = "properties.title") - private String title; - - /** - * Description of the Email Template. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Email Template Body. This should be a valid XDocument. - */ - @JsonProperty(value = "properties.body") - private String body; - - /** - * Email Template Parameter values. - */ - @JsonProperty(value = "properties.parameters") - private List parameters; - - /** - * Get the subject value. - * - * @return the subject value - */ - public String subject() { - return this.subject; - } - - /** - * Set the subject value. - * - * @param subject the subject value to set - * @return the EmailTemplateUpdateParametersInner object itself. - */ - public EmailTemplateUpdateParametersInner withSubject(String subject) { - this.subject = subject; - return this; - } - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the EmailTemplateUpdateParametersInner object itself. - */ - public EmailTemplateUpdateParametersInner withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the EmailTemplateUpdateParametersInner object itself. - */ - public EmailTemplateUpdateParametersInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the body value. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set the body value. - * - * @param body the body value to set - * @return the EmailTemplateUpdateParametersInner object itself. - */ - public EmailTemplateUpdateParametersInner withBody(String body) { - this.body = body; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the EmailTemplateUpdateParametersInner object itself. - */ - public EmailTemplateUpdateParametersInner withParameters(List parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplatesInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplatesInner.java deleted file mode 100644 index b0e927e32ba..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/EmailTemplatesInner.java +++ /dev/null @@ -1,1047 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.management.apimanagement.TemplateName; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in EmailTemplates. - */ -public class EmailTemplatesInner { - /** The Retrofit service to perform REST calls. */ - private EmailTemplatesService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of EmailTemplatesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public EmailTemplatesInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(EmailTemplatesService.class); - this.client = client; - } - - /** - * The interface defining all the services for EmailTemplates to be - * used by Retrofit to perform actually REST calls. - */ - interface EmailTemplatesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.EmailTemplates listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.EmailTemplates getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("templateName") TemplateName templateName1, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.EmailTemplates get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("templateName") TemplateName templateName1, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.EmailTemplates createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("templateName") TemplateName templateName1, @Path("subscriptionId") String subscriptionId, @Body EmailTemplateUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.EmailTemplates update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("templateName") TemplateName templateName1, @Path("subscriptionId") String subscriptionId, @Body EmailTemplateUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.EmailTemplates delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("templateName") TemplateName templateName1, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.EmailTemplates listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EmailTemplateContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EmailTemplateContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EmailTemplateContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EmailTemplateContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EmailTemplateContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EmailTemplateContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EmailTemplateContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EmailTemplateContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, TemplateName templateName) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, templateName).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, TemplateName templateName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, templateName), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, TemplateName templateName) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, templateName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, TemplateName templateName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (templateName == null) { - throw new IllegalArgumentException("Parameter templateName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, templateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, EmailTemplateGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the email template specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the EmailTemplateContractInner object if successful. - */ - public EmailTemplateContractInner get(String resourceGroupName, String serviceName, TemplateName templateName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, templateName).toBlocking().single().body(); - } - - /** - * Gets the details of the email template specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, TemplateName templateName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, templateName), serviceCallback); - } - - /** - * Gets the details of the email template specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EmailTemplateContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, TemplateName templateName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, templateName).map(new Func1, EmailTemplateContractInner>() { - @Override - public EmailTemplateContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the email template specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EmailTemplateContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, TemplateName templateName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (templateName == null) { - throw new IllegalArgumentException("Parameter templateName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, templateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, EmailTemplateGetHeadersInner.class); - } - - /** - * Updates an Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Email Template update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the EmailTemplateContractInner object if successful. - */ - public EmailTemplateContractInner createOrUpdate(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters).toBlocking().single().body(); - } - - /** - * Updates an Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Email Template update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters), serviceCallback); - } - - /** - * Updates an Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Email Template update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EmailTemplateContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters).map(new Func1, EmailTemplateContractInner>() { - @Override - public EmailTemplateContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Email Template update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EmailTemplateContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (templateName == null) { - throw new IllegalArgumentException("Parameter templateName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, templateName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Email Template update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the EmailTemplateContractInner object if successful. - */ - public EmailTemplateContractInner createOrUpdate(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Email Template update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters, ifMatch), serviceCallback); - } - - /** - * Updates an Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Email Template update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EmailTemplateContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters, ifMatch).map(new Func1, EmailTemplateContractInner>() { - @Override - public EmailTemplateContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Email Template update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EmailTemplateContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (templateName == null) { - throw new IllegalArgumentException("Parameter templateName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, templateName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the specific Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters).toBlocking().single().body(); - } - - /** - * Updates the specific Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters), serviceCallback); - } - - /** - * Updates the specific Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the specific Email Template. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param parameters Update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (templateName == null) { - throw new IllegalArgumentException("Parameter templateName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, templateName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Reset the Email Template to default template provided by the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, TemplateName templateName, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, templateName, ifMatch).toBlocking().single().body(); - } - - /** - * Reset the Email Template to default template provided by the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, TemplateName templateName, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, templateName, ifMatch), serviceCallback); - } - - /** - * Reset the Email Template to default template provided by the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, TemplateName templateName, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, templateName, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Reset the Email Template to default template provided by the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', 'quotaLimitApproachingDeveloperNotificationMessage', 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', 'inviteUserNotificationMessage', 'newCommentNotificationMessage', 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', 'passwordResetByAdminNotificationMessage', 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, TemplateName templateName, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (templateName == null) { - throw new IllegalArgumentException("Parameter templateName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, templateName, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EmailTemplateContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EmailTemplateContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EmailTemplateContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EmailTemplateContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GenerateSsoUrlResultInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GenerateSsoUrlResultInner.java deleted file mode 100644 index 84c1af8c7d0..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GenerateSsoUrlResultInner.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Generate SSO Url operations response details. - */ -public class GenerateSsoUrlResultInner { - /** - * Redirect Url containing the SSO URL value. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the GenerateSsoUrlResultInner object itself. - */ - public GenerateSsoUrlResultInner withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupContractInner.java deleted file mode 100644 index fb585927737..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupContractInner.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.GroupType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Contract details. - */ -@JsonFlatten -public class GroupContractInner extends Resource { - /** - * Group name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * Group description. Can contain HTML formatting tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * true if the group is one of the three system groups (Administrators, - * Developers, or Guests); otherwise false. - */ - @JsonProperty(value = "properties.builtIn", access = JsonProperty.Access.WRITE_ONLY) - private Boolean builtIn; - - /** - * Group type. Possible values include: 'custom', 'system', 'external'. - */ - @JsonProperty(value = "properties.type") - private GroupType groupContractType; - - /** - * For external groups, this property contains the id of the group from the - * external identity provider, e.g. for Azure Active Directory - * aad://<tenant>.onmicrosoft.com/groups/<group object id>; - * otherwise the value is null. - */ - @JsonProperty(value = "properties.externalId") - private String externalId; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the GroupContractInner object itself. - */ - public GroupContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the GroupContractInner object itself. - */ - public GroupContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the builtIn value. - * - * @return the builtIn value - */ - public Boolean builtIn() { - return this.builtIn; - } - - /** - * Get the groupContractType value. - * - * @return the groupContractType value - */ - public GroupType groupContractType() { - return this.groupContractType; - } - - /** - * Set the groupContractType value. - * - * @param groupContractType the groupContractType value to set - * @return the GroupContractInner object itself. - */ - public GroupContractInner withGroupContractType(GroupType groupContractType) { - this.groupContractType = groupContractType; - return this; - } - - /** - * Get the externalId value. - * - * @return the externalId value - */ - public String externalId() { - return this.externalId; - } - - /** - * Set the externalId value. - * - * @param externalId the externalId value to set - * @return the GroupContractInner object itself. - */ - public GroupContractInner withExternalId(String externalId) { - this.externalId = externalId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupCreateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupCreateParametersInner.java deleted file mode 100644 index 1d8bf01000e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupCreateParametersInner.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.GroupType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters supplied to the Create Group operation. - */ -@JsonFlatten -public class GroupCreateParametersInner { - /** - * Group name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * Group description. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Group type. Possible values include: 'custom', 'system', 'external'. - */ - @JsonProperty(value = "properties.type") - private GroupType type; - - /** - * Identifier of the external groups, this property contains the id of the - * group from the external identity provider, e.g. for Azure Active - * Directory aad://<tenant>.onmicrosoft.com/groups/<group object - * id>; otherwise the value is null. - */ - @JsonProperty(value = "properties.externalId") - private String externalId; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the GroupCreateParametersInner object itself. - */ - public GroupCreateParametersInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the GroupCreateParametersInner object itself. - */ - public GroupCreateParametersInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public GroupType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the GroupCreateParametersInner object itself. - */ - public GroupCreateParametersInner withType(GroupType type) { - this.type = type; - return this; - } - - /** - * Get the externalId value. - * - * @return the externalId value - */ - public String externalId() { - return this.externalId; - } - - /** - * Set the externalId value. - * - * @param externalId the externalId value to set - * @return the GroupCreateParametersInner object itself. - */ - public GroupCreateParametersInner withExternalId(String externalId) { - this.externalId = externalId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupGetEntityTagHeadersInner.java deleted file mode 100644 index e99072af4f7..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class GroupGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the GroupGetEntityTagHeadersInner object itself. - */ - public GroupGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupGetHeadersInner.java deleted file mode 100644 index 7ecb1be0335..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class GroupGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the GroupGetHeadersInner object itself. - */ - public GroupGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupUpdateParametersInner.java deleted file mode 100644 index d555df89b4d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupUpdateParametersInner.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.GroupType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters supplied to the Update Group operation. - */ -@JsonFlatten -public class GroupUpdateParametersInner { - /** - * Group name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Group description. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Group type. Possible values include: 'custom', 'system', 'external'. - */ - @JsonProperty(value = "properties.type") - private GroupType type; - - /** - * Identifier of the external groups, this property contains the id of the - * group from the external identity provider, e.g. for Azure Active - * Directory aad://<tenant>.onmicrosoft.com/groups/<group object - * id>; otherwise the value is null. - */ - @JsonProperty(value = "properties.externalId") - private String externalId; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the GroupUpdateParametersInner object itself. - */ - public GroupUpdateParametersInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the GroupUpdateParametersInner object itself. - */ - public GroupUpdateParametersInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public GroupType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the GroupUpdateParametersInner object itself. - */ - public GroupUpdateParametersInner withType(GroupType type) { - this.type = type; - return this; - } - - /** - * Get the externalId value. - * - * @return the externalId value - */ - public String externalId() { - return this.externalId; - } - - /** - * Set the externalId value. - * - * @param externalId the externalId value to set - * @return the GroupUpdateParametersInner object itself. - */ - public GroupUpdateParametersInner withExternalId(String externalId) { - this.externalId = externalId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupUsersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupUsersInner.java deleted file mode 100644 index 78ff7ec60bb..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupUsersInner.java +++ /dev/null @@ -1,811 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in GroupUsers. - */ -public class GroupUsersInner { - /** The Retrofit service to perform REST calls. */ - private GroupUsersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of GroupUsersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public GroupUsersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(GroupUsersService.class); - this.client = client; - } - - /** - * The interface defining all the services for GroupUsers to be - * used by Retrofit to perform actually REST calls. - */ - interface GroupUsersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.GroupUsers list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.GroupUsers checkEntityExists" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}") - Observable> checkEntityExists(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.GroupUsers create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}") - Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.GroupUsers delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.GroupUsers listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String groupId) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, groupId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String groupId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, groupId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String groupId) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, groupId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String groupId) { - return listSinglePageAsync(resourceGroupName, serviceName, groupId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String groupId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.list(resourceGroupName, serviceName, groupId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String groupId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, groupId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String groupId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, groupId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String groupId, final String filter, final Integer top, final Integer skip) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, groupId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String groupId, final String filter, final Integer top, final Integer skip) { - return listSinglePageAsync(resourceGroupName, serviceName, groupId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param groupId Group identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String groupId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, serviceName, groupId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Checks that user entity specified by identifier is associated with the group entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the boolean object if successful. - */ - public boolean checkEntityExists(String resourceGroupName, String serviceName, String groupId, String uid) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid).toBlocking().single().body(); - } - - /** - * Checks that user entity specified by identifier is associated with the group entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkEntityExistsAsync(String resourceGroupName, String serviceName, String groupId, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid), serviceCallback); - } - - /** - * Checks that user entity specified by identifier is associated with the group entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable checkEntityExistsAsync(String resourceGroupName, String serviceName, String groupId, String uid) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid).map(new Func1, Boolean>() { - @Override - public Boolean call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks that user entity specified by identifier is associated with the group entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable> checkEntityExistsWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.checkEntityExists(resourceGroupName, serviceName, groupId, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkEntityExistsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkEntityExistsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmpty(response); - } - - /** - * Adds a user to the specified group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserContractInner object if successful. - */ - public UserContractInner create(String resourceGroupName, String serviceName, String groupId, String uid) { - return createWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid).toBlocking().single().body(); - } - - /** - * Adds a user to the specified group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String serviceName, String groupId, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid), serviceCallback); - } - - /** - * Adds a user to the specified group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserContractInner object - */ - public Observable createAsync(String resourceGroupName, String serviceName, String groupId, String uid) { - return createWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid).map(new Func1, UserContractInner>() { - @Override - public UserContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Adds a user to the specified group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserContractInner object - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.create(resourceGroupName, serviceName, groupId, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Remove existing user from existing group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String groupId, String uid) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid).toBlocking().single().body(); - } - - /** - * Remove existing user from existing group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String groupId, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid), serviceCallback); - } - - /** - * Remove existing user from existing group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String groupId, String uid) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, groupId, uid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Remove existing user from existing group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, groupId, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserContractInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the members of the group, specified by its identifier. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupsInner.java deleted file mode 100644 index 03f090faf16..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/GroupsInner.java +++ /dev/null @@ -1,1084 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Groups. - */ -public class GroupsInner { - /** The Retrofit service to perform REST calls. */ - private GroupsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of GroupsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public GroupsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(GroupsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Groups to be - * used by Retrofit to perform actually REST calls. - */ - interface GroupsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Groups listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Groups getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Groups get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Groups createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Body GroupCreateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Groups update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Body GroupUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Groups delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Groups listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of groups defined within a service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String groupId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, groupId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String groupId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, groupId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String groupId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, groupId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, groupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, GroupGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the GroupContractInner object if successful. - */ - public GroupContractInner get(String resourceGroupName, String serviceName, String groupId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, groupId).toBlocking().single().body(); - } - - /** - * Gets the details of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String groupId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, groupId), serviceCallback); - } - - /** - * Gets the details of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GroupContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String groupId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, groupId).map(new Func1, GroupContractInner>() { - @Override - public GroupContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GroupContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, groupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, GroupGetHeadersInner.class); - } - - /** - * Creates or Updates a group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the GroupContractInner object if successful. - */ - public GroupContractInner createOrUpdate(String resourceGroupName, String serviceName, String groupId, GroupCreateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates a group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String groupId, GroupCreateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters), serviceCallback); - } - - /** - * Creates or Updates a group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GroupContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String groupId, GroupCreateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters).map(new Func1, GroupContractInner>() { - @Override - public GroupContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GroupContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId, GroupCreateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, groupId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates a group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the GroupContractInner object if successful. - */ - public GroupContractInner createOrUpdate(String resourceGroupName, String serviceName, String groupId, GroupCreateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or Updates a group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String groupId, GroupCreateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or Updates a group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GroupContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String groupId, GroupCreateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch).map(new Func1, GroupContractInner>() { - @Override - public GroupContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GroupContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId, GroupCreateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, groupId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String groupId, GroupUpdateParametersInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the details of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String groupId, GroupUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the details of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String groupId, GroupUpdateParametersInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the group specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId, GroupUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, groupId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes specific group of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String groupId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, groupId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes specific group of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String groupId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, groupId, ifMatch), serviceCallback); - } - - /** - * Deletes specific group of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String groupId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, groupId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific group of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String groupId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, groupId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of groups defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of groups defined within a service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderContractInner.java deleted file mode 100644 index 68bf9e3fd69..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderContractInner.java +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.IdentityProviderType; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Identity Provider details. - */ -@JsonFlatten -public class IdentityProviderContractInner extends Resource { - /** - * Identity Provider Type identifier. Possible values include: 'facebook', - * 'google', 'microsoft', 'twitter', 'aad', 'aadB2C'. - */ - @JsonProperty(value = "properties.type") - private IdentityProviderType identityProviderContractType; - - /** - * List of Allowed Tenants when configuring Azure Active Directory login. - */ - @JsonProperty(value = "properties.allowedTenants") - private List allowedTenants; - - /** - * Signup Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "properties.signupPolicyName") - private String signupPolicyName; - - /** - * Signin Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "properties.signinPolicyName") - private String signinPolicyName; - - /** - * Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "properties.profileEditingPolicyName") - private String profileEditingPolicyName; - - /** - * Password Reset Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "properties.passwordResetPolicyName") - private String passwordResetPolicyName; - - /** - * Client Id of the Application in the external Identity Provider. It is - * App ID for Facebook login, Client ID for Google login, App ID for - * Microsoft. - */ - @JsonProperty(value = "properties.clientId", required = true) - private String clientId; - - /** - * Client secret of the Application in external Identity Provider, used to - * authenticate login request. For example, it is App Secret for Facebook - * login, API Key for Google login, Public Key for Microsoft. - */ - @JsonProperty(value = "properties.clientSecret", required = true) - private String clientSecret; - - /** - * Get the identityProviderContractType value. - * - * @return the identityProviderContractType value - */ - public IdentityProviderType identityProviderContractType() { - return this.identityProviderContractType; - } - - /** - * Set the identityProviderContractType value. - * - * @param identityProviderContractType the identityProviderContractType value to set - * @return the IdentityProviderContractInner object itself. - */ - public IdentityProviderContractInner withIdentityProviderContractType(IdentityProviderType identityProviderContractType) { - this.identityProviderContractType = identityProviderContractType; - return this; - } - - /** - * Get the allowedTenants value. - * - * @return the allowedTenants value - */ - public List allowedTenants() { - return this.allowedTenants; - } - - /** - * Set the allowedTenants value. - * - * @param allowedTenants the allowedTenants value to set - * @return the IdentityProviderContractInner object itself. - */ - public IdentityProviderContractInner withAllowedTenants(List allowedTenants) { - this.allowedTenants = allowedTenants; - return this; - } - - /** - * Get the signupPolicyName value. - * - * @return the signupPolicyName value - */ - public String signupPolicyName() { - return this.signupPolicyName; - } - - /** - * Set the signupPolicyName value. - * - * @param signupPolicyName the signupPolicyName value to set - * @return the IdentityProviderContractInner object itself. - */ - public IdentityProviderContractInner withSignupPolicyName(String signupPolicyName) { - this.signupPolicyName = signupPolicyName; - return this; - } - - /** - * Get the signinPolicyName value. - * - * @return the signinPolicyName value - */ - public String signinPolicyName() { - return this.signinPolicyName; - } - - /** - * Set the signinPolicyName value. - * - * @param signinPolicyName the signinPolicyName value to set - * @return the IdentityProviderContractInner object itself. - */ - public IdentityProviderContractInner withSigninPolicyName(String signinPolicyName) { - this.signinPolicyName = signinPolicyName; - return this; - } - - /** - * Get the profileEditingPolicyName value. - * - * @return the profileEditingPolicyName value - */ - public String profileEditingPolicyName() { - return this.profileEditingPolicyName; - } - - /** - * Set the profileEditingPolicyName value. - * - * @param profileEditingPolicyName the profileEditingPolicyName value to set - * @return the IdentityProviderContractInner object itself. - */ - public IdentityProviderContractInner withProfileEditingPolicyName(String profileEditingPolicyName) { - this.profileEditingPolicyName = profileEditingPolicyName; - return this; - } - - /** - * Get the passwordResetPolicyName value. - * - * @return the passwordResetPolicyName value - */ - public String passwordResetPolicyName() { - return this.passwordResetPolicyName; - } - - /** - * Set the passwordResetPolicyName value. - * - * @param passwordResetPolicyName the passwordResetPolicyName value to set - * @return the IdentityProviderContractInner object itself. - */ - public IdentityProviderContractInner withPasswordResetPolicyName(String passwordResetPolicyName) { - this.passwordResetPolicyName = passwordResetPolicyName; - return this; - } - - /** - * Get the clientId value. - * - * @return the clientId value - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId value. - * - * @param clientId the clientId value to set - * @return the IdentityProviderContractInner object itself. - */ - public IdentityProviderContractInner withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret value. - * - * @return the clientSecret value - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret value. - * - * @param clientSecret the clientSecret value to set - * @return the IdentityProviderContractInner object itself. - */ - public IdentityProviderContractInner withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderGetEntityTagHeadersInner.java deleted file mode 100644 index e3c5d98c99f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class IdentityProviderGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the IdentityProviderGetEntityTagHeadersInner object itself. - */ - public IdentityProviderGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderGetHeadersInner.java deleted file mode 100644 index ea74c7ea0d1..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class IdentityProviderGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the IdentityProviderGetHeadersInner object itself. - */ - public IdentityProviderGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderUpdateParametersInner.java deleted file mode 100644 index a96c6f9ef59..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProviderUpdateParametersInner.java +++ /dev/null @@ -1,234 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.IdentityProviderType; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters supplied to update Identity Provider. - */ -@JsonFlatten -public class IdentityProviderUpdateParametersInner { - /** - * Identity Provider Type identifier. Possible values include: 'facebook', - * 'google', 'microsoft', 'twitter', 'aad', 'aadB2C'. - */ - @JsonProperty(value = "properties.type") - private IdentityProviderType type; - - /** - * List of Allowed Tenants when configuring Azure Active Directory login. - */ - @JsonProperty(value = "properties.allowedTenants") - private List allowedTenants; - - /** - * Signup Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "properties.signupPolicyName") - private String signupPolicyName; - - /** - * Signin Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "properties.signinPolicyName") - private String signinPolicyName; - - /** - * Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "properties.profileEditingPolicyName") - private String profileEditingPolicyName; - - /** - * Password Reset Policy Name. Only applies to AAD B2C Identity Provider. - */ - @JsonProperty(value = "properties.passwordResetPolicyName") - private String passwordResetPolicyName; - - /** - * Client Id of the Application in the external Identity Provider. It is - * App ID for Facebook login, Client ID for Google login, App ID for - * Microsoft. - */ - @JsonProperty(value = "properties.clientId") - private String clientId; - - /** - * Client secret of the Application in external Identity Provider, used to - * authenticate login request. For example, it is App Secret for Facebook - * login, API Key for Google login, Public Key for Microsoft. - */ - @JsonProperty(value = "properties.clientSecret") - private String clientSecret; - - /** - * Get the type value. - * - * @return the type value - */ - public IdentityProviderType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the IdentityProviderUpdateParametersInner object itself. - */ - public IdentityProviderUpdateParametersInner withType(IdentityProviderType type) { - this.type = type; - return this; - } - - /** - * Get the allowedTenants value. - * - * @return the allowedTenants value - */ - public List allowedTenants() { - return this.allowedTenants; - } - - /** - * Set the allowedTenants value. - * - * @param allowedTenants the allowedTenants value to set - * @return the IdentityProviderUpdateParametersInner object itself. - */ - public IdentityProviderUpdateParametersInner withAllowedTenants(List allowedTenants) { - this.allowedTenants = allowedTenants; - return this; - } - - /** - * Get the signupPolicyName value. - * - * @return the signupPolicyName value - */ - public String signupPolicyName() { - return this.signupPolicyName; - } - - /** - * Set the signupPolicyName value. - * - * @param signupPolicyName the signupPolicyName value to set - * @return the IdentityProviderUpdateParametersInner object itself. - */ - public IdentityProviderUpdateParametersInner withSignupPolicyName(String signupPolicyName) { - this.signupPolicyName = signupPolicyName; - return this; - } - - /** - * Get the signinPolicyName value. - * - * @return the signinPolicyName value - */ - public String signinPolicyName() { - return this.signinPolicyName; - } - - /** - * Set the signinPolicyName value. - * - * @param signinPolicyName the signinPolicyName value to set - * @return the IdentityProviderUpdateParametersInner object itself. - */ - public IdentityProviderUpdateParametersInner withSigninPolicyName(String signinPolicyName) { - this.signinPolicyName = signinPolicyName; - return this; - } - - /** - * Get the profileEditingPolicyName value. - * - * @return the profileEditingPolicyName value - */ - public String profileEditingPolicyName() { - return this.profileEditingPolicyName; - } - - /** - * Set the profileEditingPolicyName value. - * - * @param profileEditingPolicyName the profileEditingPolicyName value to set - * @return the IdentityProviderUpdateParametersInner object itself. - */ - public IdentityProviderUpdateParametersInner withProfileEditingPolicyName(String profileEditingPolicyName) { - this.profileEditingPolicyName = profileEditingPolicyName; - return this; - } - - /** - * Get the passwordResetPolicyName value. - * - * @return the passwordResetPolicyName value - */ - public String passwordResetPolicyName() { - return this.passwordResetPolicyName; - } - - /** - * Set the passwordResetPolicyName value. - * - * @param passwordResetPolicyName the passwordResetPolicyName value to set - * @return the IdentityProviderUpdateParametersInner object itself. - */ - public IdentityProviderUpdateParametersInner withPasswordResetPolicyName(String passwordResetPolicyName) { - this.passwordResetPolicyName = passwordResetPolicyName; - return this; - } - - /** - * Get the clientId value. - * - * @return the clientId value - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId value. - * - * @param clientId the clientId value to set - * @return the IdentityProviderUpdateParametersInner object itself. - */ - public IdentityProviderUpdateParametersInner withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret value. - * - * @return the clientSecret value - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret value. - * - * @param clientSecret the clientSecret value to set - * @return the IdentityProviderUpdateParametersInner object itself. - */ - public IdentityProviderUpdateParametersInner withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProvidersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProvidersInner.java deleted file mode 100644 index 347e077f196..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/IdentityProvidersInner.java +++ /dev/null @@ -1,925 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.management.apimanagement.IdentityProviderType; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in IdentityProviders. - */ -public class IdentityProvidersInner { - /** The Retrofit service to perform REST calls. */ - private IdentityProvidersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of IdentityProvidersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public IdentityProvidersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(IdentityProvidersService.class); - this.client = client; - } - - /** - * The interface defining all the services for IdentityProviders to be - * used by Retrofit to perform actually REST calls. - */ - interface IdentityProvidersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.IdentityProviders listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders") - Observable> listByService(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.IdentityProviders getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}") - Observable> getEntityTag(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("identityProviderName") IdentityProviderType identityProviderName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.IdentityProviders get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("identityProviderName") IdentityProviderType identityProviderName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.IdentityProviders createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("identityProviderName") IdentityProviderType identityProviderName, @Path("subscriptionId") String subscriptionId, @Body IdentityProviderContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.IdentityProviders update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("identityProviderName") IdentityProviderType identityProviderName, @Path("subscriptionId") String subscriptionId, @Body IdentityProviderUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.IdentityProviders delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("identityProviderName") IdentityProviderType identityProviderName, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.IdentityProviders listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IdentityProviderContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IdentityProviderContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IdentityProviderContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IdentityProviderContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (identityProviderName == null) { - throw new IllegalArgumentException("Parameter identityProviderName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(this.client.subscriptionId(), resourceGroupName, serviceName, identityProviderName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, IdentityProviderGetEntityTagHeadersInner.class); - } - - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IdentityProviderContractInner object if successful. - */ - public IdentityProviderContractInner get(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName).toBlocking().single().body(); - } - - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName), serviceCallback); - } - - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IdentityProviderContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName).map(new Func1, IdentityProviderContractInner>() { - @Override - public IdentityProviderContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IdentityProviderContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (identityProviderName == null) { - throw new IllegalArgumentException("Parameter identityProviderName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, identityProviderName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, IdentityProviderGetHeadersInner.class); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IdentityProviderContractInner object if successful. - */ - public IdentityProviderContractInner createOrUpdate(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters), serviceCallback); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IdentityProviderContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters).map(new Func1, IdentityProviderContractInner>() { - @Override - public IdentityProviderContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IdentityProviderContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (identityProviderName == null) { - throw new IllegalArgumentException("Parameter identityProviderName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, identityProviderName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IdentityProviderContractInner object if successful. - */ - public IdentityProviderContractInner createOrUpdate(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IdentityProviderContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters, ifMatch).map(new Func1, IdentityProviderContractInner>() { - @Override - public IdentityProviderContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IdentityProviderContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (identityProviderName == null) { - throw new IllegalArgumentException("Parameter identityProviderName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, identityProviderName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates an existing IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderUpdateParametersInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an existing IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters, ifMatch), serviceCallback); - } - - /** - * Updates an existing IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderUpdateParametersInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an existing IdentityProvider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, IdentityProviderUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (identityProviderName == null) { - throw new IllegalArgumentException("Parameter identityProviderName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, identityProviderName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified identity provider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified identity provider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, ifMatch), serviceCallback); - } - - /** - * Deletes the specified identity provider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, identityProviderName, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified identity provider configuration. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. Possible values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, IdentityProviderType identityProviderName, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (identityProviderName == null) { - throw new IllegalArgumentException("Parameter identityProviderName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, identityProviderName, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IdentityProviderContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IdentityProviderContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IdentityProviderContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IdentityProviderContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerContractInner.java deleted file mode 100644 index ca0d20f84f0..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerContractInner.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.LoggerType; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Logger details. - */ -@JsonFlatten -public class LoggerContractInner extends Resource { - /** - * Logger type. Possible values include: 'azureEventHub', - * 'applicationInsights'. - */ - @JsonProperty(value = "properties.loggerType", required = true) - private LoggerType loggerType; - - /** - * Logger description. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The name and SendRule connection string of the event hub for - * azureEventHub logger. - * Instrumentation key for applicationInsights logger. - */ - @JsonProperty(value = "properties.credentials", required = true) - private Map credentials; - - /** - * Whether records are buffered in the logger before publishing. Default is - * assumed to be true. - */ - @JsonProperty(value = "properties.isBuffered") - private Boolean isBuffered; - - /** - * Get the loggerType value. - * - * @return the loggerType value - */ - public LoggerType loggerType() { - return this.loggerType; - } - - /** - * Set the loggerType value. - * - * @param loggerType the loggerType value to set - * @return the LoggerContractInner object itself. - */ - public LoggerContractInner withLoggerType(LoggerType loggerType) { - this.loggerType = loggerType; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the LoggerContractInner object itself. - */ - public LoggerContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the credentials value. - * - * @return the credentials value - */ - public Map credentials() { - return this.credentials; - } - - /** - * Set the credentials value. - * - * @param credentials the credentials value to set - * @return the LoggerContractInner object itself. - */ - public LoggerContractInner withCredentials(Map credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the isBuffered value. - * - * @return the isBuffered value - */ - public Boolean isBuffered() { - return this.isBuffered; - } - - /** - * Set the isBuffered value. - * - * @param isBuffered the isBuffered value to set - * @return the LoggerContractInner object itself. - */ - public LoggerContractInner withIsBuffered(Boolean isBuffered) { - this.isBuffered = isBuffered; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerGetEntityTagHeadersInner.java deleted file mode 100644 index 6a34314b1f8..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class LoggerGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the LoggerGetEntityTagHeadersInner object itself. - */ - public LoggerGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerGetHeadersInner.java deleted file mode 100644 index a0eb0f95dff..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class LoggerGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the LoggerGetHeadersInner object itself. - */ - public LoggerGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerUpdateContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerUpdateContractInner.java deleted file mode 100644 index c100e392024..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggerUpdateContractInner.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.LoggerType; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Logger update contract. - */ -@JsonFlatten -public class LoggerUpdateContractInner { - /** - * Logger type. Possible values include: 'azureEventHub', - * 'applicationInsights'. - */ - @JsonProperty(value = "properties.loggerType") - private LoggerType loggerType; - - /** - * Logger description. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Logger credentials. - */ - @JsonProperty(value = "properties.credentials") - private Map credentials; - - /** - * Whether records are buffered in the logger before publishing. Default is - * assumed to be true. - */ - @JsonProperty(value = "properties.isBuffered") - private Boolean isBuffered; - - /** - * Get the loggerType value. - * - * @return the loggerType value - */ - public LoggerType loggerType() { - return this.loggerType; - } - - /** - * Set the loggerType value. - * - * @param loggerType the loggerType value to set - * @return the LoggerUpdateContractInner object itself. - */ - public LoggerUpdateContractInner withLoggerType(LoggerType loggerType) { - this.loggerType = loggerType; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the LoggerUpdateContractInner object itself. - */ - public LoggerUpdateContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the credentials value. - * - * @return the credentials value - */ - public Map credentials() { - return this.credentials; - } - - /** - * Set the credentials value. - * - * @param credentials the credentials value to set - * @return the LoggerUpdateContractInner object itself. - */ - public LoggerUpdateContractInner withCredentials(Map credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the isBuffered value. - * - * @return the isBuffered value - */ - public Boolean isBuffered() { - return this.isBuffered; - } - - /** - * Set the isBuffered value. - * - * @param isBuffered the isBuffered value to set - * @return the LoggerUpdateContractInner object itself. - */ - public LoggerUpdateContractInner withIsBuffered(Boolean isBuffered) { - this.isBuffered = isBuffered; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggersInner.java deleted file mode 100644 index 6f2115659d3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/LoggersInner.java +++ /dev/null @@ -1,1073 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Loggers. - */ -public class LoggersInner { - /** The Retrofit service to perform REST calls. */ - private LoggersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of LoggersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public LoggersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(LoggersService.class); - this.client = client; - } - - /** - * The interface defining all the services for Loggers to be - * used by Retrofit to perform actually REST calls. - */ - interface LoggersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Loggers listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Loggers getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Loggers get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Loggers createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Body LoggerContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Loggers update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Body LoggerUpdateContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Loggers delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("loggerid") String loggerid, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Loggers listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq | | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String loggerid) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, loggerid).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String loggerid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, loggerid), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String loggerid) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, loggerid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String loggerid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, loggerid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, LoggerGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the logger specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LoggerContractInner object if successful. - */ - public LoggerContractInner get(String resourceGroupName, String serviceName, String loggerid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, loggerid).toBlocking().single().body(); - } - - /** - * Gets the details of the logger specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String loggerid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, loggerid), serviceCallback); - } - - /** - * Gets the details of the logger specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String loggerid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, loggerid).map(new Func1, LoggerContractInner>() { - @Override - public LoggerContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the logger specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String loggerid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, loggerid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, LoggerGetHeadersInner.class); - } - - /** - * Creates or Updates a logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LoggerContractInner object if successful. - */ - public LoggerContractInner createOrUpdate(String resourceGroupName, String serviceName, String loggerid, LoggerContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates a logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String loggerid, LoggerContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters), serviceCallback); - } - - /** - * Creates or Updates a logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String loggerid, LoggerContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters).map(new Func1, LoggerContractInner>() { - @Override - public LoggerContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String loggerid, LoggerContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, loggerid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates a logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LoggerContractInner object if successful. - */ - public LoggerContractInner createOrUpdate(String resourceGroupName, String serviceName, String loggerid, LoggerContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or Updates a logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String loggerid, LoggerContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or Updates a logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String loggerid, LoggerContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters, ifMatch).map(new Func1, LoggerContractInner>() { - @Override - public LoggerContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoggerContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String loggerid, LoggerContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, loggerid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates an existing logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String loggerid, LoggerUpdateContractInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an existing logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String loggerid, LoggerUpdateContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters, ifMatch), serviceCallback); - } - - /** - * Updates an existing logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String loggerid, LoggerUpdateContractInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an existing logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String loggerid, LoggerUpdateContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, loggerid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String loggerid, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String loggerid, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, ifMatch), serviceCallback); - } - - /** - * Deletes the specified logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String loggerid, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, loggerid, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified logger. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param loggerid Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String loggerid, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (loggerid == null) { - throw new IllegalArgumentException("Parameter loggerid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, loggerid, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LoggerContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LoggerContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of loggers in the specified service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LoggerContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusContractByLocationInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusContractByLocationInner.java deleted file mode 100644 index c0555222ca9..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusContractByLocationInner.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Network Status in the Location. - */ -public class NetworkStatusContractByLocationInner { - /** - * Location of service. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Network status in Location. - */ - @JsonProperty(value = "networkStatus") - private NetworkStatusContractInner networkStatus; - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the NetworkStatusContractByLocationInner object itself. - */ - public NetworkStatusContractByLocationInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the networkStatus value. - * - * @return the networkStatus value - */ - public NetworkStatusContractInner networkStatus() { - return this.networkStatus; - } - - /** - * Set the networkStatus value. - * - * @param networkStatus the networkStatus value to set - * @return the NetworkStatusContractByLocationInner object itself. - */ - public NetworkStatusContractByLocationInner withNetworkStatus(NetworkStatusContractInner networkStatus) { - this.networkStatus = networkStatus; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusContractInner.java deleted file mode 100644 index 29aa117a36a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusContractInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.ConnectivityStatusContract; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Network Status details. - */ -public class NetworkStatusContractInner { - /** - * Gets the list of DNS servers IPV4 addresses. - */ - @JsonProperty(value = "dnsServers", required = true) - private List dnsServers; - - /** - * Gets the list of Connectivity Status to the Resources on which the - * service depends upon. - */ - @JsonProperty(value = "connectivityStatus", required = true) - private List connectivityStatus; - - /** - * Get the dnsServers value. - * - * @return the dnsServers value - */ - public List dnsServers() { - return this.dnsServers; - } - - /** - * Set the dnsServers value. - * - * @param dnsServers the dnsServers value to set - * @return the NetworkStatusContractInner object itself. - */ - public NetworkStatusContractInner withDnsServers(List dnsServers) { - this.dnsServers = dnsServers; - return this; - } - - /** - * Get the connectivityStatus value. - * - * @return the connectivityStatus value - */ - public List connectivityStatus() { - return this.connectivityStatus; - } - - /** - * Set the connectivityStatus value. - * - * @param connectivityStatus the connectivityStatus value to set - * @return the NetworkStatusContractInner object itself. - */ - public NetworkStatusContractInner withConnectivityStatus(List connectivityStatus) { - this.connectivityStatus = connectivityStatus; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusInner.java deleted file mode 100644 index dbf0c5e8df3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NetworkStatusInner.java +++ /dev/null @@ -1,244 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in NetworkStatus. - */ -public class NetworkStatusInner { - /** The Retrofit service to perform REST calls. */ - private NetworkStatusService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of NetworkStatusInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NetworkStatusInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(NetworkStatusService.class); - this.client = client; - } - - /** - * The interface defining all the services for NetworkStatus to be - * used by Retrofit to perform actually REST calls. - */ - interface NetworkStatusService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NetworkStatus listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus") - Observable> listByService(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NetworkStatus listByLocation" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus") - Observable> listByLocation(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("locationName") String locationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException 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<NetworkStatusContractByLocationInner> object if successful. - */ - public List listByService(String resourceGroupName, String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(String resourceGroupName, String serviceName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByServiceWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<NetworkStatusContractByLocationInner> object - */ - public Observable> listByServiceAsync(String resourceGroupName, String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<NetworkStatusContractByLocationInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> clientResponse = listByServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NetworkStatusContractInner object if successful. - */ - public NetworkStatusContractInner listByLocation(String resourceGroupName, String serviceName, String locationName) { - return listByLocationWithServiceResponseAsync(resourceGroupName, serviceName, locationName).toBlocking().single().body(); - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByLocationAsync(String resourceGroupName, String serviceName, String locationName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByLocationWithServiceResponseAsync(resourceGroupName, serviceName, locationName), serviceCallback); - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkStatusContractInner object - */ - public Observable listByLocationAsync(String resourceGroupName, String serviceName, String locationName) { - return listByLocationWithServiceResponseAsync(resourceGroupName, serviceName, locationName).map(new Func1, NetworkStatusContractInner>() { - @Override - public NetworkStatusContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkStatusContractInner object - */ - public Observable> listByLocationWithServiceResponseAsync(String resourceGroupName, String serviceName, String locationName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (locationName == null) { - throw new IllegalArgumentException("Parameter locationName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByLocation(this.client.subscriptionId(), resourceGroupName, serviceName, locationName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByLocationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listByLocationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationContractInner.java deleted file mode 100644 index d9b38052ce2..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationContractInner.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.RecipientsContractProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Notification details. - */ -@JsonFlatten -public class NotificationContractInner extends Resource { - /** - * Title of the Notification. - */ - @JsonProperty(value = "properties.title", required = true) - private String title; - - /** - * Description of the Notification. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Recipient Parameter values. - */ - @JsonProperty(value = "properties.recipients") - private RecipientsContractProperties recipients; - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the NotificationContractInner object itself. - */ - public NotificationContractInner withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the NotificationContractInner object itself. - */ - public NotificationContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the recipients value. - * - * @return the recipients value - */ - public RecipientsContractProperties recipients() { - return this.recipients; - } - - /** - * Set the recipients value. - * - * @param recipients the recipients value to set - * @return the NotificationContractInner object itself. - */ - public NotificationContractInner withRecipients(RecipientsContractProperties recipients) { - this.recipients = recipients; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationRecipientEmailsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationRecipientEmailsInner.java deleted file mode 100644 index 7fe18407f39..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationRecipientEmailsInner.java +++ /dev/null @@ -1,471 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.management.apimanagement.NotificationName; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in NotificationRecipientEmails. - */ -public class NotificationRecipientEmailsInner { - /** The Retrofit service to perform REST calls. */ - private NotificationRecipientEmailsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of NotificationRecipientEmailsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NotificationRecipientEmailsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(NotificationRecipientEmailsService.class); - this.client = client; - } - - /** - * The interface defining all the services for NotificationRecipientEmails to be - * used by Retrofit to perform actually REST calls. - */ - interface NotificationRecipientEmailsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NotificationRecipientEmails listByNotification" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails") - Observable> listByNotification(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NotificationRecipientEmails checkEntityExists" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}") - Observable> checkEntityExists(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("email") String email, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NotificationRecipientEmails createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("email") String email, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NotificationRecipientEmails delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("email") String email, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RecipientEmailCollectionInner object if successful. - */ - public RecipientEmailCollectionInner listByNotification(String resourceGroupName, String serviceName, NotificationName notificationName) { - return listByNotificationWithServiceResponseAsync(resourceGroupName, serviceName, notificationName).toBlocking().single().body(); - } - - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByNotificationAsync(String resourceGroupName, String serviceName, NotificationName notificationName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByNotificationWithServiceResponseAsync(resourceGroupName, serviceName, notificationName), serviceCallback); - } - - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RecipientEmailCollectionInner object - */ - public Observable listByNotificationAsync(String resourceGroupName, String serviceName, NotificationName notificationName) { - return listByNotificationWithServiceResponseAsync(resourceGroupName, serviceName, notificationName).map(new Func1, RecipientEmailCollectionInner>() { - @Override - public RecipientEmailCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RecipientEmailCollectionInner object - */ - public Observable> listByNotificationWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByNotification(resourceGroupName, serviceName, notificationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByNotificationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listByNotificationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Determine if Notification Recipient Email subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the boolean object if successful. - */ - public boolean checkEntityExists(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email).toBlocking().single().body(); - } - - /** - * Determine if Notification Recipient Email subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkEntityExistsAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email), serviceCallback); - } - - /** - * Determine if Notification Recipient Email subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable checkEntityExistsAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email).map(new Func1, Boolean>() { - @Override - public Boolean call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Determine if Notification Recipient Email subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable> checkEntityExistsWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (email == null) { - throw new IllegalArgumentException("Parameter email is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.checkEntityExists(resourceGroupName, serviceName, notificationName, email, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkEntityExistsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkEntityExistsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmpty(response); - } - - /** - * Adds the Email address to the list of Recipients for the Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RecipientEmailContractInner object if successful. - */ - public RecipientEmailContractInner createOrUpdate(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email).toBlocking().single().body(); - } - - /** - * Adds the Email address to the list of Recipients for the Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email), serviceCallback); - } - - /** - * Adds the Email address to the list of Recipients for the Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RecipientEmailContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email).map(new Func1, RecipientEmailContractInner>() { - @Override - public RecipientEmailContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Adds the Email address to the list of Recipients for the Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RecipientEmailContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (email == null) { - throw new IllegalArgumentException("Parameter email is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.createOrUpdate(resourceGroupName, serviceName, notificationName, email, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Removes the email from the list of Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email).toBlocking().single().body(); - } - - /** - * Removes the email from the list of Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email), serviceCallback); - } - - /** - * Removes the email from the list of Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Removes the email from the list of Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param email Email identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (email == null) { - throw new IllegalArgumentException("Parameter email is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, notificationName, email, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationRecipientUsersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationRecipientUsersInner.java deleted file mode 100644 index 0fc3676dc71..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationRecipientUsersInner.java +++ /dev/null @@ -1,471 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.management.apimanagement.NotificationName; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in NotificationRecipientUsers. - */ -public class NotificationRecipientUsersInner { - /** The Retrofit service to perform REST calls. */ - private NotificationRecipientUsersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of NotificationRecipientUsersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NotificationRecipientUsersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(NotificationRecipientUsersService.class); - this.client = client; - } - - /** - * The interface defining all the services for NotificationRecipientUsers to be - * used by Retrofit to perform actually REST calls. - */ - interface NotificationRecipientUsersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NotificationRecipientUsers listByNotification" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers") - Observable> listByNotification(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NotificationRecipientUsers checkEntityExists" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}") - Observable> checkEntityExists(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NotificationRecipientUsers createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.NotificationRecipientUsers delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RecipientUserCollectionInner object if successful. - */ - public RecipientUserCollectionInner listByNotification(String resourceGroupName, String serviceName, NotificationName notificationName) { - return listByNotificationWithServiceResponseAsync(resourceGroupName, serviceName, notificationName).toBlocking().single().body(); - } - - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByNotificationAsync(String resourceGroupName, String serviceName, NotificationName notificationName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByNotificationWithServiceResponseAsync(resourceGroupName, serviceName, notificationName), serviceCallback); - } - - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RecipientUserCollectionInner object - */ - public Observable listByNotificationAsync(String resourceGroupName, String serviceName, NotificationName notificationName) { - return listByNotificationWithServiceResponseAsync(resourceGroupName, serviceName, notificationName).map(new Func1, RecipientUserCollectionInner>() { - @Override - public RecipientUserCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RecipientUserCollectionInner object - */ - public Observable> listByNotificationWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByNotification(resourceGroupName, serviceName, notificationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByNotificationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listByNotificationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the boolean object if successful. - */ - public boolean checkEntityExists(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid).toBlocking().single().body(); - } - - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkEntityExistsAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid), serviceCallback); - } - - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable checkEntityExistsAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid).map(new Func1, Boolean>() { - @Override - public Boolean call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable> checkEntityExistsWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.checkEntityExists(resourceGroupName, serviceName, notificationName, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkEntityExistsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkEntityExistsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmpty(response); - } - - /** - * Adds the API Management User to the list of Recipients for the Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RecipientUserContractInner object if successful. - */ - public RecipientUserContractInner createOrUpdate(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid).toBlocking().single().body(); - } - - /** - * Adds the API Management User to the list of Recipients for the Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid), serviceCallback); - } - - /** - * Adds the API Management User to the list of Recipients for the Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RecipientUserContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid).map(new Func1, RecipientUserContractInner>() { - @Override - public RecipientUserContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Adds the API Management User to the list of Recipients for the Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RecipientUserContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.createOrUpdate(resourceGroupName, serviceName, notificationName, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Removes the API Management user from the list of Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid).toBlocking().single().body(); - } - - /** - * Removes the API Management user from the list of Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid), serviceCallback); - } - - /** - * Removes the API Management user from the list of Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, uid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Removes the API Management user from the list of Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, notificationName, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationsInner.java deleted file mode 100644 index 891cb5f9093..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/NotificationsInner.java +++ /dev/null @@ -1,720 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.management.apimanagement.NotificationName; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Notifications. - */ -public class NotificationsInner { - /** The Retrofit service to perform REST calls. */ - private NotificationsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of NotificationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NotificationsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(NotificationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Notifications to be - * used by Retrofit to perform actually REST calls. - */ - interface NotificationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Notifications listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Notifications get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Notifications createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("notificationName") NotificationName notificationName1, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Notifications listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NotificationContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NotificationContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NotificationContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NotificationContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the details of the Notification specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationContractInner object if successful. - */ - public NotificationContractInner get(String resourceGroupName, String serviceName, NotificationName notificationName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, notificationName).toBlocking().single().body(); - } - - /** - * Gets the details of the Notification specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, NotificationName notificationName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, notificationName), serviceCallback); - } - - /** - * Gets the details of the Notification specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, NotificationName notificationName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, notificationName).map(new Func1, NotificationContractInner>() { - @Override - public NotificationContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the Notification specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, notificationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates an Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationContractInner object if successful. - */ - public NotificationContractInner createOrUpdate(String resourceGroupName, String serviceName, NotificationName notificationName) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName).toBlocking().single().body(); - } - - /** - * Updates an Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, NotificationName notificationName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName), serviceCallback); - } - - /** - * Updates an Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, NotificationName notificationName) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName).map(new Func1, NotificationContractInner>() { - @Override - public NotificationContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, notificationName, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationContractInner object if successful. - */ - public NotificationContractInner createOrUpdate(String resourceGroupName, String serviceName, NotificationName notificationName, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, ifMatch), serviceCallback); - } - - /** - * Updates an Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, ifMatch).map(new Func1, NotificationContractInner>() { - @Override - public NotificationContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an Notification. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage', 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', 'QuotaLimitApproachingPublisherNotificationMessage' - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (notificationName == null) { - throw new IllegalArgumentException("Parameter notificationName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.createOrUpdate(resourceGroupName, serviceName, notificationName, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NotificationContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NotificationContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProviderGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProviderGetEntityTagHeadersInner.java deleted file mode 100644 index 19dd7ac6b0f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProviderGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class OpenIdConnectProviderGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the OpenIdConnectProviderGetEntityTagHeadersInner object itself. - */ - public OpenIdConnectProviderGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProviderGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProviderGetHeadersInner.java deleted file mode 100644 index f865c9fc555..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProviderGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class OpenIdConnectProviderGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the OpenIdConnectProviderGetHeadersInner object itself. - */ - public OpenIdConnectProviderGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProvidersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProvidersInner.java deleted file mode 100644 index 355522541f6..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenIdConnectProvidersInner.java +++ /dev/null @@ -1,1074 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in OpenIdConnectProviders. - */ -public class OpenIdConnectProvidersInner { - /** The Retrofit service to perform REST calls. */ - private OpenIdConnectProvidersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of OpenIdConnectProvidersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OpenIdConnectProvidersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(OpenIdConnectProvidersService.class); - this.client = client; - } - - /** - * The interface defining all the services for OpenIdConnectProviders to be - * used by Retrofit to perform actually REST calls. - */ - interface OpenIdConnectProvidersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.OpenIdConnectProviders listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.OpenIdConnectProviders getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("opid") String opid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.OpenIdConnectProviders get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("opid") String opid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.OpenIdConnectProviders createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("opid") String opid, @Path("subscriptionId") String subscriptionId, @Body OpenidConnectProviderContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.OpenIdConnectProviders update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("opid") String opid, @Path("subscriptionId") String subscriptionId, @Body OpenidConnectProviderUpdateContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.OpenIdConnectProviders delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("opid") String opid, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.OpenIdConnectProviders listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OpenidConnectProviderContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OpenidConnectProviderContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OpenidConnectProviderContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OpenidConnectProviderContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OpenidConnectProviderContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OpenidConnectProviderContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OpenidConnectProviderContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all OpenID Connect Providers. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OpenidConnectProviderContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String opid) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, opid).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String opid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, opid), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String opid) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, opid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String opid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (opid == null) { - throw new IllegalArgumentException("Parameter opid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, opid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, OpenIdConnectProviderGetEntityTagHeadersInner.class); - } - - /** - * Gets specific OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OpenidConnectProviderContractInner object if successful. - */ - public OpenidConnectProviderContractInner get(String resourceGroupName, String serviceName, String opid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, opid).toBlocking().single().body(); - } - - /** - * Gets specific OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String opid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, opid), serviceCallback); - } - - /** - * Gets specific OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OpenidConnectProviderContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String opid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, opid).map(new Func1, OpenidConnectProviderContractInner>() { - @Override - public OpenidConnectProviderContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets specific OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OpenidConnectProviderContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String opid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (opid == null) { - throw new IllegalArgumentException("Parameter opid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, opid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, OpenIdConnectProviderGetHeadersInner.class); - } - - /** - * Creates or updates the OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OpenidConnectProviderContractInner object if successful. - */ - public OpenidConnectProviderContractInner createOrUpdate(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates the OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters), serviceCallback); - } - - /** - * Creates or updates the OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OpenidConnectProviderContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters).map(new Func1, OpenidConnectProviderContractInner>() { - @Override - public OpenidConnectProviderContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates the OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OpenidConnectProviderContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (opid == null) { - throw new IllegalArgumentException("Parameter opid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, opid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates the OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OpenidConnectProviderContractInner object if successful. - */ - public OpenidConnectProviderContractInner createOrUpdate(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or updates the OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or updates the OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OpenidConnectProviderContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters, ifMatch).map(new Func1, OpenidConnectProviderContractInner>() { - @Override - public OpenidConnectProviderContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates the OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OpenidConnectProviderContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (opid == null) { - throw new IllegalArgumentException("Parameter opid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, opid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the specific OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderUpdateContractInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the specific OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderUpdateContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the specific OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderUpdateContractInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, opid, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the specific OpenID Connect Provider. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String opid, OpenidConnectProviderUpdateContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (opid == null) { - throw new IllegalArgumentException("Parameter opid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, opid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String opid, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, opid, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String opid, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, opid, ifMatch), serviceCallback); - } - - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String opid, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, opid, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String opid, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (opid == null) { - throw new IllegalArgumentException("Parameter opid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, opid, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OpenidConnectProviderContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all OpenID Connect Providers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OpenidConnectProviderContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all OpenID Connect Providers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OpenidConnectProviderContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all OpenID Connect Providers. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OpenidConnectProviderContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenidConnectProviderContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenidConnectProviderContractInner.java deleted file mode 100644 index 661dfb20530..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenidConnectProviderContractInner.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * OpenId Connect Provider details. - */ -@JsonFlatten -public class OpenidConnectProviderContractInner extends Resource { - /** - * User-friendly OpenID Connect Provider name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * User-friendly description of OpenID Connect Provider. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Metadata endpoint URI. - */ - @JsonProperty(value = "properties.metadataEndpoint", required = true) - private String metadataEndpoint; - - /** - * Client ID of developer console which is the client application. - */ - @JsonProperty(value = "properties.clientId", required = true) - private String clientId; - - /** - * Client Secret of developer console which is the client application. - */ - @JsonProperty(value = "properties.clientSecret") - private String clientSecret; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the OpenidConnectProviderContractInner object itself. - */ - public OpenidConnectProviderContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OpenidConnectProviderContractInner object itself. - */ - public OpenidConnectProviderContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the metadataEndpoint value. - * - * @return the metadataEndpoint value - */ - public String metadataEndpoint() { - return this.metadataEndpoint; - } - - /** - * Set the metadataEndpoint value. - * - * @param metadataEndpoint the metadataEndpoint value to set - * @return the OpenidConnectProviderContractInner object itself. - */ - public OpenidConnectProviderContractInner withMetadataEndpoint(String metadataEndpoint) { - this.metadataEndpoint = metadataEndpoint; - return this; - } - - /** - * Get the clientId value. - * - * @return the clientId value - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId value. - * - * @param clientId the clientId value to set - * @return the OpenidConnectProviderContractInner object itself. - */ - public OpenidConnectProviderContractInner withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret value. - * - * @return the clientSecret value - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret value. - * - * @param clientSecret the clientSecret value to set - * @return the OpenidConnectProviderContractInner object itself. - */ - public OpenidConnectProviderContractInner withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenidConnectProviderUpdateContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenidConnectProviderUpdateContractInner.java deleted file mode 100644 index cfb83cd7ae5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OpenidConnectProviderUpdateContractInner.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters supplied to the Update OpenID Connect Provider operation. - */ -@JsonFlatten -public class OpenidConnectProviderUpdateContractInner { - /** - * User-friendly OpenID Connect Provider name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * User-friendly description of OpenID Connect Provider. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Metadata endpoint URI. - */ - @JsonProperty(value = "properties.metadataEndpoint") - private String metadataEndpoint; - - /** - * Client ID of developer console which is the client application. - */ - @JsonProperty(value = "properties.clientId") - private String clientId; - - /** - * Client Secret of developer console which is the client application. - */ - @JsonProperty(value = "properties.clientSecret") - private String clientSecret; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the OpenidConnectProviderUpdateContractInner object itself. - */ - public OpenidConnectProviderUpdateContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OpenidConnectProviderUpdateContractInner object itself. - */ - public OpenidConnectProviderUpdateContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the metadataEndpoint value. - * - * @return the metadataEndpoint value - */ - public String metadataEndpoint() { - return this.metadataEndpoint; - } - - /** - * Set the metadataEndpoint value. - * - * @param metadataEndpoint the metadataEndpoint value to set - * @return the OpenidConnectProviderUpdateContractInner object itself. - */ - public OpenidConnectProviderUpdateContractInner withMetadataEndpoint(String metadataEndpoint) { - this.metadataEndpoint = metadataEndpoint; - return this; - } - - /** - * Get the clientId value. - * - * @return the clientId value - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId value. - * - * @param clientId the clientId value to set - * @return the OpenidConnectProviderUpdateContractInner object itself. - */ - public OpenidConnectProviderUpdateContractInner withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret value. - * - * @return the clientSecret value - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret value. - * - * @param clientSecret the clientSecret value to set - * @return the OpenidConnectProviderUpdateContractInner object itself. - */ - public OpenidConnectProviderUpdateContractInner withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationContractInner.java deleted file mode 100644 index 4eb6f9078d3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationContractInner.java +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.ParameterContract; -import com.microsoft.azure.management.apimanagement.RequestContract; -import com.microsoft.azure.management.apimanagement.ResponseContract; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Api Operation details. - */ -@JsonFlatten -public class OperationContractInner extends Resource { - /** - * Collection of URL template parameters. - */ - @JsonProperty(value = "properties.templateParameters") - private List templateParameters; - - /** - * Description of the operation. May include HTML formatting tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * An entity containing request details. - */ - @JsonProperty(value = "properties.request") - private RequestContract request; - - /** - * Array of Operation responses. - */ - @JsonProperty(value = "properties.responses") - private List responses; - - /** - * Operation Policies. - */ - @JsonProperty(value = "properties.policies") - private String policies; - - /** - * Operation Name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST - * but not limited by only them. - */ - @JsonProperty(value = "properties.method", required = true) - private String method; - - /** - * Relative URL template identifying the target resource for this - * operation. May include parameters. Example: - * /customers/{cid}/orders/{oid}/?date={date}. - */ - @JsonProperty(value = "properties.urlTemplate", required = true) - private String urlTemplate; - - /** - * Get the templateParameters value. - * - * @return the templateParameters value - */ - public List templateParameters() { - return this.templateParameters; - } - - /** - * Set the templateParameters value. - * - * @param templateParameters the templateParameters value to set - * @return the OperationContractInner object itself. - */ - public OperationContractInner withTemplateParameters(List templateParameters) { - this.templateParameters = templateParameters; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OperationContractInner object itself. - */ - public OperationContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the request value. - * - * @return the request value - */ - public RequestContract request() { - return this.request; - } - - /** - * Set the request value. - * - * @param request the request value to set - * @return the OperationContractInner object itself. - */ - public OperationContractInner withRequest(RequestContract request) { - this.request = request; - return this; - } - - /** - * Get the responses value. - * - * @return the responses value - */ - public List responses() { - return this.responses; - } - - /** - * Set the responses value. - * - * @param responses the responses value to set - * @return the OperationContractInner object itself. - */ - public OperationContractInner withResponses(List responses) { - this.responses = responses; - return this; - } - - /** - * Get the policies value. - * - * @return the policies value - */ - public String policies() { - return this.policies; - } - - /** - * Set the policies value. - * - * @param policies the policies value to set - * @return the OperationContractInner object itself. - */ - public OperationContractInner withPolicies(String policies) { - this.policies = policies; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the OperationContractInner object itself. - */ - public OperationContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the method value. - * - * @return the method value - */ - public String method() { - return this.method; - } - - /** - * Set the method value. - * - * @param method the method value to set - * @return the OperationContractInner object itself. - */ - public OperationContractInner withMethod(String method) { - this.method = method; - return this; - } - - /** - * Get the urlTemplate value. - * - * @return the urlTemplate value - */ - public String urlTemplate() { - return this.urlTemplate; - } - - /** - * Set the urlTemplate value. - * - * @param urlTemplate the urlTemplate value to set - * @return the OperationContractInner object itself. - */ - public OperationContractInner withUrlTemplate(String urlTemplate) { - this.urlTemplate = urlTemplate; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationInner.java deleted file mode 100644 index 45bdabf017f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationInner.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * REST API operation. - */ -public class OperationInner { - /** - * Operation name: {provider}/{resource}/{operation}. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The object that describes the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * The operation origin. - */ - @JsonProperty(value = "origin") - private String origin; - - /** - * The operation properties. - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display value. - * - * @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 value. - * - * @return the origin value - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin value. - * - * @param origin the origin value to set - * @return the OperationInner object itself. - */ - public OperationInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the OperationInner object itself. - */ - public OperationInner withProperties(Object properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationResultContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationResultContractInner.java deleted file mode 100644 index f822aa4f0dc..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationResultContractInner.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.AsyncOperationStatus; -import org.joda.time.DateTime; -import com.microsoft.azure.management.apimanagement.ErrorResponse; -import java.util.List; -import com.microsoft.azure.management.apimanagement.OperationResultLogItemContract; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Operation Result. - */ -public class OperationResultContractInner { - /** - * Operation result identifier. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Status of an async operation. Possible values include: 'Started', - * 'InProgress', 'Succeeded', 'Failed'. - */ - @JsonProperty(value = "status") - private AsyncOperationStatus status; - - /** - * Start time of an async operation. The date conforms to the following - * format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "started") - private DateTime started; - - /** - * Last update time of an async operation. The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "updated") - private DateTime updated; - - /** - * Optional result info. - */ - @JsonProperty(value = "resultInfo") - private String resultInfo; - - /** - * Error Body Contract. - */ - @JsonProperty(value = "error") - private ErrorResponse error; - - /** - * This property if only provided as part of the - * TenantConfiguration_Validate operation. It contains the log the entities - * which will be updated/created/deleted as part of the - * TenantConfiguration_Deploy operation. - */ - @JsonProperty(value = "actionLog", access = JsonProperty.Access.WRITE_ONLY) - private List actionLog; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the OperationResultContractInner object itself. - */ - public OperationResultContractInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public AsyncOperationStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the OperationResultContractInner object itself. - */ - public OperationResultContractInner withStatus(AsyncOperationStatus status) { - this.status = status; - return this; - } - - /** - * Get the started value. - * - * @return the started value - */ - public DateTime started() { - return this.started; - } - - /** - * Set the started value. - * - * @param started the started value to set - * @return the OperationResultContractInner object itself. - */ - public OperationResultContractInner withStarted(DateTime started) { - this.started = started; - return this; - } - - /** - * Get the updated value. - * - * @return the updated value - */ - public DateTime updated() { - return this.updated; - } - - /** - * Set the updated value. - * - * @param updated the updated value to set - * @return the OperationResultContractInner object itself. - */ - public OperationResultContractInner withUpdated(DateTime updated) { - this.updated = updated; - return this; - } - - /** - * Get the resultInfo value. - * - * @return the resultInfo value - */ - public String resultInfo() { - return this.resultInfo; - } - - /** - * Set the resultInfo value. - * - * @param resultInfo the resultInfo value to set - * @return the OperationResultContractInner object itself. - */ - public OperationResultContractInner withResultInfo(String resultInfo) { - this.resultInfo = resultInfo; - return this; - } - - /** - * Get the error value. - * - * @return the error value - */ - public ErrorResponse error() { - return this.error; - } - - /** - * Set the error value. - * - * @param error the error value to set - * @return the OperationResultContractInner object itself. - */ - public OperationResultContractInner withError(ErrorResponse error) { - this.error = error; - return this; - } - - /** - * Get the actionLog value. - * - * @return the actionLog value - */ - public List actionLog() { - return this.actionLog; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationUpdateContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationUpdateContractInner.java deleted file mode 100644 index 8b3d7a05a84..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationUpdateContractInner.java +++ /dev/null @@ -1,234 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.ParameterContract; -import com.microsoft.azure.management.apimanagement.RequestContract; -import com.microsoft.azure.management.apimanagement.ResponseContract; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Api Operation Update Contract details. - */ -@JsonFlatten -public class OperationUpdateContractInner { - /** - * Collection of URL template parameters. - */ - @JsonProperty(value = "properties.templateParameters") - private List templateParameters; - - /** - * Description of the operation. May include HTML formatting tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * An entity containing request details. - */ - @JsonProperty(value = "properties.request") - private RequestContract request; - - /** - * Array of Operation responses. - */ - @JsonProperty(value = "properties.responses") - private List responses; - - /** - * Operation Policies. - */ - @JsonProperty(value = "properties.policies") - private String policies; - - /** - * Operation Name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST - * but not limited by only them. - */ - @JsonProperty(value = "properties.method") - private String method; - - /** - * Relative URL template identifying the target resource for this - * operation. May include parameters. Example: - * /customers/{cid}/orders/{oid}/?date={date}. - */ - @JsonProperty(value = "properties.urlTemplate") - private String urlTemplate; - - /** - * Get the templateParameters value. - * - * @return the templateParameters value - */ - public List templateParameters() { - return this.templateParameters; - } - - /** - * Set the templateParameters value. - * - * @param templateParameters the templateParameters value to set - * @return the OperationUpdateContractInner object itself. - */ - public OperationUpdateContractInner withTemplateParameters(List templateParameters) { - this.templateParameters = templateParameters; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OperationUpdateContractInner object itself. - */ - public OperationUpdateContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the request value. - * - * @return the request value - */ - public RequestContract request() { - return this.request; - } - - /** - * Set the request value. - * - * @param request the request value to set - * @return the OperationUpdateContractInner object itself. - */ - public OperationUpdateContractInner withRequest(RequestContract request) { - this.request = request; - return this; - } - - /** - * Get the responses value. - * - * @return the responses value - */ - public List responses() { - return this.responses; - } - - /** - * Set the responses value. - * - * @param responses the responses value to set - * @return the OperationUpdateContractInner object itself. - */ - public OperationUpdateContractInner withResponses(List responses) { - this.responses = responses; - return this; - } - - /** - * Get the policies value. - * - * @return the policies value - */ - public String policies() { - return this.policies; - } - - /** - * Set the policies value. - * - * @param policies the policies value to set - * @return the OperationUpdateContractInner object itself. - */ - public OperationUpdateContractInner withPolicies(String policies) { - this.policies = policies; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the OperationUpdateContractInner object itself. - */ - public OperationUpdateContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the method value. - * - * @return the method value - */ - public String method() { - return this.method; - } - - /** - * Set the method value. - * - * @param method the method value to set - * @return the OperationUpdateContractInner object itself. - */ - public OperationUpdateContractInner withMethod(String method) { - this.method = method; - return this; - } - - /** - * Get the urlTemplate value. - * - * @return the urlTemplate value - */ - public String urlTemplate() { - return this.urlTemplate; - } - - /** - * Set the urlTemplate value. - * - * @param urlTemplate the urlTemplate value to set - * @return the OperationUpdateContractInner object itself. - */ - public OperationUpdateContractInner withUrlTemplate(String urlTemplate) { - this.urlTemplate = urlTemplate; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationsInner.java deleted file mode 100644 index c7ba5910403..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/OperationsInner.java +++ /dev/null @@ -1,488 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Operations listByTags" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags") - Observable> listByTags(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Operations listByTagsNext" }) - @GET - Observable> listByTagsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByTags(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponse> response = listByTagsSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTagsAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTagsSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByTagsAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByTagsWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByTagsWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByTagsSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTagsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTagsSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByTags(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTagsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByTags(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByTagsSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTagsAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTagsSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByTagsAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByTagsWithServiceResponseAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByTagsWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByTagsSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTagsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of operations associated with tags. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTagsSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByTags(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTagsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByTagsNext(final String nextPageLink) { - ServiceResponse> response = listByTagsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of operations associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTagsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTagsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByTagsNextAsync(final String nextPageLink) { - return listByTagsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of operations associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByTagsNextWithServiceResponseAsync(final String nextPageLink) { - return listByTagsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTagsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of operations associated with tags. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTagsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByTagsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTagsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByTagsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PageImpl.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PageImpl.java deleted file mode 100644 index 613d28d1288..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PageImpl1.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PageImpl1.java deleted file mode 100644 index 50cbeb3d3c7..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PageImpl1.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl1 implements Page { - /** - * The link to the next page. - */ - @JsonProperty("") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl1 setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl1 setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyCollectionInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyCollectionInner.java deleted file mode 100644 index 1cde165258b..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyCollectionInner.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The response of the list policy operation. - */ -public class PolicyCollectionInner { - /** - * Policy Contract value. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Next page link if any. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the PolicyCollectionInner object itself. - */ - public PolicyCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink value. - * - * @param nextLink the nextLink value to set - * @return the PolicyCollectionInner object itself. - */ - public PolicyCollectionInner withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyContractInner.java deleted file mode 100644 index aef3f5cc6c8..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyContractInner.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.PolicyContentFormat; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Policy Contract details. - */ -@JsonFlatten -public class PolicyContractInner extends Resource { - /** - * Json escaped Xml Encoded contents of the Policy. - */ - @JsonProperty(value = "properties.policyContent", required = true) - private String policyContent; - - /** - * Format of the policyContent. Possible values include: 'xml', 'xml-link'. - */ - @JsonProperty(value = "properties.contentFormat") - private PolicyContentFormat contentFormat; - - /** - * Get the policyContent value. - * - * @return the policyContent value - */ - public String policyContent() { - return this.policyContent; - } - - /** - * Set the policyContent value. - * - * @param policyContent the policyContent value to set - * @return the PolicyContractInner object itself. - */ - public PolicyContractInner withPolicyContent(String policyContent) { - this.policyContent = policyContent; - return this; - } - - /** - * Get the contentFormat value. - * - * @return the contentFormat value - */ - public PolicyContentFormat contentFormat() { - return this.contentFormat; - } - - /** - * Set the contentFormat value. - * - * @param contentFormat the contentFormat value to set - * @return the PolicyContractInner object itself. - */ - public PolicyContractInner withContentFormat(PolicyContentFormat contentFormat) { - this.contentFormat = contentFormat; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyGetEntityTagHeadersInner.java deleted file mode 100644 index b25a96b94d2..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class PolicyGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the PolicyGetEntityTagHeadersInner object itself. - */ - public PolicyGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyGetHeadersInner.java deleted file mode 100644 index ce3ed3b2a98..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicyGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class PolicyGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the PolicyGetHeadersInner object itself. - */ - public PolicyGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicySnippetsCollectionInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicySnippetsCollectionInner.java deleted file mode 100644 index 14b4dfc0809..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicySnippetsCollectionInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.microsoft.azure.management.apimanagement.PolicySnippetContract; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The response of the list policy snippets operation. - */ -public class PolicySnippetsCollectionInner { - /** - * Policy snippet value. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the PolicySnippetsCollectionInner object itself. - */ - public PolicySnippetsCollectionInner withValue(List value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicySnippetsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicySnippetsInner.java deleted file mode 100644 index 3d0803686bd..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicySnippetsInner.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.apimanagement.PolicyScopeContract; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in PolicySnippets. - */ -public class PolicySnippetsInner { - /** The Retrofit service to perform REST calls. */ - private PolicySnippetsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of PolicySnippetsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public PolicySnippetsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(PolicySnippetsService.class); - this.client = client; - } - - /** - * The interface defining all the services for PolicySnippets to be - * used by Retrofit to perform actually REST calls. - */ - interface PolicySnippetsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.PolicySnippets listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policySnippets") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("scope") PolicyScopeContract scope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all policy snippets. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicySnippetsCollectionInner object if successful. - */ - public PolicySnippetsCollectionInner listByService(String resourceGroupName, String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Lists all policy snippets. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByServiceAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByServiceWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Lists all policy snippets. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicySnippetsCollectionInner object - */ - public Observable listByServiceAsync(String resourceGroupName, String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, PolicySnippetsCollectionInner>() { - @Override - public PolicySnippetsCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists all policy snippets. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicySnippetsCollectionInner object - */ - public Observable> listByServiceWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final PolicyScopeContract scope = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), scope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all policy snippets. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicySnippetsCollectionInner object if successful. - */ - public PolicySnippetsCollectionInner listByService(String resourceGroupName, String serviceName, PolicyScopeContract scope) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, scope).toBlocking().single().body(); - } - - /** - * Lists all policy snippets. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByServiceAsync(String resourceGroupName, String serviceName, PolicyScopeContract scope, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, scope), serviceCallback); - } - - /** - * Lists all policy snippets. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicySnippetsCollectionInner object - */ - public Observable listByServiceAsync(String resourceGroupName, String serviceName, PolicyScopeContract scope) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, scope).map(new Func1, PolicySnippetsCollectionInner>() { - @Override - public PolicySnippetsCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists all policy snippets. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicySnippetsCollectionInner object - */ - public Observable> listByServiceWithServiceResponseAsync(String resourceGroupName, String serviceName, PolicyScopeContract scope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), scope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicysInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicysInner.java deleted file mode 100644 index c0f1eeb5a0f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PolicysInner.java +++ /dev/null @@ -1,617 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.management.apimanagement.PolicyScopeContract; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Policys. - */ -public class PolicysInner { - /** The Retrofit service to perform REST calls. */ - private PolicysService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of PolicysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public PolicysInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(PolicysService.class); - this.client = client; - } - - /** - * The interface defining all the services for Policys to be - * used by Retrofit to perform actually REST calls. - */ - interface PolicysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Policys listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("scope") PolicyScopeContract scope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Policys getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Policys get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Policys createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Body PolicyContractInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Policys delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyCollectionInner object if successful. - */ - public PolicyCollectionInner listByService(String resourceGroupName, String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByServiceAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByServiceWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable listByServiceAsync(String resourceGroupName, String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, PolicyCollectionInner>() { - @Override - public PolicyCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable> listByServiceWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final PolicyScopeContract scope = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), scope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyCollectionInner object if successful. - */ - public PolicyCollectionInner listByService(String resourceGroupName, String serviceName, PolicyScopeContract scope) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, scope).toBlocking().single().body(); - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByServiceAsync(String resourceGroupName, String serviceName, PolicyScopeContract scope, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, scope), serviceCallback); - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable listByServiceAsync(String resourceGroupName, String serviceName, PolicyScopeContract scope) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, scope).map(new Func1, PolicyCollectionInner>() { - @Override - public PolicyCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable> listByServiceWithServiceResponseAsync(String resourceGroupName, String serviceName, PolicyScopeContract scope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), scope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.getEntityTag(resourceGroupName, serviceName, policyId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, PolicyGetEntityTagHeadersInner.class); - } - - /** - * Get the Global policy definition of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner get(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Get the Global policy definition of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Get the Global policy definition of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get the Global policy definition of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.get(resourceGroupName, serviceName, policyId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, PolicyGetHeadersInner.class); - } - - /** - * Creates or updates the global policy configuration of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner createOrUpdate(String resourceGroupName, String serviceName, PolicyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates the global policy configuration of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters The policy contents to apply. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, PolicyContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Creates or updates the global policy configuration of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, PolicyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates the global policy configuration of the Api Management service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, PolicyContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String policyId = "policy"; - return service.createOrUpdate(resourceGroupName, serviceName, policyId, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the global policy configuration of the Api Management Service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the global policy configuration of the Api Management Service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch), serviceCallback); - } - - /** - * Deletes the global policy configuration of the Api Management Service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the global policy configuration of the Api Management Service. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.delete(resourceGroupName, serviceName, policyId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalDelegationSettingsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalDelegationSettingsInner.java deleted file mode 100644 index 84799de4a45..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalDelegationSettingsInner.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.SubscriptionsDelegationSettingsProperties; -import com.microsoft.azure.management.apimanagement.RegistrationDelegationSettingsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Delegation settings for a developer portal. - */ -@JsonFlatten -public class PortalDelegationSettingsInner extends Resource { - /** - * A delegation Url. - */ - @JsonProperty(value = "properties.url") - private String url; - - /** - * A base64-encoded validation key to validate, that a request is coming - * from Azure API Management. - */ - @JsonProperty(value = "properties.validationKey") - private String validationKey; - - /** - * Subscriptions delegation settings. - */ - @JsonProperty(value = "properties.subscriptions") - private SubscriptionsDelegationSettingsProperties subscriptions; - - /** - * User registration delegation settings. - */ - @JsonProperty(value = "properties.userRegistration") - private RegistrationDelegationSettingsProperties userRegistration; - - /** - * Get the url value. - * - * @return the url value - */ - public String url() { - return this.url; - } - - /** - * Set the url value. - * - * @param url the url value to set - * @return the PortalDelegationSettingsInner object itself. - */ - public PortalDelegationSettingsInner withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the validationKey value. - * - * @return the validationKey value - */ - public String validationKey() { - return this.validationKey; - } - - /** - * Set the validationKey value. - * - * @param validationKey the validationKey value to set - * @return the PortalDelegationSettingsInner object itself. - */ - public PortalDelegationSettingsInner withValidationKey(String validationKey) { - this.validationKey = validationKey; - return this; - } - - /** - * Get the subscriptions value. - * - * @return the subscriptions value - */ - public SubscriptionsDelegationSettingsProperties subscriptions() { - return this.subscriptions; - } - - /** - * Set the subscriptions value. - * - * @param subscriptions the subscriptions value to set - * @return the PortalDelegationSettingsInner object itself. - */ - public PortalDelegationSettingsInner withSubscriptions(SubscriptionsDelegationSettingsProperties subscriptions) { - this.subscriptions = subscriptions; - return this; - } - - /** - * Get the userRegistration value. - * - * @return the userRegistration value - */ - public RegistrationDelegationSettingsProperties userRegistration() { - return this.userRegistration; - } - - /** - * Set the userRegistration value. - * - * @param userRegistration the userRegistration value to set - * @return the PortalDelegationSettingsInner object itself. - */ - public PortalDelegationSettingsInner withUserRegistration(RegistrationDelegationSettingsProperties userRegistration) { - this.userRegistration = userRegistration; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalSigninSettingsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalSigninSettingsInner.java deleted file mode 100644 index e3b26518f78..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalSigninSettingsInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Sign-In settings for the Developer Portal. - */ -@JsonFlatten -public class PortalSigninSettingsInner extends Resource { - /** - * Redirect Anonymous users to the Sign-In page. - */ - @JsonProperty(value = "properties.enabled") - private Boolean enabled; - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the PortalSigninSettingsInner object itself. - */ - public PortalSigninSettingsInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalSignupSettingsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalSignupSettingsInner.java deleted file mode 100644 index c5ec4233d90..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PortalSignupSettingsInner.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.TermsOfServiceProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Sign-Up settings for a developer portal. - */ -@JsonFlatten -public class PortalSignupSettingsInner extends Resource { - /** - * Allow users to sign up on a developer portal. - */ - @JsonProperty(value = "properties.enabled") - private Boolean enabled; - - /** - * Terms of service contract properties. - */ - @JsonProperty(value = "properties.termsOfService") - private TermsOfServiceProperties termsOfService; - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the PortalSignupSettingsInner object itself. - */ - public PortalSignupSettingsInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the termsOfService value. - * - * @return the termsOfService value - */ - public TermsOfServiceProperties termsOfService() { - return this.termsOfService; - } - - /** - * Set the termsOfService value. - * - * @param termsOfService the termsOfService value to set - * @return the PortalSignupSettingsInner object itself. - */ - public PortalSignupSettingsInner withTermsOfService(TermsOfServiceProperties termsOfService) { - this.termsOfService = termsOfService; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductApisInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductApisInner.java deleted file mode 100644 index 59181aa560c..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductApisInner.java +++ /dev/null @@ -1,801 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ProductApis. - */ -public class ProductApisInner { - /** The Retrofit service to perform REST calls. */ - private ProductApisService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ProductApisInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ProductApisInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ProductApisService.class); - this.client = client; - } - - /** - * The interface defining all the services for ProductApis to be - * used by Retrofit to perform actually REST calls. - */ - interface ProductApisService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductApis listByProduct" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis") - Observable> listByProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductApis checkEntityExists" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}") - Observable> checkEntityExists(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductApis createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductApis delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductApis listByProductNext" }) - @GET - Observable> listByProductNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiContractInner> object if successful. - */ - public PagedList listByProduct(final String resourceGroupName, final String serviceName, final String productId) { - ServiceResponse> response = listByProductSinglePageAsync(resourceGroupName, serviceName, productId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductSinglePageAsync(resourceGroupName, serviceName, productId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable>> listByProductWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String productId) { - return listByProductSinglePageAsync(resourceGroupName, serviceName, productId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductSinglePageAsync(final String resourceGroupName, final String serviceName, final String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByProduct(resourceGroupName, serviceName, productId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiContractInner> object if successful. - */ - public PagedList listByProduct(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable>> listByProductWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - return listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the APIs associated with a product. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param productId Product identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductSinglePageAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByProduct(resourceGroupName, serviceName, productId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByProductDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the boolean object if successful. - */ - public boolean checkEntityExists(String resourceGroupName, String serviceName, String productId, String apiId) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId).toBlocking().single().body(); - } - - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkEntityExistsAsync(String resourceGroupName, String serviceName, String productId, String apiId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId), serviceCallback); - } - - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable checkEntityExistsAsync(String resourceGroupName, String serviceName, String productId, String apiId) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId).map(new Func1, Boolean>() { - @Override - public Boolean call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable> checkEntityExistsWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.checkEntityExists(resourceGroupName, serviceName, productId, apiId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkEntityExistsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkEntityExistsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmpty(response); - } - - /** - * Adds an API to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApiContractInner object if successful. - */ - public ApiContractInner createOrUpdate(String resourceGroupName, String serviceName, String productId, String apiId) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId).toBlocking().single().body(); - } - - /** - * Adds an API to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, String apiId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId), serviceCallback); - } - - /** - * Adds an API to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, String apiId) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId).map(new Func1, ApiContractInner>() { - @Override - public ApiContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Adds an API to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApiContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.createOrUpdate(resourceGroupName, serviceName, productId, apiId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified API from the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String productId, String apiId) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId).toBlocking().single().body(); - } - - /** - * Deletes the specified API from the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String productId, String apiId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId), serviceCallback); - } - - /** - * Deletes the specified API from the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String productId, String apiId) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, apiId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified API from the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, productId, apiId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ApiContractInner> object if successful. - */ - public PagedList listByProductNext(final String nextPageLink) { - ServiceResponse> response = listByProductNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable> listByProductNextAsync(final String nextPageLink) { - return listByProductNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of the APIs associated with a product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApiContractInner> object - */ - public Observable>> listByProductNextWithServiceResponseAsync(final String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of the APIs associated with a product. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApiContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByProductNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByProductNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductContractInner.java deleted file mode 100644 index d1a2d1b3068..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductContractInner.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.ProductState; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Product details. - */ -@JsonFlatten -public class ProductContractInner extends Resource { - /** - * Product description. May include HTML formatting tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Product terms of use. Developers trying to subscribe to the product will - * be presented and required to accept these terms before they can complete - * the subscription process. - */ - @JsonProperty(value = "properties.terms") - private String terms; - - /** - * Whether a product subscription is required for accessing APIs included - * in this product. If true, the product is referred to as "protected" and - * a valid subscription key is required for a request to an API included in - * the product to succeed. If false, the product is referred to as "open" - * and requests to an API included in the product can be made without a - * subscription key. If property is omitted when creating a new product - * it's value is assumed to be true. - */ - @JsonProperty(value = "properties.subscriptionRequired") - private Boolean subscriptionRequired; - - /** - * whether subscription approval is required. If false, new subscriptions - * will be approved automatically enabling developers to call the product’s - * APIs immediately after subscribing. If true, administrators must - * manually approve the subscription before the developer can any of the - * product’s APIs. Can be present only if subscriptionRequired property is - * present and has a value of false. - */ - @JsonProperty(value = "properties.approvalRequired") - private Boolean approvalRequired; - - /** - * Whether the number of subscriptions a user can have to this product at - * the same time. Set to null or omit to allow unlimited per user - * subscriptions. Can be present only if subscriptionRequired property is - * present and has a value of false. - */ - @JsonProperty(value = "properties.subscriptionsLimit") - private Integer subscriptionsLimit; - - /** - * whether product is published or not. Published products are discoverable - * by users of developer portal. Non published products are visible only to - * administrators. Default state of Product is notPublished. Possible - * values include: 'notPublished', 'published'. - */ - @JsonProperty(value = "properties.state") - private ProductState state; - - /** - * Product name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ProductContractInner object itself. - */ - public ProductContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the terms value. - * - * @return the terms value - */ - public String terms() { - return this.terms; - } - - /** - * Set the terms value. - * - * @param terms the terms value to set - * @return the ProductContractInner object itself. - */ - public ProductContractInner withTerms(String terms) { - this.terms = terms; - return this; - } - - /** - * Get the subscriptionRequired value. - * - * @return the subscriptionRequired value - */ - public Boolean subscriptionRequired() { - return this.subscriptionRequired; - } - - /** - * Set the subscriptionRequired value. - * - * @param subscriptionRequired the subscriptionRequired value to set - * @return the ProductContractInner object itself. - */ - public ProductContractInner withSubscriptionRequired(Boolean subscriptionRequired) { - this.subscriptionRequired = subscriptionRequired; - return this; - } - - /** - * Get the approvalRequired value. - * - * @return the approvalRequired value - */ - public Boolean approvalRequired() { - return this.approvalRequired; - } - - /** - * Set the approvalRequired value. - * - * @param approvalRequired the approvalRequired value to set - * @return the ProductContractInner object itself. - */ - public ProductContractInner withApprovalRequired(Boolean approvalRequired) { - this.approvalRequired = approvalRequired; - return this; - } - - /** - * Get the subscriptionsLimit value. - * - * @return the subscriptionsLimit value - */ - public Integer subscriptionsLimit() { - return this.subscriptionsLimit; - } - - /** - * Set the subscriptionsLimit value. - * - * @param subscriptionsLimit the subscriptionsLimit value to set - * @return the ProductContractInner object itself. - */ - public ProductContractInner withSubscriptionsLimit(Integer subscriptionsLimit) { - this.subscriptionsLimit = subscriptionsLimit; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public ProductState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the ProductContractInner object itself. - */ - public ProductContractInner withState(ProductState state) { - this.state = state; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ProductContractInner object itself. - */ - public ProductContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGetEntityTagHeadersInner.java deleted file mode 100644 index 703cb193fbe..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ProductGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ProductGetEntityTagHeadersInner object itself. - */ - public ProductGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGetHeadersInner.java deleted file mode 100644 index e2cee5df278..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ProductGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ProductGetHeadersInner object itself. - */ - public ProductGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGroupsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGroupsInner.java deleted file mode 100644 index 8a3aebd1f3a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductGroupsInner.java +++ /dev/null @@ -1,796 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ProductGroups. - */ -public class ProductGroupsInner { - /** The Retrofit service to perform REST calls. */ - private ProductGroupsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ProductGroupsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ProductGroupsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ProductGroupsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ProductGroups to be - * used by Retrofit to perform actually REST calls. - */ - interface ProductGroupsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductGroups listByProduct" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups") - Observable> listByProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductGroups checkEntityExists" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}") - Observable> checkEntityExists(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductGroups createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductGroups delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("groupId") String groupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductGroups listByProductNext" }) - @GET - Observable> listByProductNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList listByProduct(final String resourceGroupName, final String serviceName, final String productId) { - ServiceResponse> response = listByProductSinglePageAsync(resourceGroupName, serviceName, productId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductSinglePageAsync(resourceGroupName, serviceName, productId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listByProductWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String productId) { - return listByProductSinglePageAsync(resourceGroupName, serviceName, productId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductSinglePageAsync(final String resourceGroupName, final String serviceName, final String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByProduct(resourceGroupName, serviceName, productId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList listByProduct(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listByProductWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - return listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param productId Product identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | type | eq, ne | N/A | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductSinglePageAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByProduct(resourceGroupName, serviceName, productId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByProductDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the boolean object if successful. - */ - public boolean checkEntityExists(String resourceGroupName, String serviceName, String productId, String groupId) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId).toBlocking().single().body(); - } - - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkEntityExistsAsync(String resourceGroupName, String serviceName, String productId, String groupId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId), serviceCallback); - } - - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable checkEntityExistsAsync(String resourceGroupName, String serviceName, String productId, String groupId) { - return checkEntityExistsWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId).map(new Func1, Boolean>() { - @Override - public Boolean call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Boolean object - */ - public Observable> checkEntityExistsWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String groupId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.checkEntityExists(resourceGroupName, serviceName, productId, groupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkEntityExistsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkEntityExistsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmpty(response); - } - - /** - * Adds the association between the specified developer group with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the GroupContractInner object if successful. - */ - public GroupContractInner createOrUpdate(String resourceGroupName, String serviceName, String productId, String groupId) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId).toBlocking().single().body(); - } - - /** - * Adds the association between the specified developer group with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, String groupId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId), serviceCallback); - } - - /** - * Adds the association between the specified developer group with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GroupContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, String groupId) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId).map(new Func1, GroupContractInner>() { - @Override - public GroupContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Adds the association between the specified developer group with the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GroupContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String groupId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.createOrUpdate(resourceGroupName, serviceName, productId, groupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the association between the specified group and product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String productId, String groupId) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId).toBlocking().single().body(); - } - - /** - * Deletes the association between the specified group and product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String productId, String groupId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId), serviceCallback); - } - - /** - * Deletes the association between the specified group and product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String productId, String groupId) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, groupId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the association between the specified group and product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String groupId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (groupId == null) { - throw new IllegalArgumentException("Parameter groupId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, productId, groupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList listByProductNext(final String nextPageLink) { - ServiceResponse> response = listByProductNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listByProductNextAsync(final String nextPageLink) { - return listByProductNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listByProductNextWithServiceResponseAsync(final String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of developer groups associated with the specified product. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByProductNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByProductNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyGetEntityTagHeadersInner.java deleted file mode 100644 index 87625b7049a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class ProductPolicyGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ProductPolicyGetEntityTagHeadersInner object itself. - */ - public ProductPolicyGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyGetHeadersInner.java deleted file mode 100644 index 9cc871536fa..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class ProductPolicyGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ProductPolicyGetHeadersInner object itself. - */ - public ProductPolicyGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyListByProductHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyListByProductHeadersInner.java deleted file mode 100644 index 377905d0927..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicyListByProductHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for ListByProduct operation. - */ -public class ProductPolicyListByProductHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ProductPolicyListByProductHeadersInner object itself. - */ - public ProductPolicyListByProductHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicysInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicysInner.java deleted file mode 100644 index 02b61ef2787..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductPolicysInner.java +++ /dev/null @@ -1,666 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ProductPolicys. - */ -public class ProductPolicysInner { - /** The Retrofit service to perform REST calls. */ - private ProductPolicysService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ProductPolicysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ProductPolicysInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ProductPolicysService.class); - this.client = client; - } - - /** - * The interface defining all the services for ProductPolicys to be - * used by Retrofit to perform actually REST calls. - */ - interface ProductPolicysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductPolicys listByProduct" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies") - Observable> listByProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("productId") String productId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductPolicys getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("productId") String productId, @Path("policyId") String policyId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductPolicys get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("productId") String productId, @Path("policyId") String policyId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductPolicys createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Body PolicyContractInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductPolicys delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("policyId") String policyId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyCollectionInner object if successful. - */ - public PolicyCollectionInner listByProduct(String resourceGroupName, String serviceName, String productId) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId).toBlocking().single().body(); - } - - /** - * Get the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByProductAsync(String resourceGroupName, String serviceName, String productId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId), serviceCallback); - } - - /** - * Get the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable listByProductAsync(String resourceGroupName, String serviceName, String productId) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId).map(new Func1, PolicyCollectionInner>() { - @Override - public PolicyCollectionInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyCollectionInner object - */ - public Observable> listByProductWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByProduct(resourceGroupName, serviceName, this.client.subscriptionId(), productId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = listByProductDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders listByProductDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ProductPolicyListByProductHeadersInner.class); - } - - /** - * Get the ETag of the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String productId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, productId).toBlocking().single().body(); - } - - /** - * Get the ETag of the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String productId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, productId), serviceCallback); - } - - /** - * Get the ETag of the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String productId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, productId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get the ETag of the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.getEntityTag(resourceGroupName, serviceName, this.client.subscriptionId(), productId, policyId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ProductPolicyGetEntityTagHeadersInner.class); - } - - /** - * Get the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner get(String resourceGroupName, String serviceName, String productId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, productId).toBlocking().single().body(); - } - - /** - * Get the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String productId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, productId), serviceCallback); - } - - /** - * Get the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String productId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, productId).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get the policy configuration at the Product level. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.get(resourceGroupName, serviceName, this.client.subscriptionId(), productId, policyId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ProductPolicyGetHeadersInner.class); - } - - /** - * Creates or updates policy configuration for the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner createOrUpdate(String resourceGroupName, String serviceName, String productId, PolicyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates policy configuration for the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, PolicyContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters), serviceCallback); - } - - /** - * Creates or updates policy configuration for the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, PolicyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates policy configuration for the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, PolicyContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String policyId = "policy"; - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, productId, policyId, this.client.subscriptionId(), ifMatch, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates policy configuration for the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyContractInner object if successful. - */ - public PolicyContractInner createOrUpdate(String resourceGroupName, String serviceName, String productId, PolicyContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or updates policy configuration for the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, PolicyContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or updates policy configuration for the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, PolicyContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch).map(new Func1, PolicyContractInner>() { - @Override - public PolicyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates policy configuration for the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters The policy contents to apply. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, PolicyContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String policyId = "policy"; - return service.createOrUpdate(resourceGroupName, serviceName, productId, policyId, this.client.subscriptionId(), ifMatch, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the policy configuration at the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String productId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the policy configuration at the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String productId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch), serviceCallback); - } - - /** - * Deletes the policy configuration at the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String productId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the policy configuration at the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyId = "policy"; - return service.delete(resourceGroupName, serviceName, productId, policyId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductSubscriptionsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductSubscriptionsInner.java deleted file mode 100644 index 8d0d0dd7f32..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductSubscriptionsInner.java +++ /dev/null @@ -1,488 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ProductSubscriptions. - */ -public class ProductSubscriptionsInner { - /** The Retrofit service to perform REST calls. */ - private ProductSubscriptionsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ProductSubscriptionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ProductSubscriptionsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ProductSubscriptionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ProductSubscriptions to be - * used by Retrofit to perform actually REST calls. - */ - interface ProductSubscriptionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductSubscriptions list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.ProductSubscriptions listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String productId) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, productId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String productId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, productId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String productId) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, productId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String productId) { - return listSinglePageAsync(resourceGroupName, serviceName, productId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.list(resourceGroupName, serviceName, productId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, productId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - return listSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param productId Product identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, serviceName, productId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of subscriptions to the specified product. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductUpdateParametersInner.java deleted file mode 100644 index cead38d35dc..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductUpdateParametersInner.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.ProductState; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Product Update parameters. - */ -@JsonFlatten -public class ProductUpdateParametersInner { - /** - * Product description. May include HTML formatting tags. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Product terms of use. Developers trying to subscribe to the product will - * be presented and required to accept these terms before they can complete - * the subscription process. - */ - @JsonProperty(value = "properties.terms") - private String terms; - - /** - * Whether a product subscription is required for accessing APIs included - * in this product. If true, the product is referred to as "protected" and - * a valid subscription key is required for a request to an API included in - * the product to succeed. If false, the product is referred to as "open" - * and requests to an API included in the product can be made without a - * subscription key. If property is omitted when creating a new product - * it's value is assumed to be true. - */ - @JsonProperty(value = "properties.subscriptionRequired") - private Boolean subscriptionRequired; - - /** - * whether subscription approval is required. If false, new subscriptions - * will be approved automatically enabling developers to call the product’s - * APIs immediately after subscribing. If true, administrators must - * manually approve the subscription before the developer can any of the - * product’s APIs. Can be present only if subscriptionRequired property is - * present and has a value of false. - */ - @JsonProperty(value = "properties.approvalRequired") - private Boolean approvalRequired; - - /** - * Whether the number of subscriptions a user can have to this product at - * the same time. Set to null or omit to allow unlimited per user - * subscriptions. Can be present only if subscriptionRequired property is - * present and has a value of false. - */ - @JsonProperty(value = "properties.subscriptionsLimit") - private Integer subscriptionsLimit; - - /** - * whether product is published or not. Published products are discoverable - * by users of developer portal. Non published products are visible only to - * administrators. Default state of Product is notPublished. Possible - * values include: 'notPublished', 'published'. - */ - @JsonProperty(value = "properties.state") - private ProductState state; - - /** - * Product name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ProductUpdateParametersInner object itself. - */ - public ProductUpdateParametersInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the terms value. - * - * @return the terms value - */ - public String terms() { - return this.terms; - } - - /** - * Set the terms value. - * - * @param terms the terms value to set - * @return the ProductUpdateParametersInner object itself. - */ - public ProductUpdateParametersInner withTerms(String terms) { - this.terms = terms; - return this; - } - - /** - * Get the subscriptionRequired value. - * - * @return the subscriptionRequired value - */ - public Boolean subscriptionRequired() { - return this.subscriptionRequired; - } - - /** - * Set the subscriptionRequired value. - * - * @param subscriptionRequired the subscriptionRequired value to set - * @return the ProductUpdateParametersInner object itself. - */ - public ProductUpdateParametersInner withSubscriptionRequired(Boolean subscriptionRequired) { - this.subscriptionRequired = subscriptionRequired; - return this; - } - - /** - * Get the approvalRequired value. - * - * @return the approvalRequired value - */ - public Boolean approvalRequired() { - return this.approvalRequired; - } - - /** - * Set the approvalRequired value. - * - * @param approvalRequired the approvalRequired value to set - * @return the ProductUpdateParametersInner object itself. - */ - public ProductUpdateParametersInner withApprovalRequired(Boolean approvalRequired) { - this.approvalRequired = approvalRequired; - return this; - } - - /** - * Get the subscriptionsLimit value. - * - * @return the subscriptionsLimit value - */ - public Integer subscriptionsLimit() { - return this.subscriptionsLimit; - } - - /** - * Set the subscriptionsLimit value. - * - * @param subscriptionsLimit the subscriptionsLimit value to set - * @return the ProductUpdateParametersInner object itself. - */ - public ProductUpdateParametersInner withSubscriptionsLimit(Integer subscriptionsLimit) { - this.subscriptionsLimit = subscriptionsLimit; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public ProductState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the ProductUpdateParametersInner object itself. - */ - public ProductUpdateParametersInner withState(ProductState state) { - this.state = state; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ProductUpdateParametersInner object itself. - */ - public ProductUpdateParametersInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductsInner.java deleted file mode 100644 index 01ed88285b8..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ProductsInner.java +++ /dev/null @@ -1,1191 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Products. - */ -public class ProductsInner { - /** The Retrofit service to perform REST calls. */ - private ProductsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ProductsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ProductsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ProductsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Products to be - * used by Retrofit to perform actually REST calls. - */ - interface ProductsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Products listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("expandGroups") Boolean expandGroups, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Products getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Products get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Products createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Body ProductContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Products update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Body ProductUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Products delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Query("deleteSubscriptions") Boolean deleteSubscriptions, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Products listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProductContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProductContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - final Boolean expandGroups = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, expandGroups, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param expandGroups When set to true, the response contains an array of groups that have visibility to the product. The default is false. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProductContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandGroups) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip, expandGroups).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param expandGroups When set to true, the response contains an array of groups that have visibility to the product. The default is false. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandGroups, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip, expandGroups), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param expandGroups When set to true, the response contains an array of groups that have visibility to the product. The default is false. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandGroups) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip, expandGroups) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param expandGroups When set to true, the response contains an array of groups that have visibility to the product. The default is false. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandGroups) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip, expandGroups) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of products in the specified service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - ServiceResponse> * @param expandGroups When set to true, the response contains an array of groups that have visibility to the product. The default is false. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProductContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final Boolean expandGroups) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, expandGroups, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String productId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, productId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String productId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, productId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String productId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, productId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, productId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, ProductGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the product specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ProductContractInner object if successful. - */ - public ProductContractInner get(String resourceGroupName, String serviceName, String productId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, productId).toBlocking().single().body(); - } - - /** - * Gets the details of the product specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String productId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, productId), serviceCallback); - } - - /** - * Gets the details of the product specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProductContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String productId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, productId).map(new Func1, ProductContractInner>() { - @Override - public ProductContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the product specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProductContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, productId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, ProductGetHeadersInner.class); - } - - /** - * Creates or Updates a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ProductContractInner object if successful. - */ - public ProductContractInner createOrUpdate(String resourceGroupName, String serviceName, String productId, ProductContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, ProductContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters), serviceCallback); - } - - /** - * Creates or Updates a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProductContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, ProductContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters).map(new Func1, ProductContractInner>() { - @Override - public ProductContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProductContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, ProductContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, productId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ProductContractInner object if successful. - */ - public ProductContractInner createOrUpdate(String resourceGroupName, String serviceName, String productId, ProductContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or Updates a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, ProductContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or Updates a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProductContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String productId, ProductContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch).map(new Func1, ProductContractInner>() { - @Override - public ProductContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProductContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, ProductContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, productId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Update product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String productId, ProductUpdateParametersInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Update product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String productId, ProductUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch), serviceCallback); - } - - /** - * Update product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String productId, ProductUpdateParametersInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, productId, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, ProductUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, productId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Delete product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String productId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch).toBlocking().single().body(); - } - - /** - * Delete product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String productId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch), serviceCallback); - } - - /** - * Delete product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String productId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean deleteSubscriptions = null; - return service.delete(resourceGroupName, serviceName, productId, this.client.subscriptionId(), deleteSubscriptions, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Delete product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteSubscriptions Delete existing subscriptions associated with the product or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String productId, String ifMatch, Boolean deleteSubscriptions) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch, deleteSubscriptions).toBlocking().single().body(); - } - - /** - * Delete product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteSubscriptions Delete existing subscriptions associated with the product or not. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String productId, String ifMatch, Boolean deleteSubscriptions, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch, deleteSubscriptions), serviceCallback); - } - - /** - * Delete product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteSubscriptions Delete existing subscriptions associated with the product or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String productId, String ifMatch, Boolean deleteSubscriptions) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, productId, ifMatch, deleteSubscriptions).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteSubscriptions Delete existing subscriptions associated with the product or not. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String ifMatch, Boolean deleteSubscriptions) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, productId, this.client.subscriptionId(), deleteSubscriptions, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProductContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of products in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProductContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of products in the specified service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProductContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyContractInner.java deleted file mode 100644 index 0e032dcb477..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyContractInner.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Property details. - */ -@JsonFlatten -public class PropertyContractInner extends Resource { - /** - * Optional tags that when provided can be used to filter the property - * list. - */ - @JsonProperty(value = "properties.tags") - private List tags; - - /** - * Determines whether the value is a secret and should be encrypted or not. - * Default value is false. - */ - @JsonProperty(value = "properties.secret") - private Boolean secret; - - /** - * Unique name of Property. It may contain only letters, digits, period, - * dash, and underscore characters. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * Value of the property. Can contain policy expressions. It may not be - * empty or consist only of whitespace. - */ - @JsonProperty(value = "properties.value", required = true) - private String value; - - /** - * Get the tags value. - * - * @return the tags value - */ - public List tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the PropertyContractInner object itself. - */ - public PropertyContractInner withTags(List tags) { - this.tags = tags; - return this; - } - - /** - * Get the secret value. - * - * @return the secret value - */ - public Boolean secret() { - return this.secret; - } - - /** - * Set the secret value. - * - * @param secret the secret value to set - * @return the PropertyContractInner object itself. - */ - public PropertyContractInner withSecret(Boolean secret) { - this.secret = secret; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the PropertyContractInner object itself. - */ - public PropertyContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the PropertyContractInner object itself. - */ - public PropertyContractInner withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyGetEntityTagHeadersInner.java deleted file mode 100644 index d47ce1f0ed4..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class PropertyGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the PropertyGetEntityTagHeadersInner object itself. - */ - public PropertyGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyGetHeadersInner.java deleted file mode 100644 index 45bb487b82f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class PropertyGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the PropertyGetHeadersInner object itself. - */ - public PropertyGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyUpdateParametersInner.java deleted file mode 100644 index 497d554f2c3..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertyUpdateParametersInner.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Property update Parameters. - */ -@JsonFlatten -public class PropertyUpdateParametersInner { - /** - * Optional tags that when provided can be used to filter the property - * list. - */ - @JsonProperty(value = "properties.tags") - private List tags; - - /** - * Determines whether the value is a secret and should be encrypted or not. - * Default value is false. - */ - @JsonProperty(value = "properties.secret") - private Boolean secret; - - /** - * Unique name of Property. It may contain only letters, digits, period, - * dash, and underscore characters. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Value of the property. Can contain policy expressions. It may not be - * empty or consist only of whitespace. - */ - @JsonProperty(value = "properties.value") - private String value; - - /** - * Get the tags value. - * - * @return the tags value - */ - public List tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the PropertyUpdateParametersInner object itself. - */ - public PropertyUpdateParametersInner withTags(List tags) { - this.tags = tags; - return this; - } - - /** - * Get the secret value. - * - * @return the secret value - */ - public Boolean secret() { - return this.secret; - } - - /** - * Set the secret value. - * - * @param secret the secret value to set - * @return the PropertyUpdateParametersInner object itself. - */ - public PropertyUpdateParametersInner withSecret(Boolean secret) { - this.secret = secret; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the PropertyUpdateParametersInner object itself. - */ - public PropertyUpdateParametersInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the PropertyUpdateParametersInner object itself. - */ - public PropertyUpdateParametersInner withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertysInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertysInner.java deleted file mode 100644 index f18c0300441..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/PropertysInner.java +++ /dev/null @@ -1,1074 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Propertys. - */ -public class PropertysInner { - /** The Retrofit service to perform REST calls. */ - private PropertysService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of PropertysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public PropertysInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(PropertysService.class); - this.client = client; - } - - /** - * The interface defining all the services for Propertys to be - * used by Retrofit to perform actually REST calls. - */ - interface PropertysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Propertys listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Propertys getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("propId") String propId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Propertys get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("propId") String propId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Propertys createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("propId") String propId, @Path("subscriptionId") String subscriptionId, @Body PropertyContractInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Propertys update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("propId") String propId, @Path("subscriptionId") String subscriptionId, @Body PropertyUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Propertys delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("propId") String propId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Propertys listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<PropertyContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PropertyContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PropertyContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<PropertyContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|-------------------------------------------------------| - | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<PropertyContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|-------------------------------------------------------| - | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|-------------------------------------------------------| - | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PropertyContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|-------------------------------------------------------| - | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PropertyContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------|------------------------|-------------------------------------------------------| - | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<PropertyContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the property specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String propId) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, propId).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the property specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String propId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, propId), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the property specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String propId) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, propId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the property specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String propId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (propId == null) { - throw new IllegalArgumentException("Parameter propId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, propId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, PropertyGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the property specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PropertyContractInner object if successful. - */ - public PropertyContractInner get(String resourceGroupName, String serviceName, String propId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, propId).toBlocking().single().body(); - } - - /** - * Gets the details of the property specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String propId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, propId), serviceCallback); - } - - /** - * Gets the details of the property specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PropertyContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String propId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, propId).map(new Func1, PropertyContractInner>() { - @Override - public PropertyContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the property specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PropertyContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String propId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (propId == null) { - throw new IllegalArgumentException("Parameter propId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, propId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, PropertyGetHeadersInner.class); - } - - /** - * Creates or updates a property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PropertyContractInner object if successful. - */ - public PropertyContractInner createOrUpdate(String resourceGroupName, String serviceName, String propId, PropertyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates a property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String propId, PropertyContractInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters), serviceCallback); - } - - /** - * Creates or updates a property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PropertyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String propId, PropertyContractInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters).map(new Func1, PropertyContractInner>() { - @Override - public PropertyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PropertyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String propId, PropertyContractInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (propId == null) { - throw new IllegalArgumentException("Parameter propId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, propId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates a property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PropertyContractInner object if successful. - */ - public PropertyContractInner createOrUpdate(String resourceGroupName, String serviceName, String propId, PropertyContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or updates a property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String propId, PropertyContractInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or updates a property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PropertyContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String propId, PropertyContractInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters, ifMatch).map(new Func1, PropertyContractInner>() { - @Override - public PropertyContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PropertyContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String propId, PropertyContractInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (propId == null) { - throw new IllegalArgumentException("Parameter propId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, propId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the specific property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String propId, PropertyUpdateParametersInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the specific property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String propId, PropertyUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the specific property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String propId, PropertyUpdateParametersInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, propId, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the specific property. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String propId, PropertyUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (propId == null) { - throw new IllegalArgumentException("Parameter propId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, propId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes specific property from the the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String propId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, propId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes specific property from the the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String propId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, propId, ifMatch), serviceCallback); - } - - /** - * Deletes specific property from the the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String propId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, propId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific property from the the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param propId Identifier of the property. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String propId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (propId == null) { - throw new IllegalArgumentException("Parameter propId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, propId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<PropertyContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PropertyContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PropertyContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of properties defined within a service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<PropertyContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaByCounterKeysInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaByCounterKeysInner.java deleted file mode 100644 index 8c28fccb34f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaByCounterKeysInner.java +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in QuotaByCounterKeys. - */ -public class QuotaByCounterKeysInner { - /** The Retrofit service to perform REST calls. */ - private QuotaByCounterKeysService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of QuotaByCounterKeysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public QuotaByCounterKeysInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(QuotaByCounterKeysService.class); - this.client = client; - } - - /** - * The interface defining all the services for QuotaByCounterKeys to be - * used by Retrofit to perform actually REST calls. - */ - interface QuotaByCounterKeysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.QuotaByCounterKeys listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") - Observable> listByService(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("quotaCounterKey") String quotaCounterKey, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.QuotaByCounterKeys update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("quotaCounterKey") String quotaCounterKey, @Path("subscriptionId") String subscriptionId, @Body QuotaCounterValueContractPropertiesInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the QuotaCounterCollectionInner object if successful. - */ - public QuotaCounterCollectionInner listByService(String resourceGroupName, String serviceName, String quotaCounterKey) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey).toBlocking().single().body(); - } - - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listByServiceAsync(String resourceGroupName, String serviceName, String quotaCounterKey, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey), serviceCallback); - } - - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the QuotaCounterCollectionInner object - */ - public Observable listByServiceAsync(String resourceGroupName, String serviceName, String quotaCounterKey) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey).map(new Func1, QuotaCounterCollectionInner>() { - @Override - public QuotaCounterCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the QuotaCounterCollectionInner object - */ - public Observable> listByServiceWithServiceResponseAsync(String resourceGroupName, String serviceName, String quotaCounterKey) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (quotaCounterKey == null) { - throw new IllegalArgumentException("Parameter quotaCounterKey is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(this.client.subscriptionId(), resourceGroupName, serviceName, quotaCounterKey, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listByServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String quotaCounterKey, QuotaCounterValueContractPropertiesInner parameters) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, parameters).toBlocking().single().body(); - } - - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String quotaCounterKey, QuotaCounterValueContractPropertiesInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, parameters), serviceCallback); - } - - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String quotaCounterKey, QuotaCounterValueContractPropertiesInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String quotaCounterKey, QuotaCounterValueContractPropertiesInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (quotaCounterKey == null) { - throw new IllegalArgumentException("Parameter quotaCounterKey is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, quotaCounterKey, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaByPeriodKeysInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaByPeriodKeysInner.java deleted file mode 100644 index d8edb200ca9..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaByPeriodKeysInner.java +++ /dev/null @@ -1,274 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in QuotaByPeriodKeys. - */ -public class QuotaByPeriodKeysInner { - /** The Retrofit service to perform REST calls. */ - private QuotaByPeriodKeysService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of QuotaByPeriodKeysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public QuotaByPeriodKeysInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(QuotaByPeriodKeysService.class); - this.client = client; - } - - /** - * The interface defining all the services for QuotaByPeriodKeys to be - * used by Retrofit to perform actually REST calls. - */ - interface QuotaByPeriodKeysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.QuotaByPeriodKeys get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("quotaCounterKey") String quotaCounterKey, @Path("quotaPeriodKey") String quotaPeriodKey, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.QuotaByPeriodKeys update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("quotaCounterKey") String quotaCounterKey, @Path("quotaPeriodKey") String quotaPeriodKey, @Path("subscriptionId") String subscriptionId, @Body QuotaCounterValueContractPropertiesInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the QuotaCounterContractInner object if successful. - */ - public QuotaCounterContractInner get(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey).toBlocking().single().body(); - } - - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey), serviceCallback); - } - - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the QuotaCounterContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey).map(new Func1, QuotaCounterContractInner>() { - @Override - public QuotaCounterContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the QuotaCounterContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (quotaCounterKey == null) { - throw new IllegalArgumentException("Parameter quotaCounterKey is required and cannot be null."); - } - if (quotaPeriodKey == null) { - throw new IllegalArgumentException("Parameter quotaPeriodKey is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates an existing quota counter value in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey, QuotaCounterValueContractPropertiesInner parameters) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, parameters).toBlocking().single().body(); - } - - /** - * Updates an existing quota counter value in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey, QuotaCounterValueContractPropertiesInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, parameters), serviceCallback); - } - - /** - * Updates an existing quota counter value in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey, QuotaCounterValueContractPropertiesInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an existing quota counter value in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey, QuotaCounterValueContractPropertiesInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (quotaCounterKey == null) { - throw new IllegalArgumentException("Parameter quotaCounterKey is required and cannot be null."); - } - if (quotaPeriodKey == null) { - throw new IllegalArgumentException("Parameter quotaPeriodKey is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterCollectionInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterCollectionInner.java deleted file mode 100644 index dc4a7c89c47..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterCollectionInner.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Paged Quota Counter list representation. - */ -public class QuotaCounterCollectionInner { - /** - * Quota counter values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Total record count number across all pages. - */ - @JsonProperty(value = "count") - private Long count; - - /** - * Next page link if any. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the QuotaCounterCollectionInner object itself. - */ - public QuotaCounterCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the count value. - * - * @return the count value - */ - public Long count() { - return this.count; - } - - /** - * Set the count value. - * - * @param count the count value to set - * @return the QuotaCounterCollectionInner object itself. - */ - public QuotaCounterCollectionInner withCount(Long count) { - this.count = count; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink value. - * - * @param nextLink the nextLink value to set - * @return the QuotaCounterCollectionInner object itself. - */ - public QuotaCounterCollectionInner withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterContractInner.java deleted file mode 100644 index 5154add22ca..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterContractInner.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Quota counter details. - */ -public class QuotaCounterContractInner { - /** - * The Key value of the Counter. Must not be empty. - */ - @JsonProperty(value = "counterKey", required = true) - private String counterKey; - - /** - * Identifier of the Period for which the counter was collected. Must not - * be empty. - */ - @JsonProperty(value = "periodKey", required = true) - private String periodKey; - - /** - * The date of the start of Counter Period. The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "periodStartTime", required = true) - private DateTime periodStartTime; - - /** - * The date of the end of Counter Period. The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "periodEndTime", required = true) - private DateTime periodEndTime; - - /** - * Quota Value Properties. - */ - @JsonProperty(value = "value") - private QuotaCounterValueContractPropertiesInner value; - - /** - * Get the counterKey value. - * - * @return the counterKey value - */ - public String counterKey() { - return this.counterKey; - } - - /** - * Set the counterKey value. - * - * @param counterKey the counterKey value to set - * @return the QuotaCounterContractInner object itself. - */ - public QuotaCounterContractInner withCounterKey(String counterKey) { - this.counterKey = counterKey; - return this; - } - - /** - * Get the periodKey value. - * - * @return the periodKey value - */ - public String periodKey() { - return this.periodKey; - } - - /** - * Set the periodKey value. - * - * @param periodKey the periodKey value to set - * @return the QuotaCounterContractInner object itself. - */ - public QuotaCounterContractInner withPeriodKey(String periodKey) { - this.periodKey = periodKey; - return this; - } - - /** - * Get the periodStartTime value. - * - * @return the periodStartTime value - */ - public DateTime periodStartTime() { - return this.periodStartTime; - } - - /** - * Set the periodStartTime value. - * - * @param periodStartTime the periodStartTime value to set - * @return the QuotaCounterContractInner object itself. - */ - public QuotaCounterContractInner withPeriodStartTime(DateTime periodStartTime) { - this.periodStartTime = periodStartTime; - return this; - } - - /** - * Get the periodEndTime value. - * - * @return the periodEndTime value - */ - public DateTime periodEndTime() { - return this.periodEndTime; - } - - /** - * Set the periodEndTime value. - * - * @param periodEndTime the periodEndTime value to set - * @return the QuotaCounterContractInner object itself. - */ - public QuotaCounterContractInner withPeriodEndTime(DateTime periodEndTime) { - this.periodEndTime = periodEndTime; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public QuotaCounterValueContractPropertiesInner value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the QuotaCounterContractInner object itself. - */ - public QuotaCounterContractInner withValue(QuotaCounterValueContractPropertiesInner value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterValueContractPropertiesInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterValueContractPropertiesInner.java deleted file mode 100644 index 1597f78f74e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/QuotaCounterValueContractPropertiesInner.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Quota counter value details. - */ -public class QuotaCounterValueContractPropertiesInner { - /** - * Number of times Counter was called. - */ - @JsonProperty(value = "callsCount") - private Integer callsCount; - - /** - * Data Transferred in KiloBytes. - */ - @JsonProperty(value = "kbTransferred") - private Double kbTransferred; - - /** - * Get the callsCount value. - * - * @return the callsCount value - */ - public Integer callsCount() { - return this.callsCount; - } - - /** - * Set the callsCount value. - * - * @param callsCount the callsCount value to set - * @return the QuotaCounterValueContractPropertiesInner object itself. - */ - public QuotaCounterValueContractPropertiesInner withCallsCount(Integer callsCount) { - this.callsCount = callsCount; - return this; - } - - /** - * Get the kbTransferred value. - * - * @return the kbTransferred value - */ - public Double kbTransferred() { - return this.kbTransferred; - } - - /** - * Set the kbTransferred value. - * - * @param kbTransferred the kbTransferred value to set - * @return the QuotaCounterValueContractPropertiesInner object itself. - */ - public QuotaCounterValueContractPropertiesInner withKbTransferred(Double kbTransferred) { - this.kbTransferred = kbTransferred; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientEmailCollectionInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientEmailCollectionInner.java deleted file mode 100644 index 23e72adc3a4..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientEmailCollectionInner.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Paged Recipient User list representation. - */ -public class RecipientEmailCollectionInner { - /** - * Page values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Next page link if any. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the RecipientEmailCollectionInner object itself. - */ - public RecipientEmailCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink value. - * - * @param nextLink the nextLink value to set - * @return the RecipientEmailCollectionInner object itself. - */ - public RecipientEmailCollectionInner withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientEmailContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientEmailContractInner.java deleted file mode 100644 index e8347ef0e3a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientEmailContractInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Recipient Email details. - */ -@JsonFlatten -public class RecipientEmailContractInner extends Resource { - /** - * User Email subscribed to notification. - */ - @JsonProperty(value = "properties.email") - private String email; - - /** - * Get the email value. - * - * @return the email value - */ - public String email() { - return this.email; - } - - /** - * Set the email value. - * - * @param email the email value to set - * @return the RecipientEmailContractInner object itself. - */ - public RecipientEmailContractInner withEmail(String email) { - this.email = email; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientUserCollectionInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientUserCollectionInner.java deleted file mode 100644 index f76ef2bee74..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientUserCollectionInner.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Paged Recipient User list representation. - */ -public class RecipientUserCollectionInner { - /** - * Page values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Next page link if any. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the RecipientUserCollectionInner object itself. - */ - public RecipientUserCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink value. - * - * @param nextLink the nextLink value to set - * @return the RecipientUserCollectionInner object itself. - */ - public RecipientUserCollectionInner withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientUserContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientUserContractInner.java deleted file mode 100644 index a67bdea2080..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RecipientUserContractInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Recipient User details. - */ -@JsonFlatten -public class RecipientUserContractInner extends Resource { - /** - * API Management UserId subscribed to notification. - */ - @JsonProperty(value = "properties.userId") - private String userId; - - /** - * Get the userId value. - * - * @return the userId value - */ - public String userId() { - return this.userId; - } - - /** - * Set the userId value. - * - * @param userId the userId value to set - * @return the RecipientUserContractInner object itself. - */ - public RecipientUserContractInner withUserId(String userId) { - this.userId = userId; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RegionContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RegionContractInner.java deleted file mode 100644 index c5b220abebf..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RegionContractInner.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Region profile. - */ -public class RegionContractInner { - /** - * Region name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * whether Region is the master region. - */ - @JsonProperty(value = "isMasterRegion") - private Boolean isMasterRegion; - - /** - * whether Region is deleted. - */ - @JsonProperty(value = "isDeleted") - private Boolean isDeleted; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the isMasterRegion value. - * - * @return the isMasterRegion value - */ - public Boolean isMasterRegion() { - return this.isMasterRegion; - } - - /** - * Set the isMasterRegion value. - * - * @param isMasterRegion the isMasterRegion value to set - * @return the RegionContractInner object itself. - */ - public RegionContractInner withIsMasterRegion(Boolean isMasterRegion) { - this.isMasterRegion = isMasterRegion; - return this; - } - - /** - * Get the isDeleted value. - * - * @return the isDeleted value - */ - public Boolean isDeleted() { - return this.isDeleted; - } - - /** - * Set the isDeleted value. - * - * @param isDeleted the isDeleted value to set - * @return the RegionContractInner object itself. - */ - public RegionContractInner withIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RegionsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RegionsInner.java deleted file mode 100644 index e1cd95add7d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RegionsInner.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Regions. - */ -public class RegionsInner { - /** The Retrofit service to perform REST calls. */ - private RegionsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of RegionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public RegionsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(RegionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Regions to be - * used by Retrofit to perform actually REST calls. - */ - interface RegionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Regions listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Regions listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all azure regions in which the service exists. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RegionContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all azure regions in which the service exists. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all azure regions in which the service exists. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RegionContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all azure regions in which the service exists. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RegionContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all azure regions in which the service exists. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RegionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all azure regions in which the service exists. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RegionContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all azure regions in which the service exists. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all azure regions in which the service exists. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RegionContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all azure regions in which the service exists. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RegionContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all azure regions in which the service exists. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RegionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ReportRecordContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ReportRecordContractInner.java deleted file mode 100644 index 67fda6dc0d5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ReportRecordContractInner.java +++ /dev/null @@ -1,682 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Report data. - */ -public class ReportRecordContractInner { - /** - * Name depending on report endpoint specifies product, API, operation or - * developer name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Start of aggregation period. The date conforms to the following format: - * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "timestamp") - private DateTime timestamp; - - /** - * Length of agregation period. Interval must be multiple of 15 minutes - * and may not be zero. The value should be in ISO 8601 format - * (http://en.wikipedia.org/wiki/ISO_8601#Durations). - */ - @JsonProperty(value = "interval") - private String interval; - - /** - * Country to which this record data is related. - */ - @JsonProperty(value = "country") - private String country; - - /** - * Country region to which this record data is related. - */ - @JsonProperty(value = "region") - private String region; - - /** - * Zip code to which this record data is related. - */ - @JsonProperty(value = "zip") - private String zip; - - /** - * User identifier path. /users/{userId}. - */ - @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY) - private String userId; - - /** - * Product identifier path. /products/{productId}. - */ - @JsonProperty(value = "productId", access = JsonProperty.Access.WRITE_ONLY) - private String productId; - - /** - * API identifier path. /apis/{apiId}. - */ - @JsonProperty(value = "apiId") - private String apiId; - - /** - * Operation identifier path. /apis/{apiId}/operations/{operationId}. - */ - @JsonProperty(value = "operationId") - private String operationId; - - /** - * API region identifier. - */ - @JsonProperty(value = "apiRegion") - private String apiRegion; - - /** - * Subscription identifier path. /subscriptions/{subscriptionId}. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * Number of succesful calls. This includes calls returning HttpStatusCode - * <= 301 and HttpStatusCode.NotModified and - * HttpStatusCode.TemporaryRedirect. - */ - @JsonProperty(value = "callCountSuccess") - private Integer callCountSuccess; - - /** - * Number of calls blocked due to invalid credentials. This includes calls - * returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and - * HttpStatusCode.TooManyRequests. - */ - @JsonProperty(value = "callCountBlocked") - private Integer callCountBlocked; - - /** - * Number of calls failed due to proxy or backend errors. This includes - * calls returning HttpStatusCode.BadRequest(400) and any Code between - * HttpStatusCode.InternalServerError (500) and 600. - */ - @JsonProperty(value = "callCountFailed") - private Integer callCountFailed; - - /** - * Number of other calls. - */ - @JsonProperty(value = "callCountOther") - private Integer callCountOther; - - /** - * Total number of calls. - */ - @JsonProperty(value = "callCountTotal") - private Integer callCountTotal; - - /** - * Bandwidth consumed. - */ - @JsonProperty(value = "bandwidth") - private Long bandwidth; - - /** - * Number of times when content was served from cache policy. - */ - @JsonProperty(value = "cacheHitCount") - private Integer cacheHitCount; - - /** - * Number of times content was fetched from backend. - */ - @JsonProperty(value = "cacheMissCount") - private Integer cacheMissCount; - - /** - * Average time it took to process request. - */ - @JsonProperty(value = "apiTimeAvg") - private Double apiTimeAvg; - - /** - * Minimum time it took to process request. - */ - @JsonProperty(value = "apiTimeMin") - private Double apiTimeMin; - - /** - * Maximum time it took to process request. - */ - @JsonProperty(value = "apiTimeMax") - private Double apiTimeMax; - - /** - * Average time it took to process request on backend. - */ - @JsonProperty(value = "serviceTimeAvg") - private Double serviceTimeAvg; - - /** - * Minimum time it took to process request on backend. - */ - @JsonProperty(value = "serviceTimeMin") - private Double serviceTimeMin; - - /** - * Maximum time it took to process request on backend. - */ - @JsonProperty(value = "serviceTimeMax") - private Double serviceTimeMax; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the timestamp value. - * - * @return the timestamp value - */ - public DateTime timestamp() { - return this.timestamp; - } - - /** - * Set the timestamp value. - * - * @param timestamp the timestamp value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withTimestamp(DateTime timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Get the interval value. - * - * @return the interval value - */ - public String interval() { - return this.interval; - } - - /** - * Set the interval value. - * - * @param interval the interval value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withInterval(String interval) { - this.interval = interval; - return this; - } - - /** - * Get the country value. - * - * @return the country value - */ - public String country() { - return this.country; - } - - /** - * Set the country value. - * - * @param country the country value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the region value. - * - * @return the region value - */ - public String region() { - return this.region; - } - - /** - * Set the region value. - * - * @param region the region value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withRegion(String region) { - this.region = region; - return this; - } - - /** - * Get the zip value. - * - * @return the zip value - */ - public String zip() { - return this.zip; - } - - /** - * Set the zip value. - * - * @param zip the zip value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withZip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get the userId value. - * - * @return the userId value - */ - public String userId() { - return this.userId; - } - - /** - * Get the productId value. - * - * @return the productId value - */ - public String productId() { - return this.productId; - } - - /** - * Get the apiId value. - * - * @return the apiId value - */ - public String apiId() { - return this.apiId; - } - - /** - * Set the apiId value. - * - * @param apiId the apiId value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withApiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * Get the operationId value. - * - * @return the operationId value - */ - public String operationId() { - return this.operationId; - } - - /** - * Set the operationId value. - * - * @param operationId the operationId value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withOperationId(String operationId) { - this.operationId = operationId; - return this; - } - - /** - * Get the apiRegion value. - * - * @return the apiRegion value - */ - public String apiRegion() { - return this.apiRegion; - } - - /** - * Set the apiRegion value. - * - * @param apiRegion the apiRegion value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withApiRegion(String apiRegion) { - this.apiRegion = apiRegion; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the callCountSuccess value. - * - * @return the callCountSuccess value - */ - public Integer callCountSuccess() { - return this.callCountSuccess; - } - - /** - * Set the callCountSuccess value. - * - * @param callCountSuccess the callCountSuccess value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withCallCountSuccess(Integer callCountSuccess) { - this.callCountSuccess = callCountSuccess; - return this; - } - - /** - * Get the callCountBlocked value. - * - * @return the callCountBlocked value - */ - public Integer callCountBlocked() { - return this.callCountBlocked; - } - - /** - * Set the callCountBlocked value. - * - * @param callCountBlocked the callCountBlocked value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withCallCountBlocked(Integer callCountBlocked) { - this.callCountBlocked = callCountBlocked; - return this; - } - - /** - * Get the callCountFailed value. - * - * @return the callCountFailed value - */ - public Integer callCountFailed() { - return this.callCountFailed; - } - - /** - * Set the callCountFailed value. - * - * @param callCountFailed the callCountFailed value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withCallCountFailed(Integer callCountFailed) { - this.callCountFailed = callCountFailed; - return this; - } - - /** - * Get the callCountOther value. - * - * @return the callCountOther value - */ - public Integer callCountOther() { - return this.callCountOther; - } - - /** - * Set the callCountOther value. - * - * @param callCountOther the callCountOther value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withCallCountOther(Integer callCountOther) { - this.callCountOther = callCountOther; - return this; - } - - /** - * Get the callCountTotal value. - * - * @return the callCountTotal value - */ - public Integer callCountTotal() { - return this.callCountTotal; - } - - /** - * Set the callCountTotal value. - * - * @param callCountTotal the callCountTotal value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withCallCountTotal(Integer callCountTotal) { - this.callCountTotal = callCountTotal; - return this; - } - - /** - * Get the bandwidth value. - * - * @return the bandwidth value - */ - public Long bandwidth() { - return this.bandwidth; - } - - /** - * Set the bandwidth value. - * - * @param bandwidth the bandwidth value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withBandwidth(Long bandwidth) { - this.bandwidth = bandwidth; - return this; - } - - /** - * Get the cacheHitCount value. - * - * @return the cacheHitCount value - */ - public Integer cacheHitCount() { - return this.cacheHitCount; - } - - /** - * Set the cacheHitCount value. - * - * @param cacheHitCount the cacheHitCount value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withCacheHitCount(Integer cacheHitCount) { - this.cacheHitCount = cacheHitCount; - return this; - } - - /** - * Get the cacheMissCount value. - * - * @return the cacheMissCount value - */ - public Integer cacheMissCount() { - return this.cacheMissCount; - } - - /** - * Set the cacheMissCount value. - * - * @param cacheMissCount the cacheMissCount value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withCacheMissCount(Integer cacheMissCount) { - this.cacheMissCount = cacheMissCount; - return this; - } - - /** - * Get the apiTimeAvg value. - * - * @return the apiTimeAvg value - */ - public Double apiTimeAvg() { - return this.apiTimeAvg; - } - - /** - * Set the apiTimeAvg value. - * - * @param apiTimeAvg the apiTimeAvg value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withApiTimeAvg(Double apiTimeAvg) { - this.apiTimeAvg = apiTimeAvg; - return this; - } - - /** - * Get the apiTimeMin value. - * - * @return the apiTimeMin value - */ - public Double apiTimeMin() { - return this.apiTimeMin; - } - - /** - * Set the apiTimeMin value. - * - * @param apiTimeMin the apiTimeMin value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withApiTimeMin(Double apiTimeMin) { - this.apiTimeMin = apiTimeMin; - return this; - } - - /** - * Get the apiTimeMax value. - * - * @return the apiTimeMax value - */ - public Double apiTimeMax() { - return this.apiTimeMax; - } - - /** - * Set the apiTimeMax value. - * - * @param apiTimeMax the apiTimeMax value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withApiTimeMax(Double apiTimeMax) { - this.apiTimeMax = apiTimeMax; - return this; - } - - /** - * Get the serviceTimeAvg value. - * - * @return the serviceTimeAvg value - */ - public Double serviceTimeAvg() { - return this.serviceTimeAvg; - } - - /** - * Set the serviceTimeAvg value. - * - * @param serviceTimeAvg the serviceTimeAvg value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withServiceTimeAvg(Double serviceTimeAvg) { - this.serviceTimeAvg = serviceTimeAvg; - return this; - } - - /** - * Get the serviceTimeMin value. - * - * @return the serviceTimeMin value - */ - public Double serviceTimeMin() { - return this.serviceTimeMin; - } - - /** - * Set the serviceTimeMin value. - * - * @param serviceTimeMin the serviceTimeMin value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withServiceTimeMin(Double serviceTimeMin) { - this.serviceTimeMin = serviceTimeMin; - return this; - } - - /** - * Get the serviceTimeMax value. - * - * @return the serviceTimeMax value - */ - public Double serviceTimeMax() { - return this.serviceTimeMax; - } - - /** - * Set the serviceTimeMax value. - * - * @param serviceTimeMax the serviceTimeMax value to set - * @return the ReportRecordContractInner object itself. - */ - public ReportRecordContractInner withServiceTimeMax(Double serviceTimeMax) { - this.serviceTimeMax = serviceTimeMax; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ReportsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ReportsInner.java deleted file mode 100644 index 1263866dac8..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/ReportsInner.java +++ /dev/null @@ -1,2946 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import org.joda.time.Period; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Reports. - */ -public class ReportsInner { - /** The Retrofit service to perform REST calls. */ - private ReportsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of ReportsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ReportsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(ReportsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Reports to be - * used by Retrofit to perform actually REST calls. - */ - interface ReportsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByApi" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi") - Observable> listByApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByUser" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser") - Observable> listByUser(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByOperation" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation") - Observable> listByOperation(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByProduct" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct") - Observable> listByProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByGeo" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo") - Observable> listByGeo(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listBySubscription" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription") - Observable> listBySubscription(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByTime" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime") - Observable> listByTime(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("interval") Period interval, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByRequest" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest") - Observable> listByRequest(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByApiNext" }) - @GET - Observable> listByApiNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByUserNext" }) - @GET - Observable> listByUserNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByOperationNext" }) - @GET - Observable> listByOperationNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByProductNext" }) - @GET - Observable> listByProductNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByGeoNext" }) - @GET - Observable> listByGeoNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listBySubscriptionNext" }) - @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Reports listByTimeNext" }) - @GET - Observable> listByTimeNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String filter) { - ServiceResponse> response = listByApiSinglePageAsync(resourceGroupName, serviceName, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String filter) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - return service.listByApi(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByApiSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by API. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByApi(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApiDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByUser(final String resourceGroupName, final String serviceName, final String filter) { - ServiceResponse> response = listByUserSinglePageAsync(resourceGroupName, serviceName, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByUserNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByUserAsync(final String resourceGroupName, final String serviceName, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByUserSinglePageAsync(resourceGroupName, serviceName, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByUserNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByUserAsync(final String resourceGroupName, final String serviceName, final String filter) { - return listByUserWithServiceResponseAsync(resourceGroupName, serviceName, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByUserWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter) { - return listByUserSinglePageAsync(resourceGroupName, serviceName, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByUserNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByUserSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - return service.listByUser(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByUserDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByUser(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByUserSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByUserNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByUserAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByUserSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByUserNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByUserAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByUserWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByUserWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByUserSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByUserNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by User. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByUserSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByUser(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByUserDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByUserDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByOperation(final String resourceGroupName, final String serviceName, final String filter) { - ServiceResponse> response = listByOperationSinglePageAsync(resourceGroupName, serviceName, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByOperationAsync(final String resourceGroupName, final String serviceName, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByOperationSinglePageAsync(resourceGroupName, serviceName, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByOperationAsync(final String resourceGroupName, final String serviceName, final String filter) { - return listByOperationWithServiceResponseAsync(resourceGroupName, serviceName, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByOperationWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter) { - return listByOperationSinglePageAsync(resourceGroupName, serviceName, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByOperationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByOperationSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - return service.listByOperation(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByOperationDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByOperation(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByOperationSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByOperationAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByOperationSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByOperationAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByOperationWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by API Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByOperationWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByOperationSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByOperationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by API Operations. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByOperationSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByOperation(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByOperationDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByProduct(final String resourceGroupName, final String serviceName, final String filter) { - ServiceResponse> response = listByProductSinglePageAsync(resourceGroupName, serviceName, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductAsync(final String resourceGroupName, final String serviceName, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductSinglePageAsync(resourceGroupName, serviceName, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByProductAsync(final String resourceGroupName, final String serviceName, final String filter) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByProductWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter) { - return listByProductSinglePageAsync(resourceGroupName, serviceName, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - return service.listByProduct(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByProduct(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByProductSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByProductAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByProductWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByProductSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by Product. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByProduct(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByProductDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByGeo(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByGeoSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByGeoNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByGeoAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByGeoSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByGeoNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByGeoAsync(final String resourceGroupName, final String serviceName) { - return listByGeoWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByGeoWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByGeoSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByGeoNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByGeoSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByGeo(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByGeoDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByGeo(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByGeoSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByGeoNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByGeoAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByGeoSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByGeoNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByGeoAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByGeoWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by GeoGraphy. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByGeoWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByGeoSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByGeoNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by GeoGraphy. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByGeoSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByGeo(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByGeoDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByGeoDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listBySubscription(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listBySubscriptionSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listBySubscriptionAsync(final String resourceGroupName, final String serviceName) { - return listBySubscriptionWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listBySubscriptionSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listBySubscription(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listBySubscription(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listBySubscriptionSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listBySubscriptionAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listBySubscriptionWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listBySubscriptionSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by subscription. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscription(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByTime(final String resourceGroupName, final String serviceName, final Period interval) { - ServiceResponse> response = listByTimeSinglePageAsync(resourceGroupName, serviceName, interval).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTimeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTimeAsync(final String resourceGroupName, final String serviceName, final Period interval, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTimeSinglePageAsync(resourceGroupName, serviceName, interval), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTimeNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByTimeAsync(final String resourceGroupName, final String serviceName, final Period interval) { - return listByTimeWithServiceResponseAsync(resourceGroupName, serviceName, interval) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByTimeWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final Period interval) { - return listByTimeSinglePageAsync(resourceGroupName, serviceName, interval) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTimeNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTimeSinglePageAsync(final String resourceGroupName, final String serviceName, final Period interval) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (interval == null) { - throw new IllegalArgumentException("Parameter interval is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByTime(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, interval, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTimeDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByTime(final String resourceGroupName, final String serviceName, final Period interval, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByTimeSinglePageAsync(resourceGroupName, serviceName, interval, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTimeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTimeAsync(final String resourceGroupName, final String serviceName, final Period interval, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTimeSinglePageAsync(resourceGroupName, serviceName, interval, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTimeNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByTimeAsync(final String resourceGroupName, final String serviceName, final Period interval, final String filter, final Integer top, final Integer skip) { - return listByTimeWithServiceResponseAsync(resourceGroupName, serviceName, interval, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by Time. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByTimeWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final Period interval, final String filter, final Integer top, final Integer skip) { - return listByTimeSinglePageAsync(resourceGroupName, serviceName, interval, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTimeNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by Time. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTimeSinglePageAsync(final String resourceGroupName, final String serviceName, final Period interval, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (interval == null) { - throw new IllegalArgumentException("Parameter interval is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByTime(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, interval, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTimeDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByTimeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by Request. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<RequestReportRecordContractInner> object if successful. - */ - public List listByRequest(String resourceGroupName, String serviceName, String filter) { - return listByRequestWithServiceResponseAsync(resourceGroupName, serviceName, filter).toBlocking().single().body(); - } - - /** - * Lists report records by Request. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByRequestAsync(String resourceGroupName, String serviceName, String filter, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByRequestWithServiceResponseAsync(resourceGroupName, serviceName, filter), serviceCallback); - } - - /** - * Lists report records by Request. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<RequestReportRecordContractInner> object - */ - public Observable> listByRequestAsync(String resourceGroupName, String serviceName, String filter) { - return listByRequestWithServiceResponseAsync(resourceGroupName, serviceName, filter).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by Request. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<RequestReportRecordContractInner> object - */ - public Observable>> listByRequestWithServiceResponseAsync(String resourceGroupName, String serviceName, String filter) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - return service.listByRequest(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByRequestDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists report records by Request. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<RequestReportRecordContractInner> object if successful. - */ - public List listByRequest(String resourceGroupName, String serviceName, String filter, Integer top, Integer skip) { - return listByRequestWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single().body(); - } - - /** - * Lists report records by Request. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByRequestAsync(String resourceGroupName, String serviceName, String filter, Integer top, Integer skip, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByRequestWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip), serviceCallback); - } - - /** - * Lists report records by Request. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<RequestReportRecordContractInner> object - */ - public Observable> listByRequestAsync(String resourceGroupName, String serviceName, String filter, Integer top, Integer skip) { - return listByRequestWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by Request. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<RequestReportRecordContractInner> object - */ - public Observable>> listByRequestWithServiceResponseAsync(String resourceGroupName, String serviceName, String filter, Integer top, Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByRequest(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByRequestDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByRequestDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByApiNext(final String nextPageLink) { - ServiceResponse> response = listByApiNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByApiNextAsync(final String nextPageLink) { - return listByApiNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByApiNextWithServiceResponseAsync(final String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by API. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByApiNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApiNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by User. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByUserNext(final String nextPageLink) { - ServiceResponse> response = listByUserNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByUserNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by User. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByUserNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByUserNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByUserNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by User. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByUserNextAsync(final String nextPageLink) { - return listByUserNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by User. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByUserNextWithServiceResponseAsync(final String nextPageLink) { - return listByUserNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByUserNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by User. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByUserNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByUserNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByUserNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByUserNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by API Operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByOperationNext(final String nextPageLink) { - ServiceResponse> response = listByOperationNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by API Operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByOperationNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByOperationNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by API Operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByOperationNextAsync(final String nextPageLink) { - return listByOperationNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by API Operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByOperationNextWithServiceResponseAsync(final String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByOperationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by API Operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByOperationNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByOperationNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByOperationNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByOperationNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by Product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByProductNext(final String nextPageLink) { - ServiceResponse> response = listByProductNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by Product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by Product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByProductNextAsync(final String nextPageLink) { - return listByProductNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by Product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByProductNextWithServiceResponseAsync(final String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by Product. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByProductNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByProductNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by GeoGraphy. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByGeoNext(final String nextPageLink) { - ServiceResponse> response = listByGeoNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByGeoNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by GeoGraphy. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByGeoNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByGeoNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByGeoNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by GeoGraphy. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByGeoNextAsync(final String nextPageLink) { - return listByGeoNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by GeoGraphy. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByGeoNextWithServiceResponseAsync(final String nextPageLink) { - return listByGeoNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByGeoNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by GeoGraphy. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByGeoNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByGeoNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByGeoNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByGeoNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists report records by Time. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReportRecordContractInner> object if successful. - */ - public PagedList listByTimeNext(final String nextPageLink) { - ServiceResponse> response = listByTimeNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByTimeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists report records by Time. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByTimeNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByTimeNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByTimeNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists report records by Time. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable> listByTimeNextAsync(final String nextPageLink) { - return listByTimeNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists report records by Time. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReportRecordContractInner> object - */ - public Observable>> listByTimeNextWithServiceResponseAsync(final String nextPageLink) { - return listByTimeNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByTimeNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists report records by Time. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReportRecordContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByTimeNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByTimeNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByTimeNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByTimeNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RequestReportRecordContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RequestReportRecordContractInner.java deleted file mode 100644 index 28fea02d5b5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/RequestReportRecordContractInner.java +++ /dev/null @@ -1,470 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Request Report data. - */ -public class RequestReportRecordContractInner { - /** - * API identifier path. /apis/{apiId}. - */ - @JsonProperty(value = "apiId") - private String apiId; - - /** - * Operation identifier path. /apis/{apiId}/operations/{operationId}. - */ - @JsonProperty(value = "operationId") - private String operationId; - - /** - * Product identifier path. /products/{productId}. - */ - @JsonProperty(value = "productId", access = JsonProperty.Access.WRITE_ONLY) - private String productId; - - /** - * User identifier path. /users/{userId}. - */ - @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY) - private String userId; - - /** - * The HTTP method associated with this request.. - */ - @JsonProperty(value = "method") - private String method; - - /** - * The full URL associated with this request. - */ - @JsonProperty(value = "url") - private String url; - - /** - * The client IP address associated with this request. - */ - @JsonProperty(value = "ipAddress") - private String ipAddress; - - /** - * The HTTP status code received by the gateway as a result of forwarding - * this request to the backend. - */ - @JsonProperty(value = "backendResponseCode") - private String backendResponseCode; - - /** - * The HTTP status code returned by the gateway. - */ - @JsonProperty(value = "responseCode") - private Integer responseCode; - - /** - * The size of the response returned by the gateway. - */ - @JsonProperty(value = "responseSize") - private Integer responseSize; - - /** - * The date and time when this request was received by the gateway in ISO - * 8601 format. - */ - @JsonProperty(value = "timestamp") - private DateTime timestamp; - - /** - * Specifies if response cache was involved in generating the response. If - * the value is none, the cache was not used. If the value is hit, cached - * response was returned. If the value is miss, the cache was used but - * lookup resulted in a miss and request was fullfilled by the backend. - */ - @JsonProperty(value = "cache") - private String cache; - - /** - * The total time it took to process this request. - */ - @JsonProperty(value = "apiTime") - private Double apiTime; - - /** - * he time it took to forward this request to the backend and get the - * response back. - */ - @JsonProperty(value = "serviceTime") - private Double serviceTime; - - /** - * Azure region where the gateway that processed this request is located. - */ - @JsonProperty(value = "apiRegion") - private String apiRegion; - - /** - * Subscription identifier path. /subscriptions/{subscriptionId}. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * Request Identifier. - */ - @JsonProperty(value = "requestId") - private String requestId; - - /** - * The size of this request.. - */ - @JsonProperty(value = "requestSize") - private Integer requestSize; - - /** - * Get the apiId value. - * - * @return the apiId value - */ - public String apiId() { - return this.apiId; - } - - /** - * Set the apiId value. - * - * @param apiId the apiId value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withApiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * Get the operationId value. - * - * @return the operationId value - */ - public String operationId() { - return this.operationId; - } - - /** - * Set the operationId value. - * - * @param operationId the operationId value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withOperationId(String operationId) { - this.operationId = operationId; - return this; - } - - /** - * Get the productId value. - * - * @return the productId value - */ - public String productId() { - return this.productId; - } - - /** - * Get the userId value. - * - * @return the userId value - */ - public String userId() { - return this.userId; - } - - /** - * Get the method value. - * - * @return the method value - */ - public String method() { - return this.method; - } - - /** - * Set the method value. - * - * @param method the method value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withMethod(String method) { - this.method = method; - return this; - } - - /** - * Get the url value. - * - * @return the url value - */ - public String url() { - return this.url; - } - - /** - * Set the url value. - * - * @param url the url value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the ipAddress value. - * - * @return the ipAddress value - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress value. - * - * @param ipAddress the ipAddress value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withIpAddress(String ipAddress) { - this.ipAddress = ipAddress; - return this; - } - - /** - * Get the backendResponseCode value. - * - * @return the backendResponseCode value - */ - public String backendResponseCode() { - return this.backendResponseCode; - } - - /** - * Set the backendResponseCode value. - * - * @param backendResponseCode the backendResponseCode value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withBackendResponseCode(String backendResponseCode) { - this.backendResponseCode = backendResponseCode; - return this; - } - - /** - * Get the responseCode value. - * - * @return the responseCode value - */ - public Integer responseCode() { - return this.responseCode; - } - - /** - * Set the responseCode value. - * - * @param responseCode the responseCode value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withResponseCode(Integer responseCode) { - this.responseCode = responseCode; - return this; - } - - /** - * Get the responseSize value. - * - * @return the responseSize value - */ - public Integer responseSize() { - return this.responseSize; - } - - /** - * Set the responseSize value. - * - * @param responseSize the responseSize value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withResponseSize(Integer responseSize) { - this.responseSize = responseSize; - return this; - } - - /** - * Get the timestamp value. - * - * @return the timestamp value - */ - public DateTime timestamp() { - return this.timestamp; - } - - /** - * Set the timestamp value. - * - * @param timestamp the timestamp value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withTimestamp(DateTime timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Get the cache value. - * - * @return the cache value - */ - public String cache() { - return this.cache; - } - - /** - * Set the cache value. - * - * @param cache the cache value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withCache(String cache) { - this.cache = cache; - return this; - } - - /** - * Get the apiTime value. - * - * @return the apiTime value - */ - public Double apiTime() { - return this.apiTime; - } - - /** - * Set the apiTime value. - * - * @param apiTime the apiTime value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withApiTime(Double apiTime) { - this.apiTime = apiTime; - return this; - } - - /** - * Get the serviceTime value. - * - * @return the serviceTime value - */ - public Double serviceTime() { - return this.serviceTime; - } - - /** - * Set the serviceTime value. - * - * @param serviceTime the serviceTime value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withServiceTime(Double serviceTime) { - this.serviceTime = serviceTime; - return this; - } - - /** - * Get the apiRegion value. - * - * @return the apiRegion value - */ - public String apiRegion() { - return this.apiRegion; - } - - /** - * Set the apiRegion value. - * - * @param apiRegion the apiRegion value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withApiRegion(String apiRegion) { - this.apiRegion = apiRegion; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the requestId value. - * - * @return the requestId value - */ - public String requestId() { - return this.requestId; - } - - /** - * Set the requestId value. - * - * @param requestId the requestId value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withRequestId(String requestId) { - this.requestId = requestId; - return this; - } - - /** - * Get the requestSize value. - * - * @return the requestSize value - */ - public Integer requestSize() { - return this.requestSize; - } - - /** - * Set the requestSize value. - * - * @param requestSize the requestSize value to set - * @return the RequestReportRecordContractInner object itself. - */ - public RequestReportRecordContractInner withRequestSize(Integer requestSize) { - this.requestSize = requestSize; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SaveConfigurationParameterInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SaveConfigurationParameterInner.java deleted file mode 100644 index d93ddd5b999..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SaveConfigurationParameterInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Save Tenant Configuration operation. - */ -public class SaveConfigurationParameterInner { - /** - * The name of the Git branch in which to commit the current configuration - * snapshot. - */ - @JsonProperty(value = "branch", required = true) - private String branch; - - /** - * The value if true, the current configuration database is committed to - * the Git repository, even if the Git repository has newer changes that - * would be overwritten. - */ - @JsonProperty(value = "force") - private Boolean force; - - /** - * Get the branch value. - * - * @return the branch value - */ - public String branch() { - return this.branch; - } - - /** - * Set the branch value. - * - * @param branch the branch value to set - * @return the SaveConfigurationParameterInner object itself. - */ - public SaveConfigurationParameterInner withBranch(String branch) { - this.branch = branch; - return this; - } - - /** - * Get the force value. - * - * @return the force value - */ - public Boolean force() { - return this.force; - } - - /** - * Set the force value. - * - * @param force the force value to set - * @return the SaveConfigurationParameterInner object itself. - */ - public SaveConfigurationParameterInner withForce(Boolean force) { - this.force = force; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SchemaContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SchemaContractInner.java deleted file mode 100644 index fdbfcf6dd29..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SchemaContractInner.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Schema Contract details. - */ -@JsonFlatten -public class SchemaContractInner extends Resource { - /** - * Must be a valid a media type used in a Content-Type header as defined in - * the RFC 2616. Media type of the schema document (e.g. application/json, - * application/xml). - */ - @JsonProperty(value = "properties.contentType", required = true) - private String contentType; - - /** - * Json escaped string defining the document representing the Schema. - */ - @JsonProperty(value = "properties.document.value") - private String value; - - /** - * Get the contentType value. - * - * @return the contentType value - */ - public String contentType() { - return this.contentType; - } - - /** - * Set the contentType value. - * - * @param contentType the contentType value to set - * @return the SchemaContractInner object itself. - */ - public SchemaContractInner withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the SchemaContractInner object itself. - */ - public SchemaContractInner withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsGetEntityTagHeadersInner.java deleted file mode 100644 index 7a7657df81f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class SignInSettingsGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the SignInSettingsGetEntityTagHeadersInner object itself. - */ - public SignInSettingsGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsGetHeadersInner.java deleted file mode 100644 index fc34d9c9091..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class SignInSettingsGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the SignInSettingsGetHeadersInner object itself. - */ - public SignInSettingsGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsInner.java deleted file mode 100644 index 13196a08b26..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignInSettingsInner.java +++ /dev/null @@ -1,609 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in SignInSettings. - */ -public class SignInSettingsInner { - /** The Retrofit service to perform REST calls. */ - private SignInSettingsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of SignInSettingsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public SignInSettingsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(SignInSettingsService.class); - this.client = client; - } - - /** - * The interface defining all the services for SignInSettings to be - * used by Retrofit to perform actually REST calls. - */ - interface SignInSettingsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.SignInSettings getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.SignInSettings get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.SignInSettings update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PortalSigninSettingsInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.SignInSettings createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PortalSigninSettingsInner parameters, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the entity state (Etag) version of the SignInSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the SignInSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the SignInSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the SignInSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, SignInSettingsGetEntityTagHeadersInner.class); - } - - /** - * Get Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PortalSigninSettingsInner object if successful. - */ - public PortalSigninSettingsInner get(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Get Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Get Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSigninSettingsInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, PortalSigninSettingsInner>() { - @Override - public PortalSigninSettingsInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSigninSettingsInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, SignInSettingsGetHeadersInner.class); - } - - /** - * Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch).toBlocking().single().body(); - } - - /** - * Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch), serviceCallback); - } - - /** - * Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean enabled = null; - PortalSigninSettingsInner parameters = new PortalSigninSettingsInner(); - parameters.withEnabled(null); - return service.update(resourceGroupName, serviceName, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Redirect Anonymous users to the Sign-In page. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch, enabled).toBlocking().single().body(); - } - - /** - * Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Redirect Anonymous users to the Sign-In page. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch, enabled), serviceCallback); - } - - /** - * Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Redirect Anonymous users to the Sign-In page. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch, enabled).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Redirect Anonymous users to the Sign-In page. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - PortalSigninSettingsInner parameters = new PortalSigninSettingsInner(); - parameters.withEnabled(enabled); - return service.update(resourceGroupName, serviceName, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Create or Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PortalSigninSettingsInner object if successful. - */ - public PortalSigninSettingsInner createOrUpdate(String resourceGroupName, String serviceName) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Create or Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Create or Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSigninSettingsInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, PortalSigninSettingsInner>() { - @Override - public PortalSigninSettingsInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSigninSettingsInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean enabled = null; - PortalSigninSettingsInner parameters = new PortalSigninSettingsInner(); - parameters.withEnabled(null); - return service.createOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Create or Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param enabled Redirect Anonymous users to the Sign-In page. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PortalSigninSettingsInner object if successful. - */ - public PortalSigninSettingsInner createOrUpdate(String resourceGroupName, String serviceName, Boolean enabled) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, enabled).toBlocking().single().body(); - } - - /** - * Create or Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param enabled Redirect Anonymous users to the Sign-In page. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, Boolean enabled, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, enabled), serviceCallback); - } - - /** - * Create or Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param enabled Redirect Anonymous users to the Sign-In page. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSigninSettingsInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, Boolean enabled) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, enabled).map(new Func1, PortalSigninSettingsInner>() { - @Override - public PortalSigninSettingsInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or Update Sign-In settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param enabled Redirect Anonymous users to the Sign-In page. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSigninSettingsInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, Boolean enabled) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - PortalSigninSettingsInner parameters = new PortalSigninSettingsInner(); - parameters.withEnabled(enabled); - return service.createOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsGetEntityTagHeadersInner.java deleted file mode 100644 index ace47df39f8..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class SignUpSettingsGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the SignUpSettingsGetEntityTagHeadersInner object itself. - */ - public SignUpSettingsGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsGetHeadersInner.java deleted file mode 100644 index 52fae65619e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class SignUpSettingsGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the SignUpSettingsGetHeadersInner object itself. - */ - public SignUpSettingsGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsInner.java deleted file mode 100644 index 632cf69cb4e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SignUpSettingsInner.java +++ /dev/null @@ -1,444 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in SignUpSettings. - */ -public class SignUpSettingsInner { - /** The Retrofit service to perform REST calls. */ - private SignUpSettingsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of SignUpSettingsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public SignUpSettingsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(SignUpSettingsService.class); - this.client = client; - } - - /** - * The interface defining all the services for SignUpSettings to be - * used by Retrofit to perform actually REST calls. - */ - interface SignUpSettingsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.SignUpSettings getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.SignUpSettings get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.SignUpSettings update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body PortalSignupSettingsInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.SignUpSettings createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Body PortalSignupSettingsInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, SignUpSettingsGetEntityTagHeadersInner.class); - } - - /** - * Get Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PortalSignupSettingsInner object if successful. - */ - public PortalSignupSettingsInner get(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Get Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Get Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSignupSettingsInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, PortalSignupSettingsInner>() { - @Override - public PortalSignupSettingsInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSignupSettingsInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, SignUpSettingsGetHeadersInner.class); - } - - /** - * Update Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Update Sign-Up settings. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, PortalSignupSettingsInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Update Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Update Sign-Up settings. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, PortalSignupSettingsInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters, ifMatch), serviceCallback); - } - - /** - * Update Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Update Sign-Up settings. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, PortalSignupSettingsInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Update Sign-Up settings. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, PortalSignupSettingsInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Create or Update Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PortalSignupSettingsInner object if successful. - */ - public PortalSignupSettingsInner createOrUpdate(String resourceGroupName, String serviceName, PortalSignupSettingsInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * Create or Update Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, PortalSignupSettingsInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * Create or Update Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSignupSettingsInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, PortalSignupSettingsInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, PortalSignupSettingsInner>() { - @Override - public PortalSignupSettingsInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or Update Sign-Up settings. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PortalSignupSettingsInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, PortalSignupSettingsInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionContractInner.java deleted file mode 100644 index 3006087d50a..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionContractInner.java +++ /dev/null @@ -1,350 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.SubscriptionState; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Subscription details. - */ -@JsonFlatten -public class SubscriptionContractInner extends Resource { - /** - * The user resource identifier of the subscription owner. The value is a - * valid relative URL in the format of /users/{uid} where {uid} is a user - * identifier. - */ - @JsonProperty(value = "properties.userId", required = true) - private String userId; - - /** - * The product resource identifier of the subscribed product. The value is - * a valid relative URL in the format of /products/{productId} where - * {productId} is a product identifier. - */ - @JsonProperty(value = "properties.productId", required = true) - private String productId; - - /** - * The name of the subscription, or null if the subscription has no name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Subscription state. Possible states are * active – the subscription is - * active, * suspended – the subscription is blocked, and the subscriber - * cannot call any APIs of the product, * submitted – the subscription - * request has been made by the developer, but has not yet been approved or - * rejected, * rejected – the subscription request has been denied by an - * administrator, * cancelled – the subscription has been cancelled by the - * developer or administrator, * expired – the subscription reached its - * expiration date and was deactivated. Possible values include: - * 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled'. - */ - @JsonProperty(value = "properties.state", required = true) - private SubscriptionState state; - - /** - * Subscription creation date. The date conforms to the following format: - * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * Subscription activation date. The setting is for audit purposes only and - * the subscription is not automatically activated. The subscription - * lifecycle can be managed by using the `state` property. The date - * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by - * the ISO 8601 standard. - */ - @JsonProperty(value = "properties.startDate") - private DateTime startDate; - - /** - * Subscription expiration date. The setting is for audit purposes only and - * the subscription is not automatically expired. The subscription - * lifecycle can be managed by using the `state` property. The date - * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by - * the ISO 8601 standard. - */ - @JsonProperty(value = "properties.expirationDate") - private DateTime expirationDate; - - /** - * Date when subscription was cancelled or expired. The setting is for - * audit purposes only and the subscription is not automatically cancelled. - * The subscription lifecycle can be managed by using the `state` property. - * The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as - * specified by the ISO 8601 standard. - */ - @JsonProperty(value = "properties.endDate") - private DateTime endDate; - - /** - * Upcoming subscription expiration notification date. The date conforms to - * the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO - * 8601 standard. - */ - @JsonProperty(value = "properties.notificationDate") - private DateTime notificationDate; - - /** - * Subscription primary key. - */ - @JsonProperty(value = "properties.primaryKey", required = true) - private String primaryKey; - - /** - * Subscription secondary key. - */ - @JsonProperty(value = "properties.secondaryKey", required = true) - private String secondaryKey; - - /** - * Optional subscription comment added by an administrator. - */ - @JsonProperty(value = "properties.stateComment") - private String stateComment; - - /** - * Get the userId value. - * - * @return the userId value - */ - public String userId() { - return this.userId; - } - - /** - * Set the userId value. - * - * @param userId the userId value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withUserId(String userId) { - this.userId = userId; - return this; - } - - /** - * Get the productId value. - * - * @return the productId value - */ - public String productId() { - return this.productId; - } - - /** - * Set the productId value. - * - * @param productId the productId value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withProductId(String productId) { - this.productId = productId; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public SubscriptionState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withState(SubscriptionState state) { - this.state = state; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the startDate value. - * - * @return the startDate value - */ - public DateTime startDate() { - return this.startDate; - } - - /** - * Set the startDate value. - * - * @param startDate the startDate value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withStartDate(DateTime startDate) { - this.startDate = startDate; - return this; - } - - /** - * Get the expirationDate value. - * - * @return the expirationDate value - */ - public DateTime expirationDate() { - return this.expirationDate; - } - - /** - * Set the expirationDate value. - * - * @param expirationDate the expirationDate value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withExpirationDate(DateTime expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - /** - * Get the endDate value. - * - * @return the endDate value - */ - public DateTime endDate() { - return this.endDate; - } - - /** - * Set the endDate value. - * - * @param endDate the endDate value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withEndDate(DateTime endDate) { - this.endDate = endDate; - return this; - } - - /** - * Get the notificationDate value. - * - * @return the notificationDate value - */ - public DateTime notificationDate() { - return this.notificationDate; - } - - /** - * Set the notificationDate value. - * - * @param notificationDate the notificationDate value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withNotificationDate(DateTime notificationDate) { - this.notificationDate = notificationDate; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Get the stateComment value. - * - * @return the stateComment value - */ - public String stateComment() { - return this.stateComment; - } - - /** - * Set the stateComment value. - * - * @param stateComment the stateComment value to set - * @return the SubscriptionContractInner object itself. - */ - public SubscriptionContractInner withStateComment(String stateComment) { - this.stateComment = stateComment; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionCreateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionCreateParametersInner.java deleted file mode 100644 index 7bf889b2b6c..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionCreateParametersInner.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.SubscriptionState; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Subscription create details. - */ -@JsonFlatten -public class SubscriptionCreateParametersInner { - /** - * User (user id path) for whom subscription is being created in form - * /users/{uid}. - */ - @JsonProperty(value = "properties.userId", required = true) - private String userId; - - /** - * Product (product id path) for which subscription is being created in - * form /products/{productid}. - */ - @JsonProperty(value = "properties.productId", required = true) - private String productId; - - /** - * Subscription name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * Primary subscription key. If not specified during request key will be - * generated automatically. - */ - @JsonProperty(value = "properties.primaryKey") - private String primaryKey; - - /** - * Secondary subscription key. If not specified during request key will be - * generated automatically. - */ - @JsonProperty(value = "properties.secondaryKey") - private String secondaryKey; - - /** - * Initial subscription state. If no value is specified, subscription is - * created with Submitted state. Possible states are * active – the - * subscription is active, * suspended – the subscription is blocked, and - * the subscriber cannot call any APIs of the product, * submitted – the - * subscription request has been made by the developer, but has not yet - * been approved or rejected, * rejected – the subscription request has - * been denied by an administrator, * cancelled – the subscription has been - * cancelled by the developer or administrator, * expired – the - * subscription reached its expiration date and was deactivated. Possible - * values include: 'suspended', 'active', 'expired', 'submitted', - * 'rejected', 'cancelled'. - */ - @JsonProperty(value = "properties.state") - private SubscriptionState state; - - /** - * Get the userId value. - * - * @return the userId value - */ - public String userId() { - return this.userId; - } - - /** - * Set the userId value. - * - * @param userId the userId value to set - * @return the SubscriptionCreateParametersInner object itself. - */ - public SubscriptionCreateParametersInner withUserId(String userId) { - this.userId = userId; - return this; - } - - /** - * Get the productId value. - * - * @return the productId value - */ - public String productId() { - return this.productId; - } - - /** - * Set the productId value. - * - * @param productId the productId value to set - * @return the SubscriptionCreateParametersInner object itself. - */ - public SubscriptionCreateParametersInner withProductId(String productId) { - this.productId = productId; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the SubscriptionCreateParametersInner object itself. - */ - public SubscriptionCreateParametersInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the SubscriptionCreateParametersInner object itself. - */ - public SubscriptionCreateParametersInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the SubscriptionCreateParametersInner object itself. - */ - public SubscriptionCreateParametersInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public SubscriptionState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the SubscriptionCreateParametersInner object itself. - */ - public SubscriptionCreateParametersInner withState(SubscriptionState state) { - this.state = state; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionGetEntityTagHeadersInner.java deleted file mode 100644 index f0d44deecea..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class SubscriptionGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the SubscriptionGetEntityTagHeadersInner object itself. - */ - public SubscriptionGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionGetHeadersInner.java deleted file mode 100644 index 2e08a0943e2..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class SubscriptionGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the SubscriptionGetHeadersInner object itself. - */ - public SubscriptionGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionUpdateParametersInner.java deleted file mode 100644 index 0b2a80ff95d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionUpdateParametersInner.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.apimanagement.SubscriptionState; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Subscription update details. - */ -@JsonFlatten -public class SubscriptionUpdateParametersInner { - /** - * User identifier path: /users/{uid}. - */ - @JsonProperty(value = "properties.userId") - private String userId; - - /** - * Product identifier path: /products/{productId}. - */ - @JsonProperty(value = "properties.productId") - private String productId; - - /** - * Subscription expiration date. The setting is for audit purposes only and - * the subscription is not automatically expired. The subscription - * lifecycle can be managed by using the `state` property. The date - * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by - * the ISO 8601 standard. - */ - @JsonProperty(value = "properties.expirationDate") - private DateTime expirationDate; - - /** - * Subscription name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Primary subscription key. - */ - @JsonProperty(value = "properties.primaryKey") - private String primaryKey; - - /** - * Secondary subscription key. - */ - @JsonProperty(value = "properties.secondaryKey") - private String secondaryKey; - - /** - * Subscription state. Possible states are * active – the subscription is - * active, * suspended – the subscription is blocked, and the subscriber - * cannot call any APIs of the product, * submitted – the subscription - * request has been made by the developer, but has not yet been approved or - * rejected, * rejected – the subscription request has been denied by an - * administrator, * cancelled – the subscription has been cancelled by the - * developer or administrator, * expired – the subscription reached its - * expiration date and was deactivated. Possible values include: - * 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled'. - */ - @JsonProperty(value = "properties.state") - private SubscriptionState state; - - /** - * Comments describing subscription state change by the administrator. - */ - @JsonProperty(value = "properties.stateComment") - private String stateComment; - - /** - * Get the userId value. - * - * @return the userId value - */ - public String userId() { - return this.userId; - } - - /** - * Set the userId value. - * - * @param userId the userId value to set - * @return the SubscriptionUpdateParametersInner object itself. - */ - public SubscriptionUpdateParametersInner withUserId(String userId) { - this.userId = userId; - return this; - } - - /** - * Get the productId value. - * - * @return the productId value - */ - public String productId() { - return this.productId; - } - - /** - * Set the productId value. - * - * @param productId the productId value to set - * @return the SubscriptionUpdateParametersInner object itself. - */ - public SubscriptionUpdateParametersInner withProductId(String productId) { - this.productId = productId; - return this; - } - - /** - * Get the expirationDate value. - * - * @return the expirationDate value - */ - public DateTime expirationDate() { - return this.expirationDate; - } - - /** - * Set the expirationDate value. - * - * @param expirationDate the expirationDate value to set - * @return the SubscriptionUpdateParametersInner object itself. - */ - public SubscriptionUpdateParametersInner withExpirationDate(DateTime expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the SubscriptionUpdateParametersInner object itself. - */ - public SubscriptionUpdateParametersInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the SubscriptionUpdateParametersInner object itself. - */ - public SubscriptionUpdateParametersInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the SubscriptionUpdateParametersInner object itself. - */ - public SubscriptionUpdateParametersInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public SubscriptionState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the SubscriptionUpdateParametersInner object itself. - */ - public SubscriptionUpdateParametersInner withState(SubscriptionState state) { - this.state = state; - return this; - } - - /** - * Get the stateComment value. - * - * @return the stateComment value - */ - public String stateComment() { - return this.stateComment; - } - - /** - * Set the stateComment value. - * - * @param stateComment the stateComment value to set - * @return the SubscriptionUpdateParametersInner object itself. - */ - public SubscriptionUpdateParametersInner withStateComment(String stateComment) { - this.stateComment = stateComment; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionsInner.java deleted file mode 100644 index 954bae63c86..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/SubscriptionsInner.java +++ /dev/null @@ -1,1412 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Subscriptions. - */ -public class SubscriptionsInner { - /** The Retrofit service to perform REST calls. */ - private SubscriptionsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of SubscriptionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public SubscriptionsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(SubscriptionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Subscriptions to be - * used by Retrofit to perform actually REST calls. - */ - interface SubscriptionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("sid") String sid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("sid") String sid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("sid") String sid, @Path("subscriptionId") String subscriptionId, @Body SubscriptionCreateParametersInner parameters, @Query("notify") Boolean notify, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("sid") String sid, @Path("subscriptionId") String subscriptionId, @Body SubscriptionUpdateParametersInner parameters, @Query("notify") Boolean notify, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("sid") String sid, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions regeneratePrimaryKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey") - Observable> regeneratePrimaryKey(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("sid") String sid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions regenerateSecondaryKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey") - Observable> regenerateSecondaryKey(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("sid") String sid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Subscriptions listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName) { - return listWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.list(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String sid) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, sid).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String sid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, sid), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String sid) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, sid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, sid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, SubscriptionGetEntityTagHeadersInner.class); - } - - /** - * Gets the specified Subscription entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SubscriptionContractInner object if successful. - */ - public SubscriptionContractInner get(String resourceGroupName, String serviceName, String sid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, sid).toBlocking().single().body(); - } - - /** - * Gets the specified Subscription entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String sid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, sid), serviceCallback); - } - - /** - * Gets the specified Subscription entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SubscriptionContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String sid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, sid).map(new Func1, SubscriptionContractInner>() { - @Override - public SubscriptionContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the specified Subscription entity. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SubscriptionContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, sid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, SubscriptionGetHeadersInner.class); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SubscriptionContractInner object if successful. - */ - public SubscriptionContractInner createOrUpdate(String resourceGroupName, String serviceName, String sid, SubscriptionCreateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String sid, SubscriptionCreateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters), serviceCallback); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SubscriptionContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String sid, SubscriptionCreateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters).map(new Func1, SubscriptionContractInner>() { - @Override - public SubscriptionContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SubscriptionContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid, SubscriptionCreateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final Boolean notify = null; - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, sid, this.client.subscriptionId(), parameters, notify, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Create parameters. - * @param notify Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SubscriptionContractInner object if successful. - */ - public SubscriptionContractInner createOrUpdate(String resourceGroupName, String serviceName, String sid, SubscriptionCreateParametersInner parameters, Boolean notify, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, notify, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Create parameters. - * @param notify Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String sid, SubscriptionCreateParametersInner parameters, Boolean notify, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, notify, ifMatch), serviceCallback); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Create parameters. - * @param notify Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SubscriptionContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String sid, SubscriptionCreateParametersInner parameters, Boolean notify, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, notify, ifMatch).map(new Func1, SubscriptionContractInner>() { - @Override - public SubscriptionContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Create parameters. - * @param notify Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SubscriptionContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid, SubscriptionCreateParametersInner parameters, Boolean notify, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, sid, this.client.subscriptionId(), parameters, notify, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of a subscription specificied by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String sid, SubscriptionUpdateParametersInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the details of a subscription specificied by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String sid, SubscriptionUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the details of a subscription specificied by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String sid, SubscriptionUpdateParametersInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of a subscription specificied by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid, SubscriptionUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final Boolean notify = null; - return service.update(resourceGroupName, serviceName, sid, this.client.subscriptionId(), parameters, notify, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates the details of a subscription specificied by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param notify Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String sid, SubscriptionUpdateParametersInner parameters, String ifMatch, Boolean notify) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, ifMatch, notify).toBlocking().single().body(); - } - - /** - * Updates the details of a subscription specificied by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param notify Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String sid, SubscriptionUpdateParametersInner parameters, String ifMatch, Boolean notify, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, ifMatch, notify), serviceCallback); - } - - /** - * Updates the details of a subscription specificied by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param notify Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String sid, SubscriptionUpdateParametersInner parameters, String ifMatch, Boolean notify) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, sid, parameters, ifMatch, notify).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of a subscription specificied by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param notify Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid, SubscriptionUpdateParametersInner parameters, String ifMatch, Boolean notify) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, sid, this.client.subscriptionId(), parameters, notify, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes the specified subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String sid, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, sid, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes the specified subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String sid, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, sid, ifMatch), serviceCallback); - } - - /** - * Deletes the specified subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String sid, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, sid, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified subscription. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, sid, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void regeneratePrimaryKey(String resourceGroupName, String serviceName, String sid) { - regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName, sid).toBlocking().single().body(); - } - - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regeneratePrimaryKeyAsync(String resourceGroupName, String serviceName, String sid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName, sid), serviceCallback); - } - - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable regeneratePrimaryKeyAsync(String resourceGroupName, String serviceName, String sid) { - return regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName, sid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> regeneratePrimaryKeyWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.regeneratePrimaryKey(resourceGroupName, serviceName, sid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regeneratePrimaryKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regeneratePrimaryKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void regenerateSecondaryKey(String resourceGroupName, String serviceName, String sid) { - regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName, sid).toBlocking().single().body(); - } - - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateSecondaryKeyAsync(String resourceGroupName, String serviceName, String sid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName, sid), serviceCallback); - } - - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable regenerateSecondaryKeyAsync(String resourceGroupName, String serviceName, String sid) { - return regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName, sid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> regenerateSecondaryKeyWithServiceResponseAsync(String resourceGroupName, String serviceName, String sid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (sid == null) { - throw new IllegalArgumentException("Parameter sid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.regenerateSecondaryKey(resourceGroupName, serviceName, sid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateSecondaryKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateSecondaryKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all subscriptions of the API Management service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagContractInner.java deleted file mode 100644 index 23d0eca692d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagContractInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Tag Contract details. - */ -@JsonFlatten -public class TagContractInner extends Resource { - /** - * Tag name. - */ - @JsonProperty(value = "properties.displayName", required = true) - private String displayName; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the TagContractInner object itself. - */ - public TagContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionContractInner.java deleted file mode 100644 index 67720e90b09..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionContractInner.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Contract details. - */ -@JsonFlatten -public class TagDescriptionContractInner extends Resource { - /** - * Description of the Tag. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Absolute URL of external resources describing the tag. - */ - @JsonProperty(value = "properties.externalDocsUrl") - private String externalDocsUrl; - - /** - * Description of the external resources describing the tag. - */ - @JsonProperty(value = "properties.externalDocsDescription") - private String externalDocsDescription; - - /** - * Tag name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the TagDescriptionContractInner object itself. - */ - public TagDescriptionContractInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the externalDocsUrl value. - * - * @return the externalDocsUrl value - */ - public String externalDocsUrl() { - return this.externalDocsUrl; - } - - /** - * Set the externalDocsUrl value. - * - * @param externalDocsUrl the externalDocsUrl value to set - * @return the TagDescriptionContractInner object itself. - */ - public TagDescriptionContractInner withExternalDocsUrl(String externalDocsUrl) { - this.externalDocsUrl = externalDocsUrl; - return this; - } - - /** - * Get the externalDocsDescription value. - * - * @return the externalDocsDescription value - */ - public String externalDocsDescription() { - return this.externalDocsDescription; - } - - /** - * Set the externalDocsDescription value. - * - * @param externalDocsDescription the externalDocsDescription value to set - * @return the TagDescriptionContractInner object itself. - */ - public TagDescriptionContractInner withExternalDocsDescription(String externalDocsDescription) { - this.externalDocsDescription = externalDocsDescription; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the TagDescriptionContractInner object itself. - */ - public TagDescriptionContractInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionCreateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionCreateParametersInner.java deleted file mode 100644 index 0dfffa92440..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionCreateParametersInner.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters supplied to the Create TagDescription operation. - */ -@JsonFlatten -public class TagDescriptionCreateParametersInner { - /** - * Description of the Tag. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Absolute URL of external resources describing the tag. - */ - @JsonProperty(value = "properties.externalDocsUrl") - private String externalDocsUrl; - - /** - * Description of the external resources describing the tag. - */ - @JsonProperty(value = "properties.externalDocsDescription") - private String externalDocsDescription; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the TagDescriptionCreateParametersInner object itself. - */ - public TagDescriptionCreateParametersInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the externalDocsUrl value. - * - * @return the externalDocsUrl value - */ - public String externalDocsUrl() { - return this.externalDocsUrl; - } - - /** - * Set the externalDocsUrl value. - * - * @param externalDocsUrl the externalDocsUrl value to set - * @return the TagDescriptionCreateParametersInner object itself. - */ - public TagDescriptionCreateParametersInner withExternalDocsUrl(String externalDocsUrl) { - this.externalDocsUrl = externalDocsUrl; - return this; - } - - /** - * Get the externalDocsDescription value. - * - * @return the externalDocsDescription value - */ - public String externalDocsDescription() { - return this.externalDocsDescription; - } - - /** - * Set the externalDocsDescription value. - * - * @param externalDocsDescription the externalDocsDescription value to set - * @return the TagDescriptionCreateParametersInner object itself. - */ - public TagDescriptionCreateParametersInner withExternalDocsDescription(String externalDocsDescription) { - this.externalDocsDescription = externalDocsDescription; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionGetEntityStateHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionGetEntityStateHeadersInner.java deleted file mode 100644 index 94e66caff10..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionGetEntityStateHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityState operation. - */ -public class TagDescriptionGetEntityStateHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagDescriptionGetEntityStateHeadersInner object itself. - */ - public TagDescriptionGetEntityStateHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionGetHeadersInner.java deleted file mode 100644 index 855f096148b..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class TagDescriptionGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagDescriptionGetHeadersInner object itself. - */ - public TagDescriptionGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionsInner.java deleted file mode 100644 index 9e8906929b9..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagDescriptionsInner.java +++ /dev/null @@ -1,1012 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in TagDescriptions. - */ -public class TagDescriptionsInner { - /** The Retrofit service to perform REST calls. */ - private TagDescriptionsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of TagDescriptionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public TagDescriptionsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(TagDescriptionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for TagDescriptions to be - * used by Retrofit to perform actually REST calls. - */ - interface TagDescriptionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TagDescriptions listByApi" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions") - Observable> listByApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TagDescriptions getEntityState" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}") - Observable> getEntityState(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TagDescriptions get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TagDescriptions createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Body TagDescriptionCreateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TagDescriptions delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TagDescriptions listByApiNext" }) - @GET - Observable> listByApiNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagDescriptionContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponse> response = listByApiSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagDescriptionContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagDescriptionContractInner> object - */ - public Observable>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagDescriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByApi(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagDescriptionContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagDescriptionContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagDescriptionContractInner> object - */ - public Observable>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagDescriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByApi(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityState(String resourceGroupName, String serviceName, String apiId, String tagId) { - getEntityStateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).toBlocking().single().body(); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityStateAsync(String resourceGroupName, String serviceName, String apiId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityStateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId), serviceCallback); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityStateAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - return getEntityStateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityStateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityState(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityStateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityStateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, TagDescriptionGetEntityStateHeadersInner.class); - } - - /** - * Get tag associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagDescriptionContractInner object if successful. - */ - public TagDescriptionContractInner get(String resourceGroupName, String serviceName, String apiId, String tagId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).toBlocking().single().body(); - } - - /** - * Get tag associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String apiId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId), serviceCallback); - } - - /** - * Get tag associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagDescriptionContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).map(new Func1, TagDescriptionContractInner>() { - @Override - public TagDescriptionContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get tag associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagDescriptionContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, TagDescriptionGetHeadersInner.class); - } - - /** - * Create/Update tag fescription in scope of the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagDescriptionContractInner object if successful. - */ - public TagDescriptionContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String tagId, TagDescriptionCreateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, parameters).toBlocking().single().body(); - } - - /** - * Create/Update tag fescription in scope of the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String tagId, TagDescriptionCreateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, parameters), serviceCallback); - } - - /** - * Create/Update tag fescription in scope of the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagDescriptionContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String tagId, TagDescriptionCreateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, parameters).map(new Func1, TagDescriptionContractInner>() { - @Override - public TagDescriptionContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create/Update tag fescription in scope of the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagDescriptionContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId, TagDescriptionCreateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Create/Update tag fescription in scope of the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagDescriptionContractInner object if successful. - */ - public TagDescriptionContractInner createOrUpdate(String resourceGroupName, String serviceName, String apiId, String tagId, TagDescriptionCreateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Create/Update tag fescription in scope of the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String tagId, TagDescriptionCreateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, parameters, ifMatch), serviceCallback); - } - - /** - * Create/Update tag fescription in scope of the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagDescriptionContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String apiId, String tagId, TagDescriptionCreateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, parameters, ifMatch).map(new Func1, TagDescriptionContractInner>() { - @Override - public TagDescriptionContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create/Update tag fescription in scope of the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagDescriptionContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId, TagDescriptionCreateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Delete tag description for the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch).toBlocking().single().body(); - } - - /** - * Delete tag description for the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch), serviceCallback); - } - - /** - * Delete tag description for the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete tag description for the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagDescriptionContractInner> object if successful. - */ - public PagedList listByApiNext(final String nextPageLink) { - ServiceResponse> response = listByApiNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagDescriptionContractInner> object - */ - public Observable> listByApiNextAsync(final String nextPageLink) { - return listByApiNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagDescriptionContractInner> object - */ - public Observable>> listByApiNextWithServiceResponseAsync(final String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagDescriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByApiNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApiNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByApiHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByApiHeadersInner.java deleted file mode 100644 index 48ca58d370f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByApiHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetByApi operation. - */ -public class TagGetByApiHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagGetByApiHeadersInner object itself. - */ - public TagGetByApiHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByOperationHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByOperationHeadersInner.java deleted file mode 100644 index beda6dabdc8..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByOperationHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetByOperation operation. - */ -public class TagGetByOperationHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagGetByOperationHeadersInner object itself. - */ - public TagGetByOperationHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByProductHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByProductHeadersInner.java deleted file mode 100644 index 95c027e86c5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetByProductHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetByProduct operation. - */ -public class TagGetByProductHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagGetByProductHeadersInner object itself. - */ - public TagGetByProductHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByApiHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByApiHeadersInner.java deleted file mode 100644 index 7dfdd21cfad..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByApiHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityStateByApi operation. - */ -public class TagGetEntityStateByApiHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagGetEntityStateByApiHeadersInner object itself. - */ - public TagGetEntityStateByApiHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByOperationHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByOperationHeadersInner.java deleted file mode 100644 index 62393f46d9f..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByOperationHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityStateByOperation operation. - */ -public class TagGetEntityStateByOperationHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagGetEntityStateByOperationHeadersInner object itself. - */ - public TagGetEntityStateByOperationHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByProductHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByProductHeadersInner.java deleted file mode 100644 index bf8eeb65bc5..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateByProductHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityStateByProduct operation. - */ -public class TagGetEntityStateByProductHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagGetEntityStateByProductHeadersInner object itself. - */ - public TagGetEntityStateByProductHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateHeadersInner.java deleted file mode 100644 index 236dfe20fea..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetEntityStateHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityState operation. - */ -public class TagGetEntityStateHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagGetEntityStateHeadersInner object itself. - */ - public TagGetEntityStateHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetHeadersInner.java deleted file mode 100644 index e05a13eaa97..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class TagGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TagGetHeadersInner object itself. - */ - public TagGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagResourceContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagResourceContractInner.java deleted file mode 100644 index 1baddd18196..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagResourceContractInner.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.TagTagResourceContractProperties; -import com.microsoft.azure.management.apimanagement.ApiTagResourceContractProperties; -import com.microsoft.azure.management.apimanagement.OperationTagResourceContractProperties; -import com.microsoft.azure.management.apimanagement.ProductTagResourceContractProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * TagResource contract properties. - */ -public class TagResourceContractInner { - /** - * Tag associated with the resource. - */ - @JsonProperty(value = "tag", required = true) - private TagTagResourceContractProperties tag; - - /** - * Api associated with the tag. - */ - @JsonProperty(value = "api") - private ApiTagResourceContractProperties api; - - /** - * Operation associated with the tag. - */ - @JsonProperty(value = "operation") - private OperationTagResourceContractProperties operation; - - /** - * Product associated with the tag. - */ - @JsonProperty(value = "product") - private ProductTagResourceContractProperties product; - - /** - * Get the tag value. - * - * @return the tag value - */ - public TagTagResourceContractProperties tag() { - return this.tag; - } - - /** - * Set the tag value. - * - * @param tag the tag value to set - * @return the TagResourceContractInner object itself. - */ - public TagResourceContractInner withTag(TagTagResourceContractProperties tag) { - this.tag = tag; - return this; - } - - /** - * Get the api value. - * - * @return the api value - */ - public ApiTagResourceContractProperties api() { - return this.api; - } - - /** - * Set the api value. - * - * @param api the api value to set - * @return the TagResourceContractInner object itself. - */ - public TagResourceContractInner withApi(ApiTagResourceContractProperties api) { - this.api = api; - return this; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public OperationTagResourceContractProperties operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the TagResourceContractInner object itself. - */ - public TagResourceContractInner withOperation(OperationTagResourceContractProperties operation) { - this.operation = operation; - return this; - } - - /** - * Get the product value. - * - * @return the product value - */ - public ProductTagResourceContractProperties product() { - return this.product; - } - - /** - * Set the product value. - * - * @param product the product value to set - * @return the TagResourceContractInner object itself. - */ - public TagResourceContractInner withProduct(ProductTagResourceContractProperties product) { - this.product = product; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagResourcesInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagResourcesInner.java deleted file mode 100644 index 20f4e94c185..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagResourcesInner.java +++ /dev/null @@ -1,507 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in TagResources. - */ -public class TagResourcesInner { - /** The Retrofit service to perform REST calls. */ - private TagResourcesService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of TagResourcesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public TagResourcesInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(TagResourcesService.class); - this.client = client; - } - - /** - * The interface defining all the services for TagResources to be - * used by Retrofit to perform actually REST calls. - */ - interface TagResourcesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TagResources listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TagResources listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of resources associated with tags. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagResourceContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of resources associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of resources associated with tags. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagResourceContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of resources associated with tags. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagResourceContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagsInner.java deleted file mode 100644 index 9e702fc594e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TagsInner.java +++ /dev/null @@ -1,3827 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.management.apimanagement.TagCreateUpdateParameters; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Tags. - */ -public class TagsInner { - /** The Retrofit service to perform REST calls. */ - private TagsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of TagsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public TagsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(TagsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Tags to be - * used by Retrofit to perform actually REST calls. - */ - interface TagsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags getEntityState" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") - Observable> getEntityState(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagCreateUpdateParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagCreateUpdateParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags listByApi" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags") - Observable> listByApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags getEntityStateByApi" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") - Observable> getEntityStateByApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags getByApi" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") - Observable> getByApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags assignToApi" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") - Observable> assignToApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags detachFromApi" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", method = "DELETE", hasBody = true) - Observable> detachFromApi(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags listByOperation" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags") - Observable> listByOperation(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags getEntityStateByOperation" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}") - Observable> getEntityStateByOperation(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags getByOperation" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}") - Observable> getByOperation(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags assignToOperation" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}") - Observable> assignToOperation(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags detachFromOperation" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", method = "DELETE", hasBody = true) - Observable> detachFromOperation(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("apiId") String apiId, @Path("operationId") String operationId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags listByProduct" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags") - Observable> listByProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags getEntityStateByProduct" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") - Observable> getEntityStateByProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags getByProduct" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") - Observable> getByProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags assignToProduct" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") - Observable> assignToProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags detachFromProduct" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", method = "DELETE", hasBody = true) - Observable> detachFromProduct(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("productId") String productId, @Path("tagId") String tagId, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags listByApiNext" }) - @GET - Observable> listByApiNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags listByOperationNext" }) - @GET - Observable> listByOperationNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Tags listByProductNext" }) - @GET - Observable> listByProductNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of tags defined within a service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityState(String resourceGroupName, String serviceName, String tagId) { - getEntityStateWithServiceResponseAsync(resourceGroupName, serviceName, tagId).toBlocking().single().body(); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityStateAsync(String resourceGroupName, String serviceName, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityStateWithServiceResponseAsync(resourceGroupName, serviceName, tagId), serviceCallback); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityStateAsync(String resourceGroupName, String serviceName, String tagId) { - return getEntityStateWithServiceResponseAsync(resourceGroupName, serviceName, tagId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityStateWithServiceResponseAsync(String resourceGroupName, String serviceName, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityState(resourceGroupName, serviceName, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityStateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityStateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, TagGetEntityStateHeadersInner.class); - } - - /** - * Gets the details of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner get(String resourceGroupName, String serviceName, String tagId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, tagId).toBlocking().single().body(); - } - - /** - * Gets the details of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, tagId), serviceCallback); - } - - /** - * Gets the details of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String tagId) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, tagId).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, TagGetHeadersInner.class); - } - - /** - * Creates a tag. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param displayName Tag name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner createOrUpdate(String resourceGroupName, String serviceName, String tagId, String displayName) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, tagId, displayName).toBlocking().single().body(); - } - - /** - * Creates a tag. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param displayName Tag name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String tagId, String displayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, tagId, displayName), serviceCallback); - } - - /** - * Creates a tag. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param displayName Tag name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String tagId, String displayName) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, tagId, displayName).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a tag. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param displayName Tag name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String tagId, String displayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (displayName == null) { - throw new IllegalArgumentException("Parameter displayName is required and cannot be null."); - } - TagCreateUpdateParameters parameters = new TagCreateUpdateParameters(); - parameters.withDisplayName(displayName); - return service.createOrUpdate(resourceGroupName, serviceName, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param displayName Tag name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String tagId, String ifMatch, String displayName) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, tagId, ifMatch, displayName).toBlocking().single().body(); - } - - /** - * Updates the details of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param displayName Tag name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String tagId, String ifMatch, String displayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, tagId, ifMatch, displayName), serviceCallback); - } - - /** - * Updates the details of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param displayName Tag name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String tagId, String ifMatch, String displayName) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, tagId, ifMatch, displayName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param displayName Tag name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String tagId, String ifMatch, String displayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (displayName == null) { - throw new IllegalArgumentException("Parameter displayName is required and cannot be null."); - } - TagCreateUpdateParameters parameters = new TagCreateUpdateParameters(); - parameters.withDisplayName(displayName); - return service.update(resourceGroupName, serviceName, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes specific tag of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String tagId, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, tagId, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes specific tag of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String tagId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, tagId, ifMatch), serviceCallback); - } - - /** - * Deletes specific tag of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String tagId, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, tagId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific tag of the API Management service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String tagId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String apiId) { - ServiceResponse> response = listByApiSinglePageAsync(resourceGroupName, serviceName, apiId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, apiId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, apiId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByApi(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByApi(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByApiAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByApiWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - return listByApiSinglePageAsync(resourceGroupName, serviceName, apiId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the API. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByApi(resourceGroupName, serviceName, apiId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityStateByApi(String resourceGroupName, String serviceName, String apiId, String tagId) { - getEntityStateByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).toBlocking().single().body(); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityStateByApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityStateByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId), serviceCallback); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityStateByApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - return getEntityStateByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityStateByApiWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityStateByApi(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityStateByApiDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityStateByApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, TagGetEntityStateByApiHeadersInner.class); - } - - /** - * Get tag associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner getByApi(String resourceGroupName, String serviceName, String apiId, String tagId) { - return getByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).toBlocking().single().body(); - } - - /** - * Get tag associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId), serviceCallback); - } - - /** - * Get tag associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable getByApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - return getByApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get tag associated with the API. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> getByApiWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByApi(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getByApiDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getByApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, TagGetByApiHeadersInner.class); - } - - /** - * Assign tag to the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner assignToApi(String resourceGroupName, String serviceName, String apiId, String tagId) { - return assignToApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).toBlocking().single().body(); - } - - /** - * Assign tag to the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture assignToApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(assignToApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId), serviceCallback); - } - - /** - * Assign tag to the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable assignToApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - return assignToApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Assign tag to the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> assignToApiWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String ifMatch = null; - return service.assignToApi(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = assignToApiDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Assign tag to the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner assignToApi(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - return assignToApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch).toBlocking().single().body(); - } - - /** - * Assign tag to the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture assignToApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(assignToApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch), serviceCallback); - } - - /** - * Assign tag to the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable assignToApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - return assignToApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Assign tag to the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> assignToApiWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.assignToApi(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = assignToApiDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse assignToApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Detach the tag from the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void detachFromApi(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - detachFromApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch).toBlocking().single().body(); - } - - /** - * Detach the tag from the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture detachFromApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(detachFromApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch), serviceCallback); - } - - /** - * Detach the tag from the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable detachFromApiAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - return detachFromApiWithServiceResponseAsync(resourceGroupName, serviceName, apiId, tagId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach the tag from the Api. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> detachFromApiWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String tagId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.detachFromApi(resourceGroupName, serviceName, apiId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = detachFromApiDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse detachFromApiDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByOperation(final String resourceGroupName, final String serviceName, final String apiId, final String operationId) { - ServiceResponse> response = listByOperationSinglePageAsync(resourceGroupName, serviceName, apiId, operationId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByOperationAsync(final String resourceGroupName, final String serviceName, final String apiId, final String operationId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByOperationSinglePageAsync(resourceGroupName, serviceName, apiId, operationId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByOperationAsync(final String resourceGroupName, final String serviceName, final String apiId, final String operationId) { - return listByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByOperationWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String operationId) { - return listByOperationSinglePageAsync(resourceGroupName, serviceName, apiId, operationId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByOperationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByOperationSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByOperation(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByOperationDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByOperation(final String resourceGroupName, final String serviceName, final String apiId, final String operationId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByOperationSinglePageAsync(resourceGroupName, serviceName, apiId, operationId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByOperationAsync(final String resourceGroupName, final String serviceName, final String apiId, final String operationId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByOperationSinglePageAsync(resourceGroupName, serviceName, apiId, operationId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByOperationAsync(final String resourceGroupName, final String serviceName, final String apiId, final String operationId, final String filter, final Integer top, final Integer skip) { - return listByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByOperationWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String apiId, final String operationId, final String filter, final Integer top, final Integer skip) { - return listByOperationSinglePageAsync(resourceGroupName, serviceName, apiId, operationId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByOperationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the Operation. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - ServiceResponse> * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByOperationSinglePageAsync(final String resourceGroupName, final String serviceName, final String apiId, final String operationId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByOperation(resourceGroupName, serviceName, apiId, operationId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByOperationDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByOperationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityStateByOperation(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - getEntityStateByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId).toBlocking().single().body(); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityStateByOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityStateByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId), serviceCallback); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityStateByOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - return getEntityStateByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityStateByOperationWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityStateByOperation(resourceGroupName, serviceName, apiId, operationId, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityStateByOperationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityStateByOperationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, TagGetEntityStateByOperationHeadersInner.class); - } - - /** - * Get tag associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner getByOperation(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - return getByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId).toBlocking().single().body(); - } - - /** - * Get tag associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId), serviceCallback); - } - - /** - * Get tag associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable getByOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - return getByOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get tag associated with the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> getByOperationWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByOperation(resourceGroupName, serviceName, apiId, operationId, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getByOperationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getByOperationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, TagGetByOperationHeadersInner.class); - } - - /** - * Assign tag to the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner assignToOperation(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - return assignToOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId).toBlocking().single().body(); - } - - /** - * Assign tag to the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture assignToOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(assignToOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId), serviceCallback); - } - - /** - * Assign tag to the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable assignToOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - return assignToOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Assign tag to the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> assignToOperationWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String ifMatch = null; - return service.assignToOperation(resourceGroupName, serviceName, apiId, operationId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = assignToOperationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Assign tag to the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner assignToOperation(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, String ifMatch) { - return assignToOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId, ifMatch).toBlocking().single().body(); - } - - /** - * Assign tag to the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture assignToOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(assignToOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId, ifMatch), serviceCallback); - } - - /** - * Assign tag to the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable assignToOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, String ifMatch) { - return assignToOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId, ifMatch).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Assign tag to the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> assignToOperationWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.assignToOperation(resourceGroupName, serviceName, apiId, operationId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = assignToOperationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse assignToOperationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Detach the tag from the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void detachFromOperation(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, String ifMatch) { - detachFromOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId, ifMatch).toBlocking().single().body(); - } - - /** - * Detach the tag from the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture detachFromOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(detachFromOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId, ifMatch), serviceCallback); - } - - /** - * Detach the tag from the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable detachFromOperationAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, String ifMatch) { - return detachFromOperationWithServiceResponseAsync(resourceGroupName, serviceName, apiId, operationId, tagId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach the tag from the Operation. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> detachFromOperationWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String tagId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (apiId == null) { - throw new IllegalArgumentException("Parameter apiId is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.detachFromOperation(resourceGroupName, serviceName, apiId, operationId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = detachFromOperationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse detachFromOperationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByProduct(final String resourceGroupName, final String serviceName, final String productId) { - ServiceResponse> response = listByProductSinglePageAsync(resourceGroupName, serviceName, productId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductSinglePageAsync(resourceGroupName, serviceName, productId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByProductWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String productId) { - return listByProductSinglePageAsync(resourceGroupName, serviceName, productId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductSinglePageAsync(final String resourceGroupName, final String serviceName, final String productId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByProduct(resourceGroupName, serviceName, productId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByProduct(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByProductAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - return listByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByProductWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - return listByProductSinglePageAsync(resourceGroupName, serviceName, productId, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the Product. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param productId Product identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductSinglePageAsync(final String resourceGroupName, final String serviceName, final String productId, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByProduct(resourceGroupName, serviceName, productId, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByProductDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityStateByProduct(String resourceGroupName, String serviceName, String productId, String tagId) { - getEntityStateByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId).toBlocking().single().body(); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityStateByProductAsync(String resourceGroupName, String serviceName, String productId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityStateByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId), serviceCallback); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityStateByProductAsync(String resourceGroupName, String serviceName, String productId, String tagId) { - return getEntityStateByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityStateByProductWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityStateByProduct(resourceGroupName, serviceName, productId, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityStateByProductDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityStateByProductDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, TagGetEntityStateByProductHeadersInner.class); - } - - /** - * Get tag associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner getByProduct(String resourceGroupName, String serviceName, String productId, String tagId) { - return getByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId).toBlocking().single().body(); - } - - /** - * Get tag associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByProductAsync(String resourceGroupName, String serviceName, String productId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId), serviceCallback); - } - - /** - * Get tag associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable getByProductAsync(String resourceGroupName, String serviceName, String productId, String tagId) { - return getByProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get tag associated with the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> getByProductWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByProduct(resourceGroupName, serviceName, productId, tagId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getByProductDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getByProductDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, TagGetByProductHeadersInner.class); - } - - /** - * Assign tag to the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner assignToProduct(String resourceGroupName, String serviceName, String productId, String tagId) { - return assignToProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId).toBlocking().single().body(); - } - - /** - * Assign tag to the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture assignToProductAsync(String resourceGroupName, String serviceName, String productId, String tagId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(assignToProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId), serviceCallback); - } - - /** - * Assign tag to the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable assignToProductAsync(String resourceGroupName, String serviceName, String productId, String tagId) { - return assignToProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Assign tag to the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> assignToProductWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String tagId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String ifMatch = null; - return service.assignToProduct(resourceGroupName, serviceName, productId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = assignToProductDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Assign tag to the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TagContractInner object if successful. - */ - public TagContractInner assignToProduct(String resourceGroupName, String serviceName, String productId, String tagId, String ifMatch) { - return assignToProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId, ifMatch).toBlocking().single().body(); - } - - /** - * Assign tag to the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture assignToProductAsync(String resourceGroupName, String serviceName, String productId, String tagId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(assignToProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId, ifMatch), serviceCallback); - } - - /** - * Assign tag to the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable assignToProductAsync(String resourceGroupName, String serviceName, String productId, String tagId, String ifMatch) { - return assignToProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId, ifMatch).map(new Func1, TagContractInner>() { - @Override - public TagContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Assign tag to the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TagContractInner object - */ - public Observable> assignToProductWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String tagId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.assignToProduct(resourceGroupName, serviceName, productId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = assignToProductDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse assignToProductDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Detach the tag from the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void detachFromProduct(String resourceGroupName, String serviceName, String productId, String tagId, String ifMatch) { - detachFromProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId, ifMatch).toBlocking().single().body(); - } - - /** - * Detach the tag from the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture detachFromProductAsync(String resourceGroupName, String serviceName, String productId, String tagId, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(detachFromProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId, ifMatch), serviceCallback); - } - - /** - * Detach the tag from the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable detachFromProductAsync(String resourceGroupName, String serviceName, String productId, String tagId, String ifMatch) { - return detachFromProductWithServiceResponseAsync(resourceGroupName, serviceName, productId, tagId, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach the tag from the Product. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> detachFromProductWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String tagId, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (productId == null) { - throw new IllegalArgumentException("Parameter productId is required and cannot be null."); - } - if (tagId == null) { - throw new IllegalArgumentException("Parameter tagId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.detachFromProduct(resourceGroupName, serviceName, productId, tagId, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = detachFromProductDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse detachFromProductDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of tags defined within a service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of tags defined within a service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all Tags associated with the API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByApiNext(final String nextPageLink) { - ServiceResponse> response = listByApiNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByApiNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByApiNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByApiNextAsync(final String nextPageLink) { - return listByApiNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the API. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByApiNextWithServiceResponseAsync(final String nextPageLink) { - return listByApiNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByApiNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the API. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByApiNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByApiNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByApiNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByApiNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByOperationNext(final String nextPageLink) { - ServiceResponse> response = listByOperationNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the Operation. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByOperationNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByOperationNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByOperationNextAsync(final String nextPageLink) { - return listByOperationNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the Operation. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByOperationNextWithServiceResponseAsync(final String nextPageLink) { - return listByOperationNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByOperationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the Operation. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByOperationNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByOperationNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByOperationNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByOperationNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all Tags associated with the Product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<TagContractInner> object if successful. - */ - public PagedList listByProductNext(final String nextPageLink) { - ServiceResponse> response = listByProductNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Tags associated with the Product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByProductNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByProductNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Tags associated with the Product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable> listByProductNextAsync(final String nextPageLink) { - return listByProductNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Tags associated with the Product. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<TagContractInner> object - */ - public Observable>> listByProductNextWithServiceResponseAsync(final String nextPageLink) { - return listByProductNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByProductNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Tags associated with the Product. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<TagContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByProductNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByProductNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByProductNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByProductNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGetHeadersInner.java deleted file mode 100644 index 3a4e1531825..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class TenantAccessGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TenantAccessGetHeadersInner object itself. - */ - public TenantAccessGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGitGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGitGetHeadersInner.java deleted file mode 100644 index 190b3f03454..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGitGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class TenantAccessGitGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TenantAccessGitGetHeadersInner object itself. - */ - public TenantAccessGitGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGitsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGitsInner.java deleted file mode 100644 index f306ba4ab14..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessGitsInner.java +++ /dev/null @@ -1,329 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in TenantAccessGits. - */ -public class TenantAccessGitsInner { - /** The Retrofit service to perform REST calls. */ - private TenantAccessGitsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of TenantAccessGitsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public TenantAccessGitsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(TenantAccessGitsService.class); - this.client = client; - } - - /** - * The interface defining all the services for TenantAccessGits to be - * used by Retrofit to perform actually REST calls. - */ - interface TenantAccessGitsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantAccessGits get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("accessName") String accessName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantAccessGits regeneratePrimaryKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey") - Observable> regeneratePrimaryKey(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("accessName") String accessName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantAccessGits regenerateSecondaryKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey") - Observable> regenerateSecondaryKey(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("accessName") String accessName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the Git access configuration for the tenant. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AccessInformationContractInner object if successful. - */ - public AccessInformationContractInner get(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets the Git access configuration for the tenant. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets the Git access configuration for the tenant. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessInformationContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, AccessInformationContractInner>() { - @Override - public AccessInformationContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the Git access configuration for the tenant. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessInformationContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String accessName = "access"; - return service.get(resourceGroupName, serviceName, this.client.subscriptionId(), accessName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, TenantAccessGitGetHeadersInner.class); - } - - /** - * Regenerate primary access key for GIT. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void regeneratePrimaryKey(String resourceGroupName, String serviceName) { - regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Regenerate primary access key for GIT. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regeneratePrimaryKeyAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Regenerate primary access key for GIT. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable regeneratePrimaryKeyAsync(String resourceGroupName, String serviceName) { - return regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerate primary access key for GIT. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> regeneratePrimaryKeyWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String accessName = "access"; - return service.regeneratePrimaryKey(resourceGroupName, serviceName, this.client.subscriptionId(), accessName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regeneratePrimaryKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regeneratePrimaryKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Regenerate secondary access key for GIT. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void regenerateSecondaryKey(String resourceGroupName, String serviceName) { - regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Regenerate secondary access key for GIT. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateSecondaryKeyAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Regenerate secondary access key for GIT. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable regenerateSecondaryKeyAsync(String resourceGroupName, String serviceName) { - return regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerate secondary access key for GIT. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> regenerateSecondaryKeyWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String accessName = "access"; - return service.regenerateSecondaryKey(resourceGroupName, serviceName, this.client.subscriptionId(), accessName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateSecondaryKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateSecondaryKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessInner.java deleted file mode 100644 index 1ec4774f5e0..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantAccessInner.java +++ /dev/null @@ -1,525 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.apimanagement.AccessInformationUpdateParameters; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in TenantAccess. - */ -public class TenantAccessInner { - /** The Retrofit service to perform REST calls. */ - private TenantAccessService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of TenantAccessInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public TenantAccessInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(TenantAccessService.class); - this.client = client; - } - - /** - * The interface defining all the services for TenantAccess to be - * used by Retrofit to perform actually REST calls. - */ - interface TenantAccessService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantAccess get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("accessName") String accessName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantAccess update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("accessName") String accessName, @Path("subscriptionId") String subscriptionId, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AccessInformationUpdateParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantAccess regeneratePrimaryKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey") - Observable> regeneratePrimaryKey(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("accessName") String accessName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantAccess regenerateSecondaryKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey") - Observable> regenerateSecondaryKey(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("accessName") String accessName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AccessInformationContractInner object if successful. - */ - public AccessInformationContractInner get(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Get tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Get tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessInformationContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName) { - return getWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, AccessInformationContractInner>() { - @Override - public AccessInformationContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Get tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessInformationContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String accessName = "access"; - return service.get(resourceGroupName, serviceName, this.client.subscriptionId(), accessName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, TenantAccessGetHeadersInner.class); - } - - /** - * Update tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch).toBlocking().single().body(); - } - - /** - * Update tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch), serviceCallback); - } - - /** - * Update tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String accessName = "access"; - final Boolean enabled = null; - AccessInformationUpdateParameters parameters = new AccessInformationUpdateParameters(); - parameters.withEnabled(null); - return service.update(resourceGroupName, serviceName, accessName, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Update tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Tenant access information of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch, enabled).toBlocking().single().body(); - } - - /** - * Update tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Tenant access information of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch, enabled), serviceCallback); - } - - /** - * Update tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Tenant access information of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch, enabled).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update tenant access information details. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param enabled Tenant access information of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String accessName = "access"; - AccessInformationUpdateParameters parameters = new AccessInformationUpdateParameters(); - parameters.withEnabled(enabled); - return service.update(resourceGroupName, serviceName, accessName, this.client.subscriptionId(), ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Regenerate primary access key. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void regeneratePrimaryKey(String resourceGroupName, String serviceName) { - regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Regenerate primary access key. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regeneratePrimaryKeyAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Regenerate primary access key. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable regeneratePrimaryKeyAsync(String resourceGroupName, String serviceName) { - return regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerate primary access key. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> regeneratePrimaryKeyWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String accessName = "access"; - return service.regeneratePrimaryKey(resourceGroupName, serviceName, this.client.subscriptionId(), accessName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regeneratePrimaryKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regeneratePrimaryKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Regenerate secondary access key. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void regenerateSecondaryKey(String resourceGroupName, String serviceName) { - regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Regenerate secondary access key. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateSecondaryKeyAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Regenerate secondary access key. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable regenerateSecondaryKeyAsync(String resourceGroupName, String serviceName) { - return regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerate secondary access key. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> regenerateSecondaryKeyWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String accessName = "access"; - return service.regenerateSecondaryKey(resourceGroupName, serviceName, this.client.subscriptionId(), accessName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateSecondaryKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateSecondaryKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantConfigurationSyncStateContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantConfigurationSyncStateContractInner.java deleted file mode 100644 index 7602404985e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantConfigurationSyncStateContractInner.java +++ /dev/null @@ -1,206 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Tenant Configuration Synchronization State. - */ -public class TenantConfigurationSyncStateContractInner { - /** - * The name of Git branch. - */ - @JsonProperty(value = "branch") - private String branch; - - /** - * The latest commit Id. - */ - @JsonProperty(value = "commitId") - private String commitId; - - /** - * value indicating if last sync was save (true) or deploy (false) - * operation. - */ - @JsonProperty(value = "isExport") - private Boolean isExport; - - /** - * value indicating if last synchronization was later than the - * configuration change. - */ - @JsonProperty(value = "isSynced") - private Boolean isSynced; - - /** - * value indicating whether Git configuration access is enabled. - */ - @JsonProperty(value = "isGitEnabled") - private Boolean isGitEnabled; - - /** - * The date of the latest synchronization. The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "syncDate") - private DateTime syncDate; - - /** - * The date of the latest configuration change. The date conforms to the - * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - * standard. - */ - @JsonProperty(value = "configurationChangeDate") - private DateTime configurationChangeDate; - - /** - * Get the branch value. - * - * @return the branch value - */ - public String branch() { - return this.branch; - } - - /** - * Set the branch value. - * - * @param branch the branch value to set - * @return the TenantConfigurationSyncStateContractInner object itself. - */ - public TenantConfigurationSyncStateContractInner withBranch(String branch) { - this.branch = branch; - return this; - } - - /** - * Get the commitId value. - * - * @return the commitId value - */ - public String commitId() { - return this.commitId; - } - - /** - * Set the commitId value. - * - * @param commitId the commitId value to set - * @return the TenantConfigurationSyncStateContractInner object itself. - */ - public TenantConfigurationSyncStateContractInner withCommitId(String commitId) { - this.commitId = commitId; - return this; - } - - /** - * Get the isExport value. - * - * @return the isExport value - */ - public Boolean isExport() { - return this.isExport; - } - - /** - * Set the isExport value. - * - * @param isExport the isExport value to set - * @return the TenantConfigurationSyncStateContractInner object itself. - */ - public TenantConfigurationSyncStateContractInner withIsExport(Boolean isExport) { - this.isExport = isExport; - return this; - } - - /** - * Get the isSynced value. - * - * @return the isSynced value - */ - public Boolean isSynced() { - return this.isSynced; - } - - /** - * Set the isSynced value. - * - * @param isSynced the isSynced value to set - * @return the TenantConfigurationSyncStateContractInner object itself. - */ - public TenantConfigurationSyncStateContractInner withIsSynced(Boolean isSynced) { - this.isSynced = isSynced; - return this; - } - - /** - * Get the isGitEnabled value. - * - * @return the isGitEnabled value - */ - public Boolean isGitEnabled() { - return this.isGitEnabled; - } - - /** - * Set the isGitEnabled value. - * - * @param isGitEnabled the isGitEnabled value to set - * @return the TenantConfigurationSyncStateContractInner object itself. - */ - public TenantConfigurationSyncStateContractInner withIsGitEnabled(Boolean isGitEnabled) { - this.isGitEnabled = isGitEnabled; - return this; - } - - /** - * Get the syncDate value. - * - * @return the syncDate value - */ - public DateTime syncDate() { - return this.syncDate; - } - - /** - * Set the syncDate value. - * - * @param syncDate the syncDate value to set - * @return the TenantConfigurationSyncStateContractInner object itself. - */ - public TenantConfigurationSyncStateContractInner withSyncDate(DateTime syncDate) { - this.syncDate = syncDate; - return this; - } - - /** - * Get the configurationChangeDate value. - * - * @return the configurationChangeDate value - */ - public DateTime configurationChangeDate() { - return this.configurationChangeDate; - } - - /** - * Set the configurationChangeDate value. - * - * @param configurationChangeDate the configurationChangeDate value to set - * @return the TenantConfigurationSyncStateContractInner object itself. - */ - public TenantConfigurationSyncStateContractInner withConfigurationChangeDate(DateTime configurationChangeDate) { - this.configurationChangeDate = configurationChangeDate; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantConfigurationsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantConfigurationsInner.java deleted file mode 100644 index 292f6ce0fca..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/TenantConfigurationsInner.java +++ /dev/null @@ -1,697 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in TenantConfigurations. - */ -public class TenantConfigurationsInner { - /** The Retrofit service to perform REST calls. */ - private TenantConfigurationsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of TenantConfigurationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public TenantConfigurationsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(TenantConfigurationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for TenantConfigurations to be - * used by Retrofit to perform actually REST calls. - */ - interface TenantConfigurationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantConfigurations deploy" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy") - Observable> deploy(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("configurationName") String configurationName, @Body DeployConfigurationParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantConfigurations beginDeploy" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy") - Observable> beginDeploy(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("configurationName") String configurationName, @Body DeployConfigurationParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantConfigurations save" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save") - Observable> save(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("configurationName") String configurationName, @Body SaveConfigurationParameterInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantConfigurations beginSave" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save") - Observable> beginSave(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("configurationName") String configurationName, @Body SaveConfigurationParameterInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantConfigurations validate" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate") - Observable> validate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("configurationName") String configurationName, @Body DeployConfigurationParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantConfigurations beginValidate" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate") - Observable> beginValidate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("configurationName") String configurationName, @Body DeployConfigurationParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.TenantConfigurations getSyncState" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") - Observable> getSyncState(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Path("configurationName") String configurationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Deploy Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationResultContractInner object if successful. - */ - public OperationResultContractInner deploy(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - return deployWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Deploy Configuration parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deployAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deployWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Deploy Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deployAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - return deployWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, OperationResultContractInner>() { - @Override - public OperationResultContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Deploy Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deployWithServiceResponseAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String configurationName = "configuration"; - Observable> observable = service.deploy(resourceGroupName, serviceName, this.client.subscriptionId(), configurationName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Deploy Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationResultContractInner object if successful. - */ - public OperationResultContractInner beginDeploy(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - return beginDeployWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Deploy Configuration parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeployAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeployWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Deploy Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationResultContractInner object - */ - public Observable beginDeployAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - return beginDeployWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, OperationResultContractInner>() { - @Override - public OperationResultContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Deploy Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationResultContractInner object - */ - public Observable> beginDeployWithServiceResponseAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String configurationName = "configuration"; - return service.beginDeploy(resourceGroupName, serviceName, this.client.subscriptionId(), configurationName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeployDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeployDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Save Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationResultContractInner object if successful. - */ - public OperationResultContractInner save(String resourceGroupName, String serviceName, SaveConfigurationParameterInner parameters) { - return saveWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Save Configuration parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture saveAsync(String resourceGroupName, String serviceName, SaveConfigurationParameterInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(saveWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Save Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable saveAsync(String resourceGroupName, String serviceName, SaveConfigurationParameterInner parameters) { - return saveWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, OperationResultContractInner>() { - @Override - public OperationResultContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Save Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> saveWithServiceResponseAsync(String resourceGroupName, String serviceName, SaveConfigurationParameterInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String configurationName = "configuration"; - Observable> observable = service.save(resourceGroupName, serviceName, this.client.subscriptionId(), configurationName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Save Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationResultContractInner object if successful. - */ - public OperationResultContractInner beginSave(String resourceGroupName, String serviceName, SaveConfigurationParameterInner parameters) { - return beginSaveWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Save Configuration parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginSaveAsync(String resourceGroupName, String serviceName, SaveConfigurationParameterInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginSaveWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Save Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationResultContractInner object - */ - public Observable beginSaveAsync(String resourceGroupName, String serviceName, SaveConfigurationParameterInner parameters) { - return beginSaveWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, OperationResultContractInner>() { - @Override - public OperationResultContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Save Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationResultContractInner object - */ - public Observable> beginSaveWithServiceResponseAsync(String resourceGroupName, String serviceName, SaveConfigurationParameterInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String configurationName = "configuration"; - return service.beginSave(resourceGroupName, serviceName, this.client.subscriptionId(), configurationName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginSaveDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginSaveDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Validate Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationResultContractInner object if successful. - */ - public OperationResultContractInner validate(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - return validateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Validate Configuration parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture validateAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(validateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Validate Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable validateAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - return validateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, OperationResultContractInner>() { - @Override - public OperationResultContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Validate Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> validateWithServiceResponseAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String configurationName = "configuration"; - Observable> observable = service.validate(resourceGroupName, serviceName, this.client.subscriptionId(), configurationName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Validate Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationResultContractInner object if successful. - */ - public OperationResultContractInner beginValidate(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - return beginValidateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().body(); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Validate Configuration parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginValidateAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginValidateWithServiceResponseAsync(resourceGroupName, serviceName, parameters), serviceCallback); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Validate Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationResultContractInner object - */ - public Observable beginValidateAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - return beginValidateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).map(new Func1, OperationResultContractInner>() { - @Override - public OperationResultContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param parameters Validate Configuration parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationResultContractInner object - */ - public Observable> beginValidateWithServiceResponseAsync(String resourceGroupName, String serviceName, DeployConfigurationParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String configurationName = "configuration"; - return service.beginValidate(resourceGroupName, serviceName, this.client.subscriptionId(), configurationName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginValidateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginValidateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the status of the most recent synchronization between the configuration database and the Git repository. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TenantConfigurationSyncStateContractInner object if successful. - */ - public TenantConfigurationSyncStateContractInner getSyncState(String resourceGroupName, String serviceName) { - return getSyncStateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body(); - } - - /** - * Gets the status of the most recent synchronization between the configuration database and the Git repository. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getSyncStateAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getSyncStateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback); - } - - /** - * Gets the status of the most recent synchronization between the configuration database and the Git repository. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TenantConfigurationSyncStateContractInner object - */ - public Observable getSyncStateAsync(String resourceGroupName, String serviceName) { - return getSyncStateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, TenantConfigurationSyncStateContractInner>() { - @Override - public TenantConfigurationSyncStateContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the status of the most recent synchronization between the configuration database and the Git repository. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TenantConfigurationSyncStateContractInner object - */ - public Observable> getSyncStateWithServiceResponseAsync(String resourceGroupName, String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String configurationName = "configuration"; - return service.getSyncState(resourceGroupName, serviceName, this.client.subscriptionId(), configurationName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getSyncStateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getSyncStateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserContractInner.java deleted file mode 100644 index a0129a00996..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserContractInner.java +++ /dev/null @@ -1,214 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.UserState; -import java.util.List; -import org.joda.time.DateTime; -import com.microsoft.azure.management.apimanagement.GroupContractProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * User details. - */ -@JsonFlatten -public class UserContractInner extends Resource { - /** - * Account state. Specifies whether the user is active or not. Blocked - * users are unable to sign into the developer portal or call any APIs of - * subscribed products. Default state is Active. Possible values include: - * 'active', 'blocked', 'pending', 'deleted'. - */ - @JsonProperty(value = "properties.state") - private UserState state; - - /** - * Optional note about a user set by the administrator. - */ - @JsonProperty(value = "properties.note") - private String note; - - /** - * Collection of user identities. - */ - @JsonProperty(value = "properties.identities", access = JsonProperty.Access.WRITE_ONLY) - private List identities; - - /** - * First name. - */ - @JsonProperty(value = "properties.firstName") - private String firstName; - - /** - * Last name. - */ - @JsonProperty(value = "properties.lastName") - private String lastName; - - /** - * Email address. - */ - @JsonProperty(value = "properties.email") - private String email; - - /** - * Date of user registration. The date conforms to the following format: - * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "properties.registrationDate") - private DateTime registrationDate; - - /** - * Collection of groups user is part of. - */ - @JsonProperty(value = "properties.groups", access = JsonProperty.Access.WRITE_ONLY) - private List groups; - - /** - * Get the state value. - * - * @return the state value - */ - public UserState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the UserContractInner object itself. - */ - public UserContractInner withState(UserState state) { - this.state = state; - return this; - } - - /** - * Get the note value. - * - * @return the note value - */ - public String note() { - return this.note; - } - - /** - * Set the note value. - * - * @param note the note value to set - * @return the UserContractInner object itself. - */ - public UserContractInner withNote(String note) { - this.note = note; - return this; - } - - /** - * Get the identities value. - * - * @return the identities value - */ - public List identities() { - return this.identities; - } - - /** - * Get the firstName value. - * - * @return the firstName value - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName value. - * - * @param firstName the firstName value to set - * @return the UserContractInner object itself. - */ - public UserContractInner withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName value. - * - * @return the lastName value - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName value. - * - * @param lastName the lastName value to set - * @return the UserContractInner object itself. - */ - public UserContractInner withLastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get the email value. - * - * @return the email value - */ - public String email() { - return this.email; - } - - /** - * Set the email value. - * - * @param email the email value to set - * @return the UserContractInner object itself. - */ - public UserContractInner withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the registrationDate value. - * - * @return the registrationDate value - */ - public DateTime registrationDate() { - return this.registrationDate; - } - - /** - * Set the registrationDate value. - * - * @param registrationDate the registrationDate value to set - * @return the UserContractInner object itself. - */ - public UserContractInner withRegistrationDate(DateTime registrationDate) { - this.registrationDate = registrationDate; - return this; - } - - /** - * Get the groups value. - * - * @return the groups value - */ - public List groups() { - return this.groups; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserCreateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserCreateParametersInner.java deleted file mode 100644 index 08c8244b4a1..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserCreateParametersInner.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.UserState; -import java.util.List; -import com.microsoft.azure.management.apimanagement.Confirmation; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * User create details. - */ -@JsonFlatten -public class UserCreateParametersInner { - /** - * Account state. Specifies whether the user is active or not. Blocked - * users are unable to sign into the developer portal or call any APIs of - * subscribed products. Default state is Active. Possible values include: - * 'active', 'blocked', 'pending', 'deleted'. - */ - @JsonProperty(value = "properties.state") - private UserState state; - - /** - * Optional note about a user set by the administrator. - */ - @JsonProperty(value = "properties.note") - private String note; - - /** - * Collection of user identities. - */ - @JsonProperty(value = "properties.identities", access = JsonProperty.Access.WRITE_ONLY) - private List identities; - - /** - * Email address. Must not be empty and must be unique within the service - * instance. - */ - @JsonProperty(value = "properties.email", required = true) - private String email; - - /** - * First name. - */ - @JsonProperty(value = "properties.firstName", required = true) - private String firstName; - - /** - * Last name. - */ - @JsonProperty(value = "properties.lastName", required = true) - private String lastName; - - /** - * User Password. If no value is provided, a default password is generated. - */ - @JsonProperty(value = "properties.password") - private String password; - - /** - * Determines the type of confirmation e-mail that will be sent to the - * newly created user. Possible values include: 'signup', 'invite'. - */ - @JsonProperty(value = "properties.confirmation") - private Confirmation confirmation; - - /** - * Get the state value. - * - * @return the state value - */ - public UserState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the UserCreateParametersInner object itself. - */ - public UserCreateParametersInner withState(UserState state) { - this.state = state; - return this; - } - - /** - * Get the note value. - * - * @return the note value - */ - public String note() { - return this.note; - } - - /** - * Set the note value. - * - * @param note the note value to set - * @return the UserCreateParametersInner object itself. - */ - public UserCreateParametersInner withNote(String note) { - this.note = note; - return this; - } - - /** - * Get the identities value. - * - * @return the identities value - */ - public List identities() { - return this.identities; - } - - /** - * Get the email value. - * - * @return the email value - */ - public String email() { - return this.email; - } - - /** - * Set the email value. - * - * @param email the email value to set - * @return the UserCreateParametersInner object itself. - */ - public UserCreateParametersInner withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the firstName value. - * - * @return the firstName value - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName value. - * - * @param firstName the firstName value to set - * @return the UserCreateParametersInner object itself. - */ - public UserCreateParametersInner withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName value. - * - * @return the lastName value - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName value. - * - * @param lastName the lastName value to set - * @return the UserCreateParametersInner object itself. - */ - public UserCreateParametersInner withLastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the UserCreateParametersInner object itself. - */ - public UserCreateParametersInner withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the confirmation value. - * - * @return the confirmation value - */ - public Confirmation confirmation() { - return this.confirmation; - } - - /** - * Set the confirmation value. - * - * @param confirmation the confirmation value to set - * @return the UserCreateParametersInner object itself. - */ - public UserCreateParametersInner withConfirmation(Confirmation confirmation) { - this.confirmation = confirmation; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGetEntityTagHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGetEntityTagHeadersInner.java deleted file mode 100644 index d96123f3926..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGetEntityTagHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for GetEntityTag operation. - */ -public class UserGetEntityTagHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the UserGetEntityTagHeadersInner object itself. - */ - public UserGetEntityTagHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGetHeadersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGetHeadersInner.java deleted file mode 100644 index 74c8081a9c6..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGetHeadersInner.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class UserGetHeadersInner { - /** - * Current entity state version. Should be treated as opaque and used to - * make conditional HTTP requests. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the UserGetHeadersInner object itself. - */ - public UserGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGroupsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGroupsInner.java deleted file mode 100644 index ce2f21f1078..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserGroupsInner.java +++ /dev/null @@ -1,473 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in UserGroups. - */ -public class UserGroupsInner { - /** The Retrofit service to perform REST calls. */ - private UserGroupsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of UserGroupsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public UserGroupsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(UserGroupsService.class); - this.client = client; - } - - /** - * The interface defining all the services for UserGroups to be - * used by Retrofit to perform actually REST calls. - */ - interface UserGroupsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.UserGroups list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/groups") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.UserGroups listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String uid) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, uid).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String uid, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, uid), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String uid) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, uid) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String uid) { - return listSinglePageAsync(resourceGroupName, serviceName, uid) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.list(resourceGroupName, serviceName, uid, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, uid, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, uid, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, uid, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all user groups. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip) { - return listSinglePageAsync(resourceGroupName, serviceName, uid, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all user groups. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param uid User identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, serviceName, uid, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all user groups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GroupContractInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all user groups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all user groups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all user groups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GroupContractInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all user groups. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GroupContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserIdentitiesInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserIdentitiesInner.java deleted file mode 100644 index 264e6764bae..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserIdentitiesInner.java +++ /dev/null @@ -1,311 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in UserIdentities. - */ -public class UserIdentitiesInner { - /** The Retrofit service to perform REST calls. */ - private UserIdentitiesService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of UserIdentitiesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public UserIdentitiesInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(UserIdentitiesService.class); - this.client = client; - } - - /** - * The interface defining all the services for UserIdentities to be - * used by Retrofit to perform actually REST calls. - */ - interface UserIdentitiesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.UserIdentities list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/identities") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.UserIdentities listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all user identities. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserIdentityContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String uid) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, uid).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all user identities. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String uid, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, uid), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all user identities. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserIdentityContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String uid) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, uid) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all user identities. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserIdentityContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String uid) { - return listSinglePageAsync(resourceGroupName, serviceName, uid) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all user identities. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserIdentityContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, serviceName, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all user identities. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserIdentityContractInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all user identities. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all user identities. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserIdentityContractInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all user identities. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserIdentityContractInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all user identities. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserIdentityContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserIdentityContractInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserIdentityContractInner.java deleted file mode 100644 index fa849fc408d..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserIdentityContractInner.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * User identity details. - */ -public class UserIdentityContractInner { - /** - * Identity provider name. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * Identifier value within provider. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the UserIdentityContractInner object itself. - */ - public UserIdentityContractInner withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the UserIdentityContractInner object itself. - */ - public UserIdentityContractInner withId(String id) { - this.id = id; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserSubscriptionsInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserSubscriptionsInner.java deleted file mode 100644 index c0809833118..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserSubscriptionsInner.java +++ /dev/null @@ -1,488 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in UserSubscriptions. - */ -public class UserSubscriptionsInner { - /** The Retrofit service to perform REST calls. */ - private UserSubscriptionsService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of UserSubscriptionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public UserSubscriptionsInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(UserSubscriptionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for UserSubscriptions to be - * used by Retrofit to perform actually REST calls. - */ - interface UserSubscriptionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.UserSubscriptions list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/subscriptions") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.UserSubscriptions listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String uid) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, uid).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String uid, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, uid), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String uid) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, uid) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String uid) { - return listSinglePageAsync(resourceGroupName, serviceName, uid) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.list(resourceGroupName, serviceName, uid, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, serviceName, uid, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, serviceName, uid, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip) { - return listWithServiceResponseAsync(resourceGroupName, serviceName, uid, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip) { - return listSinglePageAsync(resourceGroupName, serviceName, uid, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param uid User identifier. Must be unique in the current API Management service instance. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String serviceName, final String uid, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, serviceName, uid, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SubscriptionContractInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SubscriptionContractInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the collection of subscriptions of the specified user. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SubscriptionContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserTokenParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserTokenParametersInner.java deleted file mode 100644 index 4d4fff53fca..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserTokenParametersInner.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.KeyType; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Get User Token operation. - */ -public class UserTokenParametersInner { - /** - * The Key to be used to generate token for user. Possible values include: - * 'primary', 'secondary'. - */ - @JsonProperty(value = "keyType", required = true) - private KeyType keyType; - - /** - * The Expiry time of the Token. Maximum token expiry time is set to 30 - * days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` - * as specified by the ISO 8601 standard. - */ - @JsonProperty(value = "expiry", required = true) - private DateTime expiry; - - /** - * Get the keyType value. - * - * @return the keyType value - */ - public KeyType keyType() { - return this.keyType; - } - - /** - * Set the keyType value. - * - * @param keyType the keyType value to set - * @return the UserTokenParametersInner object itself. - */ - public UserTokenParametersInner withKeyType(KeyType keyType) { - this.keyType = keyType; - return this; - } - - /** - * Get the expiry value. - * - * @return the expiry value - */ - public DateTime expiry() { - return this.expiry; - } - - /** - * Set the expiry value. - * - * @param expiry the expiry value to set - * @return the UserTokenParametersInner object itself. - */ - public UserTokenParametersInner withExpiry(DateTime expiry) { - this.expiry = expiry; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserTokenResultInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserTokenResultInner.java deleted file mode 100644 index cb4e2a73989..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserTokenResultInner.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Get User Token response details. - */ -public class UserTokenResultInner { - /** - * Shared Access Authorization token for the User. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the UserTokenResultInner object itself. - */ - public UserTokenResultInner withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserUpdateParametersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserUpdateParametersInner.java deleted file mode 100644 index 94a4f00b7ab..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UserUpdateParametersInner.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import com.microsoft.azure.management.apimanagement.UserState; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * User update parameters. - */ -@JsonFlatten -public class UserUpdateParametersInner { - /** - * Account state. Specifies whether the user is active or not. Blocked - * users are unable to sign into the developer portal or call any APIs of - * subscribed products. Default state is Active. Possible values include: - * 'active', 'blocked', 'pending', 'deleted'. - */ - @JsonProperty(value = "properties.state") - private UserState state; - - /** - * Optional note about a user set by the administrator. - */ - @JsonProperty(value = "properties.note") - private String note; - - /** - * Collection of user identities. - */ - @JsonProperty(value = "properties.identities", access = JsonProperty.Access.WRITE_ONLY) - private List identities; - - /** - * Email address. Must not be empty and must be unique within the service - * instance. - */ - @JsonProperty(value = "properties.email") - private String email; - - /** - * User Password. - */ - @JsonProperty(value = "properties.password") - private String password; - - /** - * First name. - */ - @JsonProperty(value = "properties.firstName") - private String firstName; - - /** - * Last name. - */ - @JsonProperty(value = "properties.lastName") - private String lastName; - - /** - * Get the state value. - * - * @return the state value - */ - public UserState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the UserUpdateParametersInner object itself. - */ - public UserUpdateParametersInner withState(UserState state) { - this.state = state; - return this; - } - - /** - * Get the note value. - * - * @return the note value - */ - public String note() { - return this.note; - } - - /** - * Set the note value. - * - * @param note the note value to set - * @return the UserUpdateParametersInner object itself. - */ - public UserUpdateParametersInner withNote(String note) { - this.note = note; - return this; - } - - /** - * Get the identities value. - * - * @return the identities value - */ - public List identities() { - return this.identities; - } - - /** - * Get the email value. - * - * @return the email value - */ - public String email() { - return this.email; - } - - /** - * Set the email value. - * - * @param email the email value to set - * @return the UserUpdateParametersInner object itself. - */ - public UserUpdateParametersInner withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the UserUpdateParametersInner object itself. - */ - public UserUpdateParametersInner withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the firstName value. - * - * @return the firstName value - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName value. - * - * @param firstName the firstName value to set - * @return the UserUpdateParametersInner object itself. - */ - public UserUpdateParametersInner withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName value. - * - * @return the lastName value - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName value. - * - * @param lastName the lastName value to set - * @return the UserUpdateParametersInner object itself. - */ - public UserUpdateParametersInner withLastName(String lastName) { - this.lastName = lastName; - return this; - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UsersInner.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UsersInner.java deleted file mode 100644 index f37972a486e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/UsersInner.java +++ /dev/null @@ -1,1403 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.apimanagement.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.apimanagement.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.HEAD; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Users. - */ -public class UsersInner { - /** The Retrofit service to perform REST calls. */ - private UsersService service; - /** The service client containing this operation class. */ - private ApiManagementClientImpl client; - - /** - * Initializes an instance of UsersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public UsersInner(Retrofit retrofit, ApiManagementClientImpl client) { - this.service = retrofit.create(UsersService.class); - this.client = client; - } - - /** - * The interface defining all the services for Users to be - * used by Retrofit to perform actually REST calls. - */ - interface UsersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users listByService" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users") - Observable> listByService(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users getEntityTag" }) - @HEAD("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}") - Observable> getEntityTag(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Body UserCreateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Body UserUpdateParametersInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("deleteSubscriptions") Boolean deleteSubscriptions, @Query("notify") Boolean notify, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users generateSsoUrl" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/generateSsoUrl") - Observable> generateSsoUrl(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users getSharedAccessToken" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/token") - Observable> getSharedAccessToken(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("uid") String uid, @Path("subscriptionId") String subscriptionId, @Body UserTokenParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.apimanagement.Users listByServiceNext" }) - @GET - Observable> listByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final Integer skip = null; - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserContractInner> object if successful. - */ - public PagedList listByService(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - ServiceResponse> response = listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable> listByServiceAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, filter, top, skip) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - * @param top Number of records to return. - * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable>> listByServiceWithServiceResponseAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - return listByServiceSinglePageAsync(resourceGroupName, serviceName, filter, top, skip) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param serviceName The name of the API Management service. - ServiceResponse> * @param filter | Field | Supported operators | Supported functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - | state | eq | N/A | - | registrationDate | ge, le, eq, ne, gt, lt | N/A | - | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - ServiceResponse> * @param top Number of records to return. - ServiceResponse> * @param skip Number of records to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceSinglePageAsync(final String resourceGroupName, final String serviceName, final String filter, final Integer top, final Integer skip) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByService(resourceGroupName, serviceName, this.client.subscriptionId(), filter, top, skip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void getEntityTag(String resourceGroupName, String serviceName, String uid) { - getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, uid).toBlocking().single().body(); - } - - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEntityTagAsync(String resourceGroupName, String serviceName, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, uid), serviceCallback); - } - - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable getEntityTagAsync(String resourceGroupName, String serviceName, String uid) { - return getEntityTagWithServiceResponseAsync(resourceGroupName, serviceName, uid).map(new Func1, Void>() { - @Override - public Void call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponseWithHeaders} object if successful. - */ - public Observable> getEntityTagWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEntityTag(resourceGroupName, serviceName, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getEntityTagDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getEntityTagDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildEmptyWithHeaders(response, UserGetEntityTagHeadersInner.class); - } - - /** - * Gets the details of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserContractInner object if successful. - */ - public UserContractInner get(String resourceGroupName, String serviceName, String uid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, uid).toBlocking().single().body(); - } - - /** - * Gets the details of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String serviceName, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, uid), serviceCallback); - } - - /** - * Gets the details of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserContractInner object - */ - public Observable getAsync(String resourceGroupName, String serviceName, String uid) { - return getWithServiceResponseAsync(resourceGroupName, serviceName, uid).map(new Func1, UserContractInner>() { - @Override - public UserContractInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets the details of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserContractInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, serviceName, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .buildWithHeaders(response, UserGetHeadersInner.class); - } - - /** - * Creates or Updates a user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserContractInner object if successful. - */ - public UserContractInner createOrUpdate(String resourceGroupName, String serviceName, String uid, UserCreateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates a user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String uid, UserCreateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters), serviceCallback); - } - - /** - * Creates or Updates a user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String uid, UserCreateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters).map(new Func1, UserContractInner>() { - @Override - public UserContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid, UserCreateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - final String ifMatch = null; - return service.createOrUpdate(resourceGroupName, serviceName, uid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates a user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserContractInner object if successful. - */ - public UserContractInner createOrUpdate(String resourceGroupName, String serviceName, String uid, UserCreateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Creates or Updates a user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String uid, UserCreateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters, ifMatch), serviceCallback); - } - - /** - * Creates or Updates a user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserContractInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String uid, UserCreateParametersInner parameters, String ifMatch) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters, ifMatch).map(new Func1, UserContractInner>() { - @Override - public UserContractInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserContractInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid, UserCreateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, serviceName, uid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Updates the details of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String serviceName, String uid, UserUpdateParametersInner parameters, String ifMatch) { - updateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters, ifMatch).toBlocking().single().body(); - } - - /** - * Updates the details of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String uid, UserUpdateParametersInner parameters, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters, ifMatch), serviceCallback); - } - - /** - * Updates the details of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String serviceName, String uid, UserUpdateParametersInner parameters, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the details of the user specified by its identifier. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Update parameters. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid, UserUpdateParametersInner parameters, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, serviceName, uid, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes specific user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String uid, String ifMatch) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, uid, ifMatch).toBlocking().single().body(); - } - - /** - * Deletes specific user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String uid, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, uid, ifMatch), serviceCallback); - } - - /** - * Deletes specific user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String uid, String ifMatch) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, uid, ifMatch).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid, String ifMatch) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean deleteSubscriptions = null; - final Boolean notify = null; - return service.delete(resourceGroupName, serviceName, uid, this.client.subscriptionId(), deleteSubscriptions, notify, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Deletes specific user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteSubscriptions Whether to delete user's subscription or not. - * @param notify Send an Account Closed Email notification to the User. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String serviceName, String uid, String ifMatch, Boolean deleteSubscriptions, Boolean notify) { - deleteWithServiceResponseAsync(resourceGroupName, serviceName, uid, ifMatch, deleteSubscriptions, notify).toBlocking().single().body(); - } - - /** - * Deletes specific user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteSubscriptions Whether to delete user's subscription or not. - * @param notify Send an Account Closed Email notification to the User. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String serviceName, String uid, String ifMatch, Boolean deleteSubscriptions, Boolean notify, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, uid, ifMatch, deleteSubscriptions, notify), serviceCallback); - } - - /** - * Deletes specific user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteSubscriptions Whether to delete user's subscription or not. - * @param notify Send an Account Closed Email notification to the User. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String serviceName, String uid, String ifMatch, Boolean deleteSubscriptions, Boolean notify) { - return deleteWithServiceResponseAsync(resourceGroupName, serviceName, uid, ifMatch, deleteSubscriptions, notify).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes specific user. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - * @param deleteSubscriptions Whether to delete user's subscription or not. - * @param notify Send an Account Closed Email notification to the User. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid, String ifMatch, Boolean deleteSubscriptions, Boolean notify) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (ifMatch == null) { - throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, serviceName, uid, this.client.subscriptionId(), deleteSubscriptions, notify, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the GenerateSsoUrlResultInner object if successful. - */ - public GenerateSsoUrlResultInner generateSsoUrl(String resourceGroupName, String serviceName, String uid) { - return generateSsoUrlWithServiceResponseAsync(resourceGroupName, serviceName, uid).toBlocking().single().body(); - } - - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture generateSsoUrlAsync(String resourceGroupName, String serviceName, String uid, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generateSsoUrlWithServiceResponseAsync(resourceGroupName, serviceName, uid), serviceCallback); - } - - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GenerateSsoUrlResultInner object - */ - public Observable generateSsoUrlAsync(String resourceGroupName, String serviceName, String uid) { - return generateSsoUrlWithServiceResponseAsync(resourceGroupName, serviceName, uid).map(new Func1, GenerateSsoUrlResultInner>() { - @Override - public GenerateSsoUrlResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GenerateSsoUrlResultInner object - */ - public Observable> generateSsoUrlWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.generateSsoUrl(resourceGroupName, serviceName, uid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = generateSsoUrlDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse generateSsoUrlDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the Shared Access Authorization Token for the User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserTokenResultInner object if successful. - */ - public UserTokenResultInner getSharedAccessToken(String resourceGroupName, String serviceName, String uid, UserTokenParametersInner parameters) { - return getSharedAccessTokenWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters).toBlocking().single().body(); - } - - /** - * Gets the Shared Access Authorization Token for the User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getSharedAccessTokenAsync(String resourceGroupName, String serviceName, String uid, UserTokenParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getSharedAccessTokenWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters), serviceCallback); - } - - /** - * Gets the Shared Access Authorization Token for the User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserTokenResultInner object - */ - public Observable getSharedAccessTokenAsync(String resourceGroupName, String serviceName, String uid, UserTokenParametersInner parameters) { - return getSharedAccessTokenWithServiceResponseAsync(resourceGroupName, serviceName, uid, parameters).map(new Func1, UserTokenResultInner>() { - @Override - public UserTokenResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the Shared Access Authorization Token for the User. - * - * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the API Management service. - * @param uid User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserTokenResultInner object - */ - public Observable> getSharedAccessTokenWithServiceResponseAsync(String resourceGroupName, String serviceName, String uid, UserTokenParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (serviceName == null) { - throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); - } - if (uid == null) { - throw new IllegalArgumentException("Parameter uid is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.getSharedAccessToken(resourceGroupName, serviceName, uid, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getSharedAccessTokenDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getSharedAccessTokenDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserContractInner> object if successful. - */ - public PagedList listByServiceNext(final String nextPageLink) { - ServiceResponse> response = listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByServiceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable> listByServiceNextAsync(final String nextPageLink) { - return listByServiceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserContractInner> object - */ - public Observable>> listByServiceNextWithServiceResponseAsync(final String nextPageLink) { - return listByServiceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByServiceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a collection of registered users in the specified service instance. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserContractInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByServiceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByServiceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/package-info.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/package-info.java deleted file mode 100644 index 3c59e77b95b..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for ApiManagementClient. - * ApiManagement Client. - */ -package com.microsoft.azure.management.apimanagement.implementation; diff --git a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/package-info.java b/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/package-info.java deleted file mode 100644 index 121b32e3b9e..00000000000 --- a/azure-mgmt-apimanagement/src/main/java/com/microsoft/azure/management/apimanagement/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for ApiManagementClient. - * ApiManagement Client. - */ -package com.microsoft.azure.management.apimanagement; diff --git a/azure-mgmt-billing/pom.xml b/azure-mgmt-billing/pom.xml deleted file mode 100644 index 74d0d6dde4c..00000000000 --- a/azure-mgmt-billing/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-billing - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for Billing Management - This package contains Microsoft Billing Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/DownloadUrl.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/DownloadUrl.java deleted file mode 100644 index 0c24df079b4..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/DownloadUrl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A secure URL that can be used to download a PDF invoice until the URL - * expires. - */ -public class DownloadUrl { - /** - * The time in UTC at which this download URL will expire. - */ - @JsonProperty(value = "expiryTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime expiryTime; - - /** - * The URL to the PDF file. - */ - @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) - private String url; - - /** - * Get the expiryTime value. - * - * @return the expiryTime value - */ - public DateTime expiryTime() { - return this.expiryTime; - } - - /** - * Get the url value. - * - * @return the url value - */ - public String url() { - return this.url; - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorDetails.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorDetails.java deleted file mode 100644 index b9fa26fcb8a..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorDetails.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The details of the error. - */ -public class ErrorDetails { - /** - * Error code. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * Error message indicating why the operation failed. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * The target of the particular error. - */ - @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) - private String target; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Get the target value. - * - * @return the target value - */ - public String target() { - return this.target; - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorResponse.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorResponse.java deleted file mode 100644 index 0e0f3d8b3ad..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Error response indicates that the service is not able to process the - * incoming request. The reason is provided in the error message. - */ -public class ErrorResponse { - /** - * The details of the error. - */ - @JsonProperty(value = "error") - private ErrorDetails error; - - /** - * Get the error value. - * - * @return the error value - */ - public ErrorDetails error() { - return this.error; - } - - /** - * Set the error value. - * - * @param error the error value to set - * @return the ErrorResponse object itself. - */ - public ErrorResponse withError(ErrorDetails error) { - this.error = error; - return this; - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorResponseException.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorResponseException.java deleted file mode 100644 index f77174d0c8f..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/ErrorResponseException.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with ErrorResponse information. - */ -public class ErrorResponseException extends RestException { - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorResponseException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { - super(message, response, body); - } - - @Override - public ErrorResponse body() { - return (ErrorResponse) super.body(); - } -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/OperationDisplay.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/OperationDisplay.java deleted file mode 100644 index 8446da5f638..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/OperationDisplay.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The object that represents the operation. - */ -public class OperationDisplay { - /** - * Service provider: Microsoft.Billing. - */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) - private String provider; - - /** - * Resource on which the operation is performed: Invoice, etc. - */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) - private String resource; - - /** - * Operation type: Read, write, delete, etc. - */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingManagementClientImpl.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingManagementClientImpl.java deleted file mode 100644 index 9e8c1e69dc0..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingManagementClientImpl.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the BillingManagementClientImpl class. - */ -public class BillingManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Version of the API to be used with the client request. The current version is 2017-04-24-preview. */ - private String apiVersion; - - /** - * Gets Version of the API to be used with the client request. The current version is 2017-04-24-preview. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Azure Subscription ID. */ - private String subscriptionId; - - /** - * Gets Azure Subscription ID. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Azure Subscription ID. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public BillingManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public BillingManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public BillingManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public BillingManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The BillingPeriodsInner object to access its operations. - */ - private BillingPeriodsInner billingPeriods; - - /** - * Gets the BillingPeriodsInner object to access its operations. - * @return the BillingPeriodsInner object. - */ - public BillingPeriodsInner billingPeriods() { - return this.billingPeriods; - } - - /** - * The InvoicesInner object to access its operations. - */ - private InvoicesInner invoices; - - /** - * Gets the InvoicesInner object to access its operations. - * @return the InvoicesInner object. - */ - public InvoicesInner invoices() { - return this.invoices; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * Initializes an instance of BillingManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public BillingManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of BillingManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public BillingManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of BillingManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public BillingManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2017-04-24-preview"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.billingPeriods = new BillingPeriodsInner(restClient().retrofit(), this); - this.invoices = new InvoicesInner(restClient().retrofit(), this); - this.operations = new OperationsInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "BillingManagementClient", "2017-04-24-preview"); - } -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingManager.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingManager.java deleted file mode 100644 index 1d5580567de..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure Billing resource management. - */ -@Beta(Beta.SinceVersion.V1_2_0) -public final class BillingManager extends Manager { - /** - * Get a Configurable instance that can be used to create BillingManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new BillingManager.ConfigurableImpl(); - } - /** - * Creates an instance of BillingManager that exposes Billing resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the BillingManager - */ - public static BillingManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new BillingManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of BillingManager that exposes Billing resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the BillingManager - */ - public static BillingManager authenticate(RestClient restClient, String subscriptionId) { - return new BillingManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of BillingManager that exposes Billing management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing Billing management API entry points that work across subscriptions - */ - BillingManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public BillingManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return BillingManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private BillingManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new BillingManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingPeriodInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingPeriodInner.java deleted file mode 100644 index 659ce3cd766..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingPeriodInner.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import org.joda.time.LocalDate; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A billing period resource. - */ -@JsonFlatten -public class BillingPeriodInner extends Resource { - /** - * The start of the date range covered by the billing period. - */ - @JsonProperty(value = "properties.billingPeriodStartDate", access = JsonProperty.Access.WRITE_ONLY) - private LocalDate billingPeriodStartDate; - - /** - * The end of the date range covered by the billing period. - */ - @JsonProperty(value = "properties.billingPeriodEndDate", access = JsonProperty.Access.WRITE_ONLY) - private LocalDate billingPeriodEndDate; - - /** - * Array of invoice ids that associated with. - */ - @JsonProperty(value = "properties.invoiceIds", access = JsonProperty.Access.WRITE_ONLY) - private List invoiceIds; - - /** - * Get the billingPeriodStartDate value. - * - * @return the billingPeriodStartDate value - */ - public LocalDate billingPeriodStartDate() { - return this.billingPeriodStartDate; - } - - /** - * Get the billingPeriodEndDate value. - * - * @return the billingPeriodEndDate value - */ - public LocalDate billingPeriodEndDate() { - return this.billingPeriodEndDate; - } - - /** - * Get the invoiceIds value. - * - * @return the invoiceIds value - */ - public List invoiceIds() { - return this.invoiceIds; - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingPeriodsInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingPeriodsInner.java deleted file mode 100644 index 47287a99ea0..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/BillingPeriodsInner.java +++ /dev/null @@ -1,489 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.billing.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in BillingPeriods. - */ -public class BillingPeriodsInner { - /** The Retrofit service to perform REST calls. */ - private BillingPeriodsService service; - /** The service client containing this operation class. */ - private BillingManagementClientImpl client; - - /** - * Initializes an instance of BillingPeriodsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public BillingPeriodsInner(Retrofit retrofit, BillingManagementClientImpl client) { - this.service = retrofit.create(BillingPeriodsService.class); - this.client = client; - } - - /** - * The interface defining all the services for BillingPeriods to be - * used by Retrofit to perform actually REST calls. - */ - interface BillingPeriodsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.BillingPeriods list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$skiptoken") String skiptoken, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.BillingPeriods get" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("billingPeriodName") String billingPeriodName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.BillingPeriods listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BillingPeriodInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BillingPeriodInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BillingPeriodInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BillingPeriodInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final String skiptoken = null; - final Integer top = null; - return service.list(this.client.subscriptionId(), this.client.apiVersion(), filter, skiptoken, top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param filter May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N billing periods. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BillingPeriodInner> object if successful. - */ - public PagedList list(final String filter, final String skiptoken, final Integer top) { - ServiceResponse> response = listSinglePageAsync(filter, skiptoken, top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param filter May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N billing periods. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String filter, final String skiptoken, final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(filter, skiptoken, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param filter May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N billing periods. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BillingPeriodInner> object - */ - public Observable> listAsync(final String filter, final String skiptoken, final Integer top) { - return listWithServiceResponseAsync(filter, skiptoken, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param filter May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N billing periods. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BillingPeriodInner> object - */ - public Observable>> listWithServiceResponseAsync(final String filter, final String skiptoken, final Integer top) { - return listSinglePageAsync(filter, skiptoken, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - ServiceResponse> * @param filter May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - ServiceResponse> * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - ServiceResponse> * @param top May be used to limit the number of results to the most recent N billing periods. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BillingPeriodInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String filter, final String skiptoken, final Integer top) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), filter, skiptoken, top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets a named billing period. - * - * @param billingPeriodName The name of a BillingPeriod resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BillingPeriodInner object if successful. - */ - public BillingPeriodInner get(String billingPeriodName) { - return getWithServiceResponseAsync(billingPeriodName).toBlocking().single().body(); - } - - /** - * Gets a named billing period. - * - * @param billingPeriodName The name of a BillingPeriod resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String billingPeriodName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(billingPeriodName), serviceCallback); - } - - /** - * Gets a named billing period. - * - * @param billingPeriodName The name of a BillingPeriod resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BillingPeriodInner object - */ - public Observable getAsync(String billingPeriodName) { - return getWithServiceResponseAsync(billingPeriodName).map(new Func1, BillingPeriodInner>() { - @Override - public BillingPeriodInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a named billing period. - * - * @param billingPeriodName The name of a BillingPeriod resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BillingPeriodInner object - */ - public Observable> getWithServiceResponseAsync(String billingPeriodName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (billingPeriodName == null) { - throw new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), billingPeriodName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BillingPeriodInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BillingPeriodInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BillingPeriodInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BillingPeriodInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/InvoiceInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/InvoiceInner.java deleted file mode 100644 index 2662ba38517..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/InvoiceInner.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import com.microsoft.azure.management.billing.DownloadUrl; -import org.joda.time.LocalDate; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * An invoice resource can be used download a PDF version of an invoice. - */ -@JsonFlatten -public class InvoiceInner extends Resource { - /** - * A secure link to download the PDF version of an invoice. The link will - * cease to work after its expiry time is reached. - */ - @JsonProperty(value = "properties.downloadUrl") - private DownloadUrl downloadUrl; - - /** - * The start of the date range covered by the invoice. - */ - @JsonProperty(value = "properties.invoicePeriodStartDate", access = JsonProperty.Access.WRITE_ONLY) - private LocalDate invoicePeriodStartDate; - - /** - * The end of the date range covered by the invoice. - */ - @JsonProperty(value = "properties.invoicePeriodEndDate", access = JsonProperty.Access.WRITE_ONLY) - private LocalDate invoicePeriodEndDate; - - /** - * Array of billing perdiod ids that the invoice is attributed to. - */ - @JsonProperty(value = "properties.billingPeriodIds", access = JsonProperty.Access.WRITE_ONLY) - private List billingPeriodIds; - - /** - * Get the downloadUrl value. - * - * @return the downloadUrl value - */ - public DownloadUrl downloadUrl() { - return this.downloadUrl; - } - - /** - * Set the downloadUrl value. - * - * @param downloadUrl the downloadUrl value to set - * @return the InvoiceInner object itself. - */ - public InvoiceInner withDownloadUrl(DownloadUrl downloadUrl) { - this.downloadUrl = downloadUrl; - return this; - } - - /** - * Get the invoicePeriodStartDate value. - * - * @return the invoicePeriodStartDate value - */ - public LocalDate invoicePeriodStartDate() { - return this.invoicePeriodStartDate; - } - - /** - * Get the invoicePeriodEndDate value. - * - * @return the invoicePeriodEndDate value - */ - public LocalDate invoicePeriodEndDate() { - return this.invoicePeriodEndDate; - } - - /** - * Get the billingPeriodIds value. - * - * @return the billingPeriodIds value - */ - public List billingPeriodIds() { - return this.billingPeriodIds; - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/InvoicesInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/InvoicesInner.java deleted file mode 100644 index 74da92518de..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/InvoicesInner.java +++ /dev/null @@ -1,571 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.billing.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Invoices. - */ -public class InvoicesInner { - /** The Retrofit service to perform REST calls. */ - private InvoicesService service; - /** The service client containing this operation class. */ - private BillingManagementClientImpl client; - - /** - * Initializes an instance of InvoicesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public InvoicesInner(Retrofit retrofit, BillingManagementClientImpl client) { - this.service = retrofit.create(InvoicesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Invoices to be - * used by Retrofit to perform actually REST calls. - */ - interface InvoicesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.Invoices list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$skiptoken") String skiptoken, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.Invoices get" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("invoiceName") String invoiceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.Invoices getLatest" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest") - Observable> getLatest(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.Invoices listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InvoiceInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InvoiceInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InvoiceInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InvoiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final String skiptoken = null; - final Integer top = null; - return service.list(this.client.subscriptionId(), this.client.apiVersion(), expand, filter, skiptoken, top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. - * @param filter May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N invoices. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InvoiceInner> object if successful. - */ - public PagedList list(final String expand, final String filter, final String skiptoken, final Integer top) { - ServiceResponse> response = listSinglePageAsync(expand, filter, skiptoken, top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. - * @param filter May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N invoices. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String expand, final String filter, final String skiptoken, final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(expand, filter, skiptoken, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. - * @param filter May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N invoices. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InvoiceInner> object - */ - public Observable> listAsync(final String expand, final String filter, final String skiptoken, final Integer top) { - return listWithServiceResponseAsync(expand, filter, skiptoken, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. - * @param filter May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N invoices. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InvoiceInner> object - */ - public Observable>> listWithServiceResponseAsync(final String expand, final String filter, final String skiptoken, final Integer top) { - return listSinglePageAsync(expand, filter, skiptoken, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - ServiceResponse> * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. - ServiceResponse> * @param filter May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - ServiceResponse> * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - ServiceResponse> * @param top May be used to limit the number of results to the most recent N invoices. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InvoiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String expand, final String filter, final String skiptoken, final Integer top) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), expand, filter, skiptoken, top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. - * - * @param invoiceName The name of an invoice resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InvoiceInner object if successful. - */ - public InvoiceInner get(String invoiceName) { - return getWithServiceResponseAsync(invoiceName).toBlocking().single().body(); - } - - /** - * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. - * - * @param invoiceName The name of an invoice resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String invoiceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(invoiceName), serviceCallback); - } - - /** - * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. - * - * @param invoiceName The name of an invoice resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InvoiceInner object - */ - public Observable getAsync(String invoiceName) { - return getWithServiceResponseAsync(invoiceName).map(new Func1, InvoiceInner>() { - @Override - public InvoiceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. - * - * @param invoiceName The name of an invoice resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InvoiceInner object - */ - public Observable> getWithServiceResponseAsync(String invoiceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (invoiceName == null) { - throw new IllegalArgumentException("Parameter invoiceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), invoiceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InvoiceInner object if successful. - */ - public InvoiceInner getLatest() { - return getLatestWithServiceResponseAsync().toBlocking().single().body(); - } - - /** - * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getLatestAsync(final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getLatestWithServiceResponseAsync(), serviceCallback); - } - - /** - * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InvoiceInner object - */ - public Observable getLatestAsync() { - return getLatestWithServiceResponseAsync().map(new Func1, InvoiceInner>() { - @Override - public InvoiceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InvoiceInner object - */ - public Observable> getLatestWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getLatest(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getLatestDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getLatestDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InvoiceInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InvoiceInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InvoiceInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InvoiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/OperationInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/OperationInner.java deleted file mode 100644 index 218d343f30b..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/OperationInner.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import com.microsoft.azure.management.billing.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A Billing REST API operation. - */ -public class OperationInner { - /** - * Operation name: {provider}/{resource}/{operation}. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * The object that represents the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/OperationsInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/OperationsInner.java deleted file mode 100644 index 7d7d422fe7d..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/OperationsInner.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.billing.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private BillingManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, BillingManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.Operations list" }) - @GET("providers/Microsoft.Billing/operations") - Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available billing REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available billing REST API operations. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available billing REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available billing REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available billing REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all of the available billing REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available billing REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available billing REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available billing REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available billing REST API operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/PageImpl.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/PageImpl.java deleted file mode 100644 index 246479117b9..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.billing.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/package-info.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/package-info.java deleted file mode 100644 index 6a04e335ab9..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for BillingManagementClient. - * Billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API. - */ -package com.microsoft.azure.management.billing.implementation; diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/package-info.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/package-info.java deleted file mode 100644 index 59e504f78a6..00000000000 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for BillingManagementClient. - * Billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API. - */ -package com.microsoft.azure.management.billing; diff --git a/azure-mgmt-cognitiveservices/pom.xml b/azure-mgmt-cognitiveservices/pom.xml deleted file mode 100644 index 32685b8bffd..00000000000 --- a/azure-mgmt-cognitiveservices/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-cognitiveservices - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for CognitiveServices Management - This package contains Microsoft CognitiveServices Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CheckSkuAvailabilityParameter.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CheckSkuAvailabilityParameter.java deleted file mode 100644 index 7696093595b..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CheckSkuAvailabilityParameter.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Check SKU availability parameter. - */ -public class CheckSkuAvailabilityParameter { - /** - * The SKU of the resource. - */ - @JsonProperty(value = "skus", required = true) - private List skus; - - /** - * The Kind of the resource. Possible values include: - * 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', - * 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', - * 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', - * 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', - * 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', - * 'TextTranslation', 'WebLM'. - */ - @JsonProperty(value = "kind", required = true) - private Kind kind; - - /** - * The Type of the resource. - */ - @JsonProperty(value = "type", required = true) - private String type; - - /** - * Get the skus value. - * - * @return the skus value - */ - public List skus() { - return this.skus; - } - - /** - * Set the skus value. - * - * @param skus the skus value to set - * @return the CheckSkuAvailabilityParameter object itself. - */ - public CheckSkuAvailabilityParameter withSkus(List skus) { - this.skus = skus; - return this; - } - - /** - * Get the kind value. - * - * @return the kind value - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind value. - * - * @param kind the kind value to set - * @return the CheckSkuAvailabilityParameter object itself. - */ - public CheckSkuAvailabilityParameter withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the CheckSkuAvailabilityParameter object itself. - */ - public CheckSkuAvailabilityParameter withType(String type) { - this.type = type; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CheckSkuAvailabilityResult.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CheckSkuAvailabilityResult.java deleted file mode 100644 index ff7f4d01e50..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CheckSkuAvailabilityResult.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Check SKU availability result. - */ -public class CheckSkuAvailabilityResult { - /** - * The Kind of the resource. Possible values include: - * 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', - * 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', - * 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', - * 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', - * 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', - * 'TextTranslation', 'WebLM'. - */ - @JsonProperty(value = "kind") - private Kind kind; - - /** - * The Type of the resource. - */ - @JsonProperty(value = "type") - private String type; - - /** - * The SKU of Cognitive Services account. Possible values include: 'F0', - * 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6'. - */ - @JsonProperty(value = "skuName") - private SkuName skuName; - - /** - * Indicates the given SKU is available or not. - */ - @JsonProperty(value = "skuAvailable") - private Boolean skuAvailable; - - /** - * Reason why the SKU is not available. - */ - @JsonProperty(value = "reason") - private String reason; - - /** - * Additional error message. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the kind value. - * - * @return the kind value - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind value. - * - * @param kind the kind value to set - * @return the CheckSkuAvailabilityResult object itself. - */ - public CheckSkuAvailabilityResult withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the CheckSkuAvailabilityResult object itself. - */ - public CheckSkuAvailabilityResult withType(String type) { - this.type = type; - return this; - } - - /** - * Get the skuName value. - * - * @return the skuName value - */ - public SkuName skuName() { - return this.skuName; - } - - /** - * Set the skuName value. - * - * @param skuName the skuName value to set - * @return the CheckSkuAvailabilityResult object itself. - */ - public CheckSkuAvailabilityResult withSkuName(SkuName skuName) { - this.skuName = skuName; - return this; - } - - /** - * Get the skuAvailable value. - * - * @return the skuAvailable value - */ - public Boolean skuAvailable() { - return this.skuAvailable; - } - - /** - * Set the skuAvailable value. - * - * @param skuAvailable the skuAvailable value to set - * @return the CheckSkuAvailabilityResult object itself. - */ - public CheckSkuAvailabilityResult withSkuAvailable(Boolean skuAvailable) { - this.skuAvailable = skuAvailable; - return this; - } - - /** - * Get the reason value. - * - * @return the reason value - */ - public String reason() { - return this.reason; - } - - /** - * Set the reason value. - * - * @param reason the reason value to set - * @return the CheckSkuAvailabilityResult object itself. - */ - public CheckSkuAvailabilityResult withReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the CheckSkuAvailabilityResult object itself. - */ - public CheckSkuAvailabilityResult withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CognitiveServicesAccountUpdateParameters.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CognitiveServicesAccountUpdateParameters.java deleted file mode 100644 index 292990cc674..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CognitiveServicesAccountUpdateParameters.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.microsoft.azure.management.cognitiveservices.implementation.SkuInner; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The parameters to provide for the account. - */ -public class CognitiveServicesAccountUpdateParameters { - /** - * Gets or sets the SKU of the resource. - */ - @JsonProperty(value = "sku") - private SkuInner sku; - - /** - * Gets or sets a list of key value pairs that describe the resource. These - * tags can be used in viewing and grouping this resource (across resource - * groups). A maximum of 15 tags can be provided for a resource. Each tag - * must have a key no greater than 128 characters and value no greater than - * 256 characters. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the sku value. - * - * @return the sku value - */ - public SkuInner sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the CognitiveServicesAccountUpdateParameters object itself. - */ - public CognitiveServicesAccountUpdateParameters withSku(SkuInner sku) { - this.sku = sku; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the CognitiveServicesAccountUpdateParameters object itself. - */ - public CognitiveServicesAccountUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CognitiveServicesResourceAndSku.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CognitiveServicesResourceAndSku.java deleted file mode 100644 index e6c4da5eace..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/CognitiveServicesResourceAndSku.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.microsoft.azure.management.cognitiveservices.implementation.SkuInner; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Cognitive Services resource type and SKU. - */ -public class CognitiveServicesResourceAndSku { - /** - * Resource Namespace and Type. - */ - @JsonProperty(value = "resourceType") - private String resourceType; - - /** - * The SKU of Cognitive Services account. - */ - @JsonProperty(value = "sku") - private SkuInner sku; - - /** - * Get the resourceType value. - * - * @return the resourceType value - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Set the resourceType value. - * - * @param resourceType the resourceType value to set - * @return the CognitiveServicesResourceAndSku object itself. - */ - public CognitiveServicesResourceAndSku withResourceType(String resourceType) { - this.resourceType = resourceType; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public SkuInner sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the CognitiveServicesResourceAndSku object itself. - */ - public CognitiveServicesResourceAndSku withSku(SkuInner sku) { - this.sku = sku; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Error.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Error.java deleted file mode 100644 index b7f8be021c3..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Error.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Cognitive Services error object. - */ -public class Error { - /** - * The error body. - */ - @JsonProperty(value = "error") - private ErrorBody error; - - /** - * Get the error value. - * - * @return the error value - */ - public ErrorBody error() { - return this.error; - } - - /** - * Set the error value. - * - * @param error the error value to set - * @return the Error object itself. - */ - public Error withError(ErrorBody error) { - this.error = error; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ErrorBody.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ErrorBody.java deleted file mode 100644 index 86c72a9655e..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ErrorBody.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Cognitive Services error body. - */ -public class ErrorBody { - /** - * error code. - */ - @JsonProperty(value = "code", required = true) - private String code; - - /** - * error message. - */ - @JsonProperty(value = "message", required = true) - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ErrorBody object itself. - */ - public ErrorBody withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ErrorBody object itself. - */ - public ErrorBody withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ErrorException.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ErrorException.java deleted file mode 100644 index 0ce6f05f465..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ErrorException.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with Error information. - */ -public class ErrorException extends RestException { - /** - * Initializes a new instance of the ErrorException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorException(final String message, final Response response, final Error body) { - super(message, response, body); - } - - @Override - public Error body() { - return (Error) super.body(); - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/KeyName.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/KeyName.java deleted file mode 100644 index 29c1d064702..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/KeyName.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for KeyName. - */ -public enum KeyName { - /** Enum value Key1. */ - KEY1("Key1"), - - /** Enum value Key2. */ - KEY2("Key2"); - - /** The actual serialized value for a KeyName instance. */ - private String value; - - KeyName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a KeyName instance. - * - * @param value the serialized value to parse. - * @return the parsed KeyName object, or null if unable to parse. - */ - @JsonCreator - public static KeyName fromString(String value) { - KeyName[] items = KeyName.values(); - for (KeyName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Kind.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Kind.java deleted file mode 100644 index 298df8e21a9..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Kind.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for Kind. - */ -public final class Kind extends ExpandableStringEnum { - /** Static value Bing.Autosuggest.v7 for Kind. */ - public static final Kind BING_AUTOSUGGESTV7 = fromString("Bing.Autosuggest.v7"); - - /** Static value Bing.CustomSearch for Kind. */ - public static final Kind BING_CUSTOM_SEARCH = fromString("Bing.CustomSearch"); - - /** Static value Bing.Search.v7 for Kind. */ - public static final Kind BING_SEARCHV7 = fromString("Bing.Search.v7"); - - /** Static value Bing.Speech for Kind. */ - public static final Kind BING_SPEECH = fromString("Bing.Speech"); - - /** Static value Bing.SpellCheck.v7 for Kind. */ - public static final Kind BING_SPELL_CHECKV7 = fromString("Bing.SpellCheck.v7"); - - /** Static value ComputerVision for Kind. */ - public static final Kind COMPUTER_VISION = fromString("ComputerVision"); - - /** Static value ContentModerator for Kind. */ - public static final Kind CONTENT_MODERATOR = fromString("ContentModerator"); - - /** Static value CustomSpeech for Kind. */ - public static final Kind CUSTOM_SPEECH = fromString("CustomSpeech"); - - /** Static value CustomVision.Prediction for Kind. */ - public static final Kind CUSTOM_VISION_PREDICTION = fromString("CustomVision.Prediction"); - - /** Static value CustomVision.Training for Kind. */ - public static final Kind CUSTOM_VISION_TRAINING = fromString("CustomVision.Training"); - - /** Static value Emotion for Kind. */ - public static final Kind EMOTION = fromString("Emotion"); - - /** Static value Face for Kind. */ - public static final Kind FACE = fromString("Face"); - - /** Static value LUIS for Kind. */ - public static final Kind LUIS = fromString("LUIS"); - - /** Static value QnAMaker for Kind. */ - public static final Kind QN_AMAKER = fromString("QnAMaker"); - - /** Static value SpeakerRecognition for Kind. */ - public static final Kind SPEAKER_RECOGNITION = fromString("SpeakerRecognition"); - - /** Static value SpeechTranslation for Kind. */ - public static final Kind SPEECH_TRANSLATION = fromString("SpeechTranslation"); - - /** Static value TextAnalytics for Kind. */ - public static final Kind TEXT_ANALYTICS = fromString("TextAnalytics"); - - /** Static value TextTranslation for Kind. */ - public static final Kind TEXT_TRANSLATION = fromString("TextTranslation"); - - /** Static value WebLM for Kind. */ - public static final Kind WEB_LM = fromString("WebLM"); - - /** - * Creates or finds a Kind from its string representation. - * @param name a name to look for - * @return the corresponding Kind - */ - @JsonCreator - public static Kind fromString(String name) { - return fromString(name, Kind.class); - } - - /** - * @return known Kind values - */ - public static Collection values() { - return values(Kind.class); - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/MetricName.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/MetricName.java deleted file mode 100644 index 17d8af9741e..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/MetricName.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A metric name. - */ -public class MetricName { - /** - * The name of the metric. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /** - * The friendly name of the metric. - */ - @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) - private String localizedValue; - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Get the localizedValue value. - * - * @return the localizedValue value - */ - public String localizedValue() { - return this.localizedValue; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/OperationDisplayInfo.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/OperationDisplayInfo.java deleted file mode 100644 index 1c307d66272..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/OperationDisplayInfo.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The operation supported by Cognitive Services. - */ -public class OperationDisplayInfo { - /** - * The description of the operation. - */ - @JsonProperty(value = "description") - private String description; - - /** - * The action that users can perform, based on their permission level. - */ - @JsonProperty(value = "operation") - private String operation; - - /** - * Service provider: Microsoft Cognitive Services. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * Resource on which the operation is performed. - */ - @JsonProperty(value = "resource") - private String resource; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OperationDisplayInfo object itself. - */ - public OperationDisplayInfo withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the OperationDisplayInfo object itself. - */ - public OperationDisplayInfo withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the OperationDisplayInfo object itself. - */ - public OperationDisplayInfo withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource value. - * - * @param resource the resource value to set - * @return the OperationDisplayInfo object itself. - */ - public OperationDisplayInfo withResource(String resource) { - this.resource = resource; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ProvisioningState.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ProvisioningState.java deleted file mode 100644 index 848e92ac6bf..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/ProvisioningState.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ProvisioningState. - */ -public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Creating for ProvisioningState. */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** Static value ResolvingDNS for ProvisioningState. */ - public static final ProvisioningState RESOLVING_DNS = fromString("ResolvingDNS"); - - /** Static value Moving for ProvisioningState. */ - public static final ProvisioningState MOVING = fromString("Moving"); - - /** 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"); - - /** - * 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); - } - - /** - * @return known ProvisioningState values - */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/QuotaUsageStatus.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/QuotaUsageStatus.java deleted file mode 100644 index f715ffec809..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/QuotaUsageStatus.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for QuotaUsageStatus. - */ -public final class QuotaUsageStatus extends ExpandableStringEnum { - /** Static value Included for QuotaUsageStatus. */ - public static final QuotaUsageStatus INCLUDED = fromString("Included"); - - /** Static value Blocked for QuotaUsageStatus. */ - public static final QuotaUsageStatus BLOCKED = fromString("Blocked"); - - /** Static value InOverage for QuotaUsageStatus. */ - public static final QuotaUsageStatus IN_OVERAGE = fromString("InOverage"); - - /** Static value Unknown for QuotaUsageStatus. */ - public static final QuotaUsageStatus UNKNOWN = fromString("Unknown"); - - /** - * Creates or finds a QuotaUsageStatus from its string representation. - * @param name a name to look for - * @return the corresponding QuotaUsageStatus - */ - @JsonCreator - public static QuotaUsageStatus fromString(String name) { - return fromString(name, QuotaUsageStatus.class); - } - - /** - * @return known QuotaUsageStatus values - */ - public static Collection values() { - return values(QuotaUsageStatus.class); - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/RegenerateKeyParameters.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/RegenerateKeyParameters.java deleted file mode 100644 index 82af3f0ba22..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/RegenerateKeyParameters.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Regenerate key parameters. - */ -public class RegenerateKeyParameters { - /** - * key name to generate (Key1|Key2). Possible values include: 'Key1', - * 'Key2'. - */ - @JsonProperty(value = "keyName", required = true) - private KeyName keyName; - - /** - * Get the keyName value. - * - * @return the keyName value - */ - public KeyName keyName() { - return this.keyName; - } - - /** - * Set the keyName value. - * - * @param keyName the keyName value to set - * @return the RegenerateKeyParameters object itself. - */ - public RegenerateKeyParameters withKeyName(KeyName keyName) { - this.keyName = keyName; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/SkuName.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/SkuName.java deleted file mode 100644 index 543f2b488c5..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/SkuName.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for SkuName. - */ -public final class SkuName extends ExpandableStringEnum { - /** Static value F0 for SkuName. */ - public static final SkuName F0 = fromString("F0"); - - /** Static value P0 for SkuName. */ - public static final SkuName P0 = fromString("P0"); - - /** Static value P1 for SkuName. */ - public static final SkuName P1 = fromString("P1"); - - /** Static value P2 for SkuName. */ - public static final SkuName P2 = fromString("P2"); - - /** Static value S0 for SkuName. */ - public static final SkuName S0 = fromString("S0"); - - /** Static value S1 for SkuName. */ - public static final SkuName S1 = fromString("S1"); - - /** Static value S2 for SkuName. */ - public static final SkuName S2 = fromString("S2"); - - /** Static value S3 for SkuName. */ - public static final SkuName S3 = fromString("S3"); - - /** Static value S4 for SkuName. */ - public static final SkuName S4 = fromString("S4"); - - /** Static value S5 for SkuName. */ - public static final SkuName S5 = fromString("S5"); - - /** Static value S6 for SkuName. */ - public static final SkuName S6 = fromString("S6"); - - /** - * Creates or finds a SkuName from its string representation. - * @param name a name to look for - * @return the corresponding SkuName - */ - @JsonCreator - public static SkuName fromString(String name) { - return fromString(name, SkuName.class); - } - - /** - * @return known SkuName values - */ - public static Collection values() { - return values(SkuName.class); - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/SkuTier.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/SkuTier.java deleted file mode 100644 index c4d33fad4e6..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/SkuTier.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SkuTier. - */ -public enum SkuTier { - /** Enum value Free. */ - FREE("Free"), - - /** Enum value Standard. */ - STANDARD("Standard"), - - /** Enum value Premium. */ - PREMIUM("Premium"); - - /** The actual serialized value for a SkuTier instance. */ - private String value; - - SkuTier(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuTier instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuTier object, or null if unable to parse. - */ - @JsonCreator - public static SkuTier fromString(String value) { - SkuTier[] items = SkuTier.values(); - for (SkuTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/UnitType.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/UnitType.java deleted file mode 100644 index 45c8cb8275f..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/UnitType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for UnitType. - */ -public final class UnitType extends ExpandableStringEnum { - /** Static value Count for UnitType. */ - public static final UnitType COUNT = fromString("Count"); - - /** Static value Bytes for UnitType. */ - public static final UnitType BYTES = fromString("Bytes"); - - /** Static value Seconds for UnitType. */ - public static final UnitType SECONDS = fromString("Seconds"); - - /** Static value Percent for UnitType. */ - public static final UnitType PERCENT = fromString("Percent"); - - /** Static value CountPerSecond for UnitType. */ - public static final UnitType COUNT_PER_SECOND = fromString("CountPerSecond"); - - /** Static value BytesPerSecond for UnitType. */ - public static final UnitType BYTES_PER_SECOND = fromString("BytesPerSecond"); - - /** Static value Milliseconds for UnitType. */ - public static final UnitType MILLISECONDS = fromString("Milliseconds"); - - /** - * Creates or finds a UnitType from its string representation. - * @param name a name to look for - * @return the corresponding UnitType - */ - @JsonCreator - public static UnitType fromString(String name) { - return fromString(name, UnitType.class); - } - - /** - * @return known UnitType values - */ - public static Collection values() { - return values(UnitType.class); - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Usage.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Usage.java deleted file mode 100644 index 5c438bc666b..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/Usage.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The usage data for a usage request. - */ -public class Usage { - /** - * The unit of the metric. Possible values include: 'Count', 'Bytes', - * 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - * 'Milliseconds'. - */ - @JsonProperty(value = "unit") - private UnitType unit; - - /** - * The name information for the metric. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private MetricName name; - - /** - * The quota period used to summarize the usage values. - */ - @JsonProperty(value = "quotaPeriod", access = JsonProperty.Access.WRITE_ONLY) - private String quotaPeriod; - - /** - * Maximum value for this metric. - */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) - private Double limit; - - /** - * Current value for this metric. - */ - @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) - private Double currentValue; - - /** - * Next reset time for current quota. - */ - @JsonProperty(value = "nextResetTime", access = JsonProperty.Access.WRITE_ONLY) - private String nextResetTime; - - /** - * Cognitive Services account quota usage status. Possible values include: - * 'Included', 'Blocked', 'InOverage', 'Unknown'. - */ - @JsonProperty(value = "status") - private QuotaUsageStatus status; - - /** - * Get the unit value. - * - * @return the unit value - */ - public UnitType unit() { - return this.unit; - } - - /** - * Set the unit value. - * - * @param unit the unit value to set - * @return the Usage object itself. - */ - public Usage withUnit(UnitType unit) { - this.unit = unit; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public MetricName name() { - return this.name; - } - - /** - * Get the quotaPeriod value. - * - * @return the quotaPeriod value - */ - public String quotaPeriod() { - return this.quotaPeriod; - } - - /** - * Get the limit value. - * - * @return the limit value - */ - public Double limit() { - return this.limit; - } - - /** - * Get the currentValue value. - * - * @return the currentValue value - */ - public Double currentValue() { - return this.currentValue; - } - - /** - * Get the nextResetTime value. - * - * @return the nextResetTime value - */ - public String nextResetTime() { - return this.nextResetTime; - } - - /** - * Get the status value. - * - * @return the status value - */ - public QuotaUsageStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the Usage object itself. - */ - public Usage withStatus(QuotaUsageStatus status) { - this.status = status; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/AccountsInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/AccountsInner.java deleted file mode 100644 index 715cf04ad10..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/AccountsInner.java +++ /dev/null @@ -1,1370 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccountUpdateParameters; -import com.microsoft.azure.management.cognitiveservices.ErrorException; -import com.microsoft.azure.management.cognitiveservices.KeyName; -import com.microsoft.azure.management.cognitiveservices.RegenerateKeyParameters; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Accounts. - */ -public class AccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private AccountsService service; - /** The service client containing this operation class. */ - private CognitiveServicesManagementClientImpl client; - - /** - * Initializes an instance of AccountsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public AccountsInner(Retrofit retrofit, CognitiveServicesManagementClientImpl client) { - this.service = retrofit.create(AccountsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Accounts to be - * used by Retrofit to perform actually REST calls. - */ - interface AccountsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}") - Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body CognitiveServicesAccountCreateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CognitiveServicesAccountUpdateParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts regenerateKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey") - Observable> regenerateKey(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts listSkus" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus") - Observable> listSkus(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts getUsages" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/usages") - Observable> getUsages(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Accounts listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param parameters The parameters to provide for the created account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountInner object if successful. - */ - public CognitiveServicesAccountInner create(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParametersInner parameters) { - return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); - } - - /** - * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param parameters The parameters to provide for the created account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); - } - - /** - * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param parameters The parameters to provide for the created account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable createAsync(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParametersInner parameters) { - return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, CognitiveServicesAccountInner>() { - @Override - public CognitiveServicesAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param parameters The parameters to provide for the created account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.create(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountInner object if successful. - */ - public CognitiveServicesAccountInner update(String resourceGroupName, String accountName) { - return updateWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable updateAsync(String resourceGroupName, String accountName) { - return updateWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, CognitiveServicesAccountInner>() { - @Override - public CognitiveServicesAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final SkuInner sku = null; - final Map tags = null; - CognitiveServicesAccountUpdateParameters parameters = new CognitiveServicesAccountUpdateParameters(); - parameters.withSku(null); - parameters.withTags(null); - return service.update(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param sku Gets or sets the SKU of the resource. - * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountInner object if successful. - */ - public CognitiveServicesAccountInner update(String resourceGroupName, String accountName, SkuInner sku, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags).toBlocking().single().body(); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param sku Gets or sets the SKU of the resource. - * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String accountName, SkuInner sku, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags), serviceCallback); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param sku Gets or sets the SKU of the resource. - * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable updateAsync(String resourceGroupName, String accountName, SkuInner sku, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags).map(new Func1, CognitiveServicesAccountInner>() { - @Override - public CognitiveServicesAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param sku Gets or sets the SKU of the resource. - * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, SkuInner sku, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(sku); - Validator.validate(tags); - CognitiveServicesAccountUpdateParameters parameters = new CognitiveServicesAccountUpdateParameters(); - parameters.withSku(sku); - parameters.withTags(tags); - return service.update(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Deletes a Cognitive Services account from the resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String accountName) { - deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Deletes a Cognitive Services account from the resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Deletes a Cognitive Services account from the resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String accountName) { - return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a Cognitive Services account from the resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Returns a Cognitive Services account specified by the parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountInner object if successful. - */ - public CognitiveServicesAccountInner getByResourceGroup(String resourceGroupName, String accountName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Returns a Cognitive Services account specified by the parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Returns a Cognitive Services account specified by the parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String accountName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, CognitiveServicesAccountInner>() { - @Override - public CognitiveServicesAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Returns a Cognitive Services account specified by the parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CognitiveServicesAccountInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CognitiveServicesAccountInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CognitiveServicesAccountInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CognitiveServicesAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CognitiveServicesAccountInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CognitiveServicesAccountInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CognitiveServicesAccountInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CognitiveServicesAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Lists the account keys for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountKeysInner object if successful. - */ - public CognitiveServicesAccountKeysInner listKeys(String resourceGroupName, String accountName) { - return listKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Lists the account keys for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Lists the account keys for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String accountName) { - return listKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, CognitiveServicesAccountKeysInner>() { - @Override - public CognitiveServicesAccountKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists the account keys for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Regenerates the specified account key for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountKeysInner object if successful. - */ - public CognitiveServicesAccountKeysInner regenerateKey(String resourceGroupName, String accountName, KeyName keyName) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).toBlocking().single().body(); - } - - /** - * Regenerates the specified account key for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeyAsync(String resourceGroupName, String accountName, KeyName keyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName), serviceCallback); - } - - /** - * Regenerates the specified account key for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountKeysInner object - */ - public Observable regenerateKeyAsync(String resourceGroupName, String accountName, KeyName keyName) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).map(new Func1, CognitiveServicesAccountKeysInner>() { - @Override - public CognitiveServicesAccountKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the specified account key for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountKeysInner object - */ - public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String accountName, KeyName keyName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (keyName == null) { - throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); - } - RegenerateKeyParameters parameters = new RegenerateKeyParameters(); - parameters.withKeyName(keyName); - return service.regenerateKey(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeyDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * List available SKUs for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountEnumerateSkusResultInner object if successful. - */ - public CognitiveServicesAccountEnumerateSkusResultInner listSkus(String resourceGroupName, String accountName) { - return listSkusWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * List available SKUs for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listSkusAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listSkusWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * List available SKUs for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountEnumerateSkusResultInner object - */ - public Observable listSkusAsync(String resourceGroupName, String accountName) { - return listSkusWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, CognitiveServicesAccountEnumerateSkusResultInner>() { - @Override - public CognitiveServicesAccountEnumerateSkusResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * List available SKUs for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountEnumerateSkusResultInner object - */ - public Observable> listSkusWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSkus(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listSkusDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listSkusDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Get usages for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UsagesResultInner object if successful. - */ - public UsagesResultInner getUsages(String resourceGroupName, String accountName) { - return getUsagesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Get usages for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getUsagesAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getUsagesWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Get usages for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UsagesResultInner object - */ - public Observable getUsagesAsync(String resourceGroupName, String accountName) { - return getUsagesWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, UsagesResultInner>() { - @Override - public UsagesResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get usages for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UsagesResultInner object - */ - public Observable> getUsagesWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getUsages(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.filter(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getUsagesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getUsagesDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CognitiveServicesAccountInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CognitiveServicesAccountInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CognitiveServicesAccountInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CognitiveServicesAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CognitiveServicesAccountInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CognitiveServicesAccountInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CognitiveServicesAccountInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Returns all the resources of a particular type belonging to a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CognitiveServicesAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CheckSkuAvailabilityResultListInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CheckSkuAvailabilityResultListInner.java deleted file mode 100644 index 626dc8db326..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CheckSkuAvailabilityResultListInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import java.util.List; -import com.microsoft.azure.management.cognitiveservices.CheckSkuAvailabilityResult; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Check SKU availability result list. - */ -public class CheckSkuAvailabilityResultListInner { - /** - * Check SKU availability result list. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the CheckSkuAvailabilityResultListInner object itself. - */ - public CheckSkuAvailabilityResultListInner withValue(List value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CheckSkuAvailabilitysInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CheckSkuAvailabilitysInner.java deleted file mode 100644 index 7bda6d89827..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CheckSkuAvailabilitysInner.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.cognitiveservices.CheckSkuAvailabilityParameter; -import com.microsoft.azure.management.cognitiveservices.Kind; -import com.microsoft.azure.management.cognitiveservices.SkuName; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in CheckSkuAvailabilitys. - */ -public class CheckSkuAvailabilitysInner { - /** The Retrofit service to perform REST calls. */ - private CheckSkuAvailabilitysService service; - /** The service client containing this operation class. */ - private CognitiveServicesManagementClientImpl client; - - /** - * Initializes an instance of CheckSkuAvailabilitysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public CheckSkuAvailabilitysInner(Retrofit retrofit, CognitiveServicesManagementClientImpl client) { - this.service = retrofit.create(CheckSkuAvailabilitysService.class); - this.client = client; - } - - /** - * The interface defining all the services for CheckSkuAvailabilitys to be - * used by Retrofit to perform actually REST calls. - */ - interface CheckSkuAvailabilitysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.CheckSkuAvailabilitys list" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckSkuAvailabilityParameter parameters, @Header("User-Agent") String userAgent); - - } - - /** - * Check available SKUs. - * - * @param location Resource location. - * @param skus The SKU of the resource. - * @param kind The Kind of the resource. Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' - * @param type The Type of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CheckSkuAvailabilityResultListInner object if successful. - */ - public CheckSkuAvailabilityResultListInner list(String location, List skus, Kind kind, String type) { - return listWithServiceResponseAsync(location, skus, kind, type).toBlocking().single().body(); - } - - /** - * Check available SKUs. - * - * @param location Resource location. - * @param skus The SKU of the resource. - * @param kind The Kind of the resource. Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' - * @param type The Type of the resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listAsync(String location, List skus, Kind kind, String type, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(location, skus, kind, type), serviceCallback); - } - - /** - * Check available SKUs. - * - * @param location Resource location. - * @param skus The SKU of the resource. - * @param kind The Kind of the resource. Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' - * @param type The Type of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckSkuAvailabilityResultListInner object - */ - public Observable listAsync(String location, List skus, Kind kind, String type) { - return listWithServiceResponseAsync(location, skus, kind, type).map(new Func1, CheckSkuAvailabilityResultListInner>() { - @Override - public CheckSkuAvailabilityResultListInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Check available SKUs. - * - * @param location Resource location. - * @param skus The SKU of the resource. - * @param kind The Kind of the resource. Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' - * @param type The Type of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckSkuAvailabilityResultListInner object - */ - public Observable> listWithServiceResponseAsync(String location, List skus, Kind kind, String type) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (skus == null) { - throw new IllegalArgumentException("Parameter skus is required and cannot be null."); - } - if (kind == null) { - throw new IllegalArgumentException("Parameter kind is required and cannot be null."); - } - if (type == null) { - throw new IllegalArgumentException("Parameter type is required and cannot be null."); - } - Validator.validate(skus); - CheckSkuAvailabilityParameter parameters = new CheckSkuAvailabilityParameter(); - parameters.withSkus(skus); - parameters.withKind(kind); - parameters.withType(type); - return service.list(this.client.subscriptionId(), location, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountCreateParametersInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountCreateParametersInner.java deleted file mode 100644 index 711d6ce61e7..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountCreateParametersInner.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.microsoft.azure.management.cognitiveservices.Kind; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The parameters to provide for the account. - */ -public class CognitiveServicesAccountCreateParametersInner { - /** - * Required. Gets or sets the SKU of the resource. - */ - @JsonProperty(value = "sku", required = true) - private SkuInner sku; - - /** - * Required. Gets or sets the Kind of the resource. Possible values - * include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', - * 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', - * 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', - * 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', - * 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', - * 'TextTranslation', 'WebLM'. - */ - @JsonProperty(value = "kind", required = true) - private Kind kind; - - /** - * Required. Gets or sets the location of the resource. This will be one of - * the supported and registered Azure Geo Regions (e.g. West US, East US, - * Southeast Asia, etc.). The geo region of a resource cannot be changed - * once it is created, but if an identical geo region is specified on - * update the request will succeed. - */ - @JsonProperty(value = "location", required = true) - private String location; - - /** - * Gets or sets a list of key value pairs that describe the resource. These - * tags can be used in viewing and grouping this resource (across resource - * groups). A maximum of 15 tags can be provided for a resource. Each tag - * must have a key no greater than 128 characters and value no greater than - * 256 characters. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Must exist in the request. Must be an empty object. Must not be null. - */ - @JsonProperty(value = "properties", required = true) - private Object properties; - - /** - * Get the sku value. - * - * @return the sku value - */ - public SkuInner sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the CognitiveServicesAccountCreateParametersInner object itself. - */ - public CognitiveServicesAccountCreateParametersInner withSku(SkuInner sku) { - this.sku = sku; - return this; - } - - /** - * Get the kind value. - * - * @return the kind value - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind value. - * - * @param kind the kind value to set - * @return the CognitiveServicesAccountCreateParametersInner object itself. - */ - public CognitiveServicesAccountCreateParametersInner withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the CognitiveServicesAccountCreateParametersInner object itself. - */ - public CognitiveServicesAccountCreateParametersInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the CognitiveServicesAccountCreateParametersInner object itself. - */ - public CognitiveServicesAccountCreateParametersInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the CognitiveServicesAccountCreateParametersInner object itself. - */ - public CognitiveServicesAccountCreateParametersInner withProperties(Object properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java deleted file mode 100644 index 3e0eb276bb8..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import java.util.List; -import com.microsoft.azure.management.cognitiveservices.CognitiveServicesResourceAndSku; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The list of cognitive services accounts operation response. - */ -public class CognitiveServicesAccountEnumerateSkusResultInner { - /** - * Gets the list of Cognitive Services accounts and their properties. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountInner.java deleted file mode 100644 index 1b032530000..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountInner.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.microsoft.azure.management.cognitiveservices.ProvisioningState; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Cognitive Services Account is an Azure resource representing the provisioned - * account, its type, location and SKU. - */ -@JsonFlatten -public class CognitiveServicesAccountInner { - /** - * Entity Tag. - */ - @JsonProperty(value = "etag") - private String etag; - - /** - * The id of the created account. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Type of cognitive service account. - */ - @JsonProperty(value = "kind") - private String kind; - - /** - * The location of the resource. - */ - @JsonProperty(value = "location") - private String location; - - /** - * The name of the created account. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets the status of the cognitive services account at the time the - * operation was called. Possible values include: 'Creating', - * 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /** - * Endpoint of the created account. - */ - @JsonProperty(value = "properties.endpoint") - private String endpoint; - - /** - * The internal identifier. - */ - @JsonProperty(value = "properties.internalId") - private String internalId; - - /** - * The SKU of Cognitive Services account. - */ - @JsonProperty(value = "sku") - private SkuInner sku; - - /** - * Gets or sets a list of key value pairs that describe the resource. These - * tags can be used in viewing and grouping this resource (across resource - * groups). A maximum of 15 tags can be provided for a resource. Each tag - * must have a key no greater than 128 characters and value no greater than - * 256 characters. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag value. - * - * @param etag the etag value to set - * @return the CognitiveServicesAccountInner object itself. - */ - public CognitiveServicesAccountInner withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the kind value. - * - * @return the kind value - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind value. - * - * @param kind the kind value to set - * @return the CognitiveServicesAccountInner object itself. - */ - public CognitiveServicesAccountInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the CognitiveServicesAccountInner object itself. - */ - public CognitiveServicesAccountInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the endpoint value. - * - * @return the endpoint value - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint value. - * - * @param endpoint the endpoint value to set - * @return the CognitiveServicesAccountInner object itself. - */ - public CognitiveServicesAccountInner withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the internalId value. - * - * @return the internalId value - */ - public String internalId() { - return this.internalId; - } - - /** - * Set the internalId value. - * - * @param internalId the internalId value to set - * @return the CognitiveServicesAccountInner object itself. - */ - public CognitiveServicesAccountInner withInternalId(String internalId) { - this.internalId = internalId; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public SkuInner sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the CognitiveServicesAccountInner object itself. - */ - public CognitiveServicesAccountInner withSku(SkuInner sku) { - this.sku = sku; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the CognitiveServicesAccountInner object itself. - */ - public CognitiveServicesAccountInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountKeysInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountKeysInner.java deleted file mode 100644 index 2533192e705..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountKeysInner.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The access keys for the cognitive services account. - */ -public class CognitiveServicesAccountKeysInner { - /** - * Gets the value of key 1. - */ - @JsonProperty(value = "key1") - private String key1; - - /** - * Gets the value of key 2. - */ - @JsonProperty(value = "key2") - private String key2; - - /** - * Get the key1 value. - * - * @return the key1 value - */ - public String key1() { - return this.key1; - } - - /** - * Set the key1 value. - * - * @param key1 the key1 value to set - * @return the CognitiveServicesAccountKeysInner object itself. - */ - public CognitiveServicesAccountKeysInner withKey1(String key1) { - this.key1 = key1; - return this; - } - - /** - * Get the key2 value. - * - * @return the key2 value - */ - public String key2() { - return this.key2; - } - - /** - * Set the key2 value. - * - * @param key2 the key2 value to set - * @return the CognitiveServicesAccountKeysInner object itself. - */ - public CognitiveServicesAccountKeysInner withKey2(String key2) { - this.key2 = key2; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountsInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountsInner.java deleted file mode 100644 index c41d03be90c..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountsInner.java +++ /dev/null @@ -1,813 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccountUpdateParameters; -import com.microsoft.azure.management.cognitiveservices.ErrorException; -import com.microsoft.azure.management.cognitiveservices.KeyName; -import com.microsoft.azure.management.cognitiveservices.RegenerateKeyParameters; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.Map; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in CognitiveServicesAccounts. - */ -public class CognitiveServicesAccountsInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private CognitiveServicesAccountsService service; - /** The service client containing this operation class. */ - private CognitiveServicesManagementClientImpl client; - - /** - * Initializes an instance of CognitiveServicesAccountsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public CognitiveServicesAccountsInner(Retrofit retrofit, CognitiveServicesManagementClientImpl client) { - this.service = retrofit.create(CognitiveServicesAccountsService.class); - this.client = client; - } - - /** - * The interface defining all the services for CognitiveServicesAccounts to be - * used by Retrofit to perform actually REST calls. - */ - interface CognitiveServicesAccountsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccounts create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}") - Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body CognitiveServicesAccountCreateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccounts update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CognitiveServicesAccountUpdateParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccounts delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccounts getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccounts listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccounts regenerateKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey") - Observable> regenerateKey(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.CognitiveServicesAccounts listSkus" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus") - Observable> listSkus(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param parameters The parameters to provide for the created account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountInner object if successful. - */ - public CognitiveServicesAccountInner create(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParametersInner parameters) { - return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); - } - - /** - * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param parameters The parameters to provide for the created account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); - } - - /** - * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param parameters The parameters to provide for the created account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable createAsync(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParametersInner parameters) { - return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, CognitiveServicesAccountInner>() { - @Override - public CognitiveServicesAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param parameters The parameters to provide for the created account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.create(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountInner object if successful. - */ - public CognitiveServicesAccountInner update(String resourceGroupName, String accountName) { - return updateWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable updateAsync(String resourceGroupName, String accountName) { - return updateWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, CognitiveServicesAccountInner>() { - @Override - public CognitiveServicesAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final SkuInner sku = null; - final Map tags = null; - CognitiveServicesAccountUpdateParameters parameters = new CognitiveServicesAccountUpdateParameters(); - parameters.withSku(null); - parameters.withTags(null); - return service.update(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param sku Gets or sets the SKU of the resource. - * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountInner object if successful. - */ - public CognitiveServicesAccountInner update(String resourceGroupName, String accountName, SkuInner sku, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags).toBlocking().single().body(); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param sku Gets or sets the SKU of the resource. - * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String accountName, SkuInner sku, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags), serviceCallback); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param sku Gets or sets the SKU of the resource. - * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable updateAsync(String resourceGroupName, String accountName, SkuInner sku, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags).map(new Func1, CognitiveServicesAccountInner>() { - @Override - public CognitiveServicesAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param sku Gets or sets the SKU of the resource. - * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, SkuInner sku, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(sku); - Validator.validate(tags); - CognitiveServicesAccountUpdateParameters parameters = new CognitiveServicesAccountUpdateParameters(); - parameters.withSku(sku); - parameters.withTags(tags); - return service.update(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Deletes a Cognitive Services account from the resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String accountName) { - deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Deletes a Cognitive Services account from the resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Deletes a Cognitive Services account from the resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String accountName) { - return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a Cognitive Services account from the resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Returns a Cognitive Services account specified by the parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountInner object if successful. - */ - public CognitiveServicesAccountInner getByResourceGroup(String resourceGroupName, String accountName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Returns a Cognitive Services account specified by the parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Returns a Cognitive Services account specified by the parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String accountName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, CognitiveServicesAccountInner>() { - @Override - public CognitiveServicesAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Returns a Cognitive Services account specified by the parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Lists the account keys for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountKeysInner object if successful. - */ - public CognitiveServicesAccountKeysInner listKeys(String resourceGroupName, String accountName) { - return listKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * Lists the account keys for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * Lists the account keys for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String accountName) { - return listKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, CognitiveServicesAccountKeysInner>() { - @Override - public CognitiveServicesAccountKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists the account keys for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Regenerates the specified account key for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountKeysInner object if successful. - */ - public CognitiveServicesAccountKeysInner regenerateKey(String resourceGroupName, String accountName, KeyName keyName) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).toBlocking().single().body(); - } - - /** - * Regenerates the specified account key for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeyAsync(String resourceGroupName, String accountName, KeyName keyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName), serviceCallback); - } - - /** - * Regenerates the specified account key for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountKeysInner object - */ - public Observable regenerateKeyAsync(String resourceGroupName, String accountName, KeyName keyName) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).map(new Func1, CognitiveServicesAccountKeysInner>() { - @Override - public CognitiveServicesAccountKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the specified account key for the specified Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountKeysInner object - */ - public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String accountName, KeyName keyName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (keyName == null) { - throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); - } - RegenerateKeyParameters parameters = new RegenerateKeyParameters(); - parameters.withKeyName(keyName); - return service.regenerateKey(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeyDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * List available SKUs for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CognitiveServicesAccountEnumerateSkusResultInner object if successful. - */ - public CognitiveServicesAccountEnumerateSkusResultInner listSkus(String resourceGroupName, String accountName) { - return listSkusWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); - } - - /** - * List available SKUs for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listSkusAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listSkusWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); - } - - /** - * List available SKUs for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountEnumerateSkusResultInner object - */ - public Observable listSkusAsync(String resourceGroupName, String accountName) { - return listSkusWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, CognitiveServicesAccountEnumerateSkusResultInner>() { - @Override - public CognitiveServicesAccountEnumerateSkusResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * List available SKUs for the requested Cognitive Services account. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CognitiveServicesAccountEnumerateSkusResultInner object - */ - public Observable> listSkusWithServiceResponseAsync(String resourceGroupName, String accountName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (accountName == null) { - throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSkus(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listSkusDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listSkusDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java deleted file mode 100644 index 01a1c75ce12..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the CognitiveServicesManagementClientImpl class. - */ -public class CognitiveServicesManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Azure Subscription ID. */ - private String subscriptionId; - - /** - * Gets Azure Subscription ID. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Azure Subscription ID. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public CognitiveServicesManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Version of the API to be used with the client request. Current version is 2017-04-18. */ - private String apiVersion; - - /** - * Gets Version of the API to be used with the client request. Current version is 2017-04-18. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ - private String filter; - - /** - * Gets An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). - * - * @return the filter value. - */ - public String filter() { - return this.filter; - } - - /** - * Sets An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). - * - * @param filter the filter value. - * @return the service client itself - */ - public CognitiveServicesManagementClientImpl withFilter(String filter) { - this.filter = filter; - return this; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public CognitiveServicesManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public CognitiveServicesManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public CognitiveServicesManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The AccountsInner object to access its operations. - */ - private AccountsInner accounts; - - /** - * Gets the AccountsInner object to access its operations. - * @return the AccountsInner object. - */ - public AccountsInner accounts() { - return this.accounts; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * The CheckSkuAvailabilitysInner object to access its operations. - */ - private CheckSkuAvailabilitysInner checkSkuAvailabilitys; - - /** - * Gets the CheckSkuAvailabilitysInner object to access its operations. - * @return the CheckSkuAvailabilitysInner object. - */ - public CheckSkuAvailabilitysInner checkSkuAvailabilitys() { - return this.checkSkuAvailabilitys; - } - - /** - * Initializes an instance of CognitiveServicesManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public CognitiveServicesManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of CognitiveServicesManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public CognitiveServicesManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of CognitiveServicesManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public CognitiveServicesManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2017-04-18"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.accounts = new AccountsInner(restClient().retrofit(), this); - this.operations = new OperationsInner(restClient().retrofit(), this); - this.checkSkuAvailabilitys = new CheckSkuAvailabilitysInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "CognitiveServicesManagementClient", "2017-04-18"); - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesManager.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesManager.java deleted file mode 100644 index 6ff67b42ac4..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure CognitiveServices resource management. - */ -@Beta(Beta.SinceVersion.V1_2_0) -public final class CognitiveServicesManager extends Manager { - /** - * Get a Configurable instance that can be used to create CognitiveServicesManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new CognitiveServicesManager.ConfigurableImpl(); - } - /** - * Creates an instance of CognitiveServicesManager that exposes CognitiveServices resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the CognitiveServicesManager - */ - public static CognitiveServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new CognitiveServicesManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of CognitiveServicesManager that exposes CognitiveServices resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the CognitiveServicesManager - */ - public static CognitiveServicesManager authenticate(RestClient restClient, String subscriptionId) { - return new CognitiveServicesManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of CognitiveServicesManager that exposes CognitiveServices management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing CognitiveServices management API entry points that work across subscriptions - */ - CognitiveServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public CognitiveServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return CognitiveServicesManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private CognitiveServicesManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new CognitiveServicesManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/OperationEntityInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/OperationEntityInner.java deleted file mode 100644 index ed4042f0fda..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/OperationEntityInner.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.microsoft.azure.management.cognitiveservices.OperationDisplayInfo; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The operation supported by Cognitive Services. - */ -public class OperationEntityInner { - /** - * Operation name: {provider}/{resource}/{operation}. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The operation supported by Cognitive Services. - */ - @JsonProperty(value = "display") - private OperationDisplayInfo display; - - /** - * The origin of the operation. - */ - @JsonProperty(value = "origin") - private String origin; - - /** - * Additional properties. - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the OperationEntityInner object itself. - */ - public OperationEntityInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplayInfo display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the OperationEntityInner object itself. - */ - public OperationEntityInner withDisplay(OperationDisplayInfo display) { - this.display = display; - return this; - } - - /** - * Get the origin value. - * - * @return the origin value - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin value. - * - * @param origin the origin value to set - * @return the OperationEntityInner object itself. - */ - public OperationEntityInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the OperationEntityInner object itself. - */ - public OperationEntityInner withProperties(Object properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/OperationsInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/OperationsInner.java deleted file mode 100644 index be8df7a53bf..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/OperationsInner.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private CognitiveServicesManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, CognitiveServicesManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Operations list" }) - @GET("providers/Microsoft.CognitiveServices/operations") - Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationEntityInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationEntityInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationEntityInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationEntityInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationEntityInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationEntityInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all the available Cognitive Services account operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationEntityInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all the available Cognitive Services account operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationEntityInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/PageImpl.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/PageImpl.java deleted file mode 100644 index 79e3432c3e4..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/SkuInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/SkuInner.java deleted file mode 100644 index 3116d9432b6..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/SkuInner.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import com.microsoft.azure.management.cognitiveservices.SkuName; -import com.microsoft.azure.management.cognitiveservices.SkuTier; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The SKU of the cognitive services account. - */ -public class SkuInner { - /** - * Gets or sets the sku name. Required for account creation, optional for - * update. Possible values include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', - * 'S2', 'S3', 'S4', 'S5', 'S6'. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /** - * Gets the sku tier. This is based on the SKU name. Possible values - * include: 'Free', 'Standard', 'Premium'. - */ - @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) - private SkuTier tier; - - /** - * Get the name value. - * - * @return the name value - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the SkuInner object itself. - */ - public SkuInner withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Get the tier value. - * - * @return the tier value - */ - public SkuTier tier() { - return this.tier; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/UsagesResultInner.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/UsagesResultInner.java deleted file mode 100644 index ebf258060a9..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/UsagesResultInner.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.cognitiveservices.implementation; - -import java.util.List; -import com.microsoft.azure.management.cognitiveservices.Usage; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The response to a list usage request. - */ -public class UsagesResultInner { - /** - * The list of usages for Cognitive Service account. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - -} diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/package-info.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/package-info.java deleted file mode 100644 index 44b47415824..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for CognitiveServicesManagementClient. - * Cognitive Services Management Client. - */ -package com.microsoft.azure.management.cognitiveservices.implementation; diff --git a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/package-info.java b/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/package-info.java deleted file mode 100644 index 58c9fd96ce0..00000000000 --- a/azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for CognitiveServicesManagementClient. - * Cognitive Services Management Client. - */ -package com.microsoft.azure.management.cognitiveservices; diff --git a/azure-mgmt-consumption/pom.xml b/azure-mgmt-consumption/pom.xml deleted file mode 100644 index 25f6cae65f3..00000000000 --- a/azure-mgmt-consumption/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-consumption - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for Consumption Management - This package contains Microsoft Consumption Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/BudgetTimePeriod.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/BudgetTimePeriod.java deleted file mode 100644 index bc1c421c9d2..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/BudgetTimePeriod.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The start and end date for a budget. - */ -public class BudgetTimePeriod { - /** - * The start date for the budget. - */ - @JsonProperty(value = "startDate", required = true) - private DateTime startDate; - - /** - * The end date for the budget. If not provided, we default this to 10 - * years from the start date. - */ - @JsonProperty(value = "endDate") - private DateTime endDate; - - /** - * Get the startDate value. - * - * @return the startDate value - */ - public DateTime startDate() { - return this.startDate; - } - - /** - * Set the startDate value. - * - * @param startDate the startDate value to set - * @return the BudgetTimePeriod object itself. - */ - public BudgetTimePeriod withStartDate(DateTime startDate) { - this.startDate = startDate; - return this; - } - - /** - * Get the endDate value. - * - * @return the endDate value - */ - public DateTime endDate() { - return this.endDate; - } - - /** - * Set the endDate value. - * - * @param endDate the endDate value to set - * @return the BudgetTimePeriod object itself. - */ - public BudgetTimePeriod withEndDate(DateTime endDate) { - this.endDate = endDate; - return this; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/CategoryType.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/CategoryType.java deleted file mode 100644 index b0b47c2534e..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/CategoryType.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for CategoryType. - */ -public final class CategoryType extends ExpandableStringEnum { - /** Static value Cost for CategoryType. */ - public static final CategoryType COST = fromString("Cost"); - - /** Static value Usage for CategoryType. */ - public static final CategoryType USAGE = fromString("Usage"); - - /** - * Creates or finds a CategoryType from its string representation. - * @param name a name to look for - * @return the corresponding CategoryType - */ - @JsonCreator - public static CategoryType fromString(String name) { - return fromString(name, CategoryType.class); - } - - /** - * @return known CategoryType values - */ - public static Collection values() { - return values(CategoryType.class); - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/CurrentSpend.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/CurrentSpend.java deleted file mode 100644 index 4fd2c740996..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/CurrentSpend.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The current amount of cost which is being tracked for a budget. - */ -public class CurrentSpend { - /** - * The total amount of cost which is being tracked by the budget. - */ - @JsonProperty(value = "amount", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal amount; - - /** - * The unit of measure for the budget amount. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private String unit; - - /** - * Get the amount value. - * - * @return the amount value - */ - public BigDecimal amount() { - return this.amount; - } - - /** - * Get the unit value. - * - * @return the unit value - */ - public String unit() { - return this.unit; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Datagrain.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Datagrain.java deleted file mode 100644 index e2be247d31c..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Datagrain.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for Datagrain. - */ -public final class Datagrain extends ExpandableStringEnum { - /** Static value daily for Datagrain. */ - public static final Datagrain DAILY_GRAIN = fromString("daily"); - - /** Static value monthly for Datagrain. */ - public static final Datagrain MONTHLY_GRAIN = fromString("monthly"); - - /** - * Creates or finds a Datagrain from its string representation. - * @param name a name to look for - * @return the corresponding Datagrain - */ - @JsonCreator - public static Datagrain fromString(String name) { - return fromString(name, Datagrain.class); - } - - /** - * @return known Datagrain values - */ - public static Collection values() { - return values(Datagrain.class); - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorDetails.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorDetails.java deleted file mode 100644 index 4ce244e1f11..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorDetails.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The details of the error. - */ -public class ErrorDetails { - /** - * Error code. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * Error message indicating why the operation failed. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorResponse.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorResponse.java deleted file mode 100644 index ad511122d4d..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Error response indicates that the service is not able to process the - * incoming request. The reason is provided in the error message. - */ -public class ErrorResponse { - /** - * The details of the error. - */ - @JsonProperty(value = "error") - private ErrorDetails error; - - /** - * Get the error value. - * - * @return the error value - */ - public ErrorDetails error() { - return this.error; - } - - /** - * Set the error value. - * - * @param error the error value to set - * @return the ErrorResponse object itself. - */ - public ErrorResponse withError(ErrorDetails error) { - this.error = error; - return this; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorResponseException.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorResponseException.java deleted file mode 100644 index 3402698539d..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ErrorResponseException.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with ErrorResponse information. - */ -public class ErrorResponseException extends RestException { - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorResponseException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { - super(message, response, body); - } - - @Override - public ErrorResponse body() { - return (ErrorResponse) super.body(); - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Filters.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Filters.java deleted file mode 100644 index 927ea529c2c..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Filters.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * May be used to filter budgets by resource group, resource, or meter. - */ -public class Filters { - /** - * The list of filters on resource groups, allowed at subscription level - * only. - */ - @JsonProperty(value = "resourceGroups") - private List resourceGroups; - - /** - * The list of filters on resources. - */ - @JsonProperty(value = "resources") - private List resources; - - /** - * The list of filters on meters, mandatory for budgets of usage category. - */ - @JsonProperty(value = "meters") - private List meters; - - /** - * Get the resourceGroups value. - * - * @return the resourceGroups value - */ - public List resourceGroups() { - return this.resourceGroups; - } - - /** - * Set the resourceGroups value. - * - * @param resourceGroups the resourceGroups value to set - * @return the Filters object itself. - */ - public Filters withResourceGroups(List resourceGroups) { - this.resourceGroups = resourceGroups; - return this; - } - - /** - * Get the resources value. - * - * @return the resources value - */ - public List resources() { - return this.resources; - } - - /** - * Set the resources value. - * - * @param resources the resources value to set - * @return the Filters object itself. - */ - public Filters withResources(List resources) { - this.resources = resources; - return this; - } - - /** - * Get the meters value. - * - * @return the meters value - */ - public List meters() { - return this.meters; - } - - /** - * Set the meters value. - * - * @param meters the meters value to set - * @return the Filters object itself. - */ - public Filters withMeters(List meters) { - this.meters = meters; - return this; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/MeterDetails.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/MeterDetails.java deleted file mode 100644 index 6498bfec3ff..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/MeterDetails.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the meter detail. - */ -public class MeterDetails { - /** - * The name of the meter, within the given meter category. - */ - @JsonProperty(value = "meterName", access = JsonProperty.Access.WRITE_ONLY) - private String meterName; - - /** - * The category of the meter, for example, 'Cloud services', 'Networking', - * etc.. - */ - @JsonProperty(value = "meterCategory", access = JsonProperty.Access.WRITE_ONLY) - private String meterCategory; - - /** - * The subcategory of the meter, for example, 'A6 Cloud services', - * 'ExpressRoute (IXP)', etc.. - */ - @JsonProperty(value = "meterSubCategory", access = JsonProperty.Access.WRITE_ONLY) - private String meterSubCategory; - - /** - * The unit in which the meter consumption is charged, for example, - * 'Hours', 'GB', etc. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private String unit; - - /** - * The location in which the Azure service is available. - */ - @JsonProperty(value = "meterLocation", access = JsonProperty.Access.WRITE_ONLY) - private String meterLocation; - - /** - * The total included quantity associated with the offer. - */ - @JsonProperty(value = "totalIncludedQuantity", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal totalIncludedQuantity; - - /** - * The pretax listing price. - */ - @JsonProperty(value = "pretaxStandardRate", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal pretaxStandardRate; - - /** - * Get the meterName value. - * - * @return the meterName value - */ - public String meterName() { - return this.meterName; - } - - /** - * Get the meterCategory value. - * - * @return the meterCategory value - */ - public String meterCategory() { - return this.meterCategory; - } - - /** - * Get the meterSubCategory value. - * - * @return the meterSubCategory value - */ - public String meterSubCategory() { - return this.meterSubCategory; - } - - /** - * Get the unit value. - * - * @return the unit value - */ - public String unit() { - return this.unit; - } - - /** - * Get the meterLocation value. - * - * @return the meterLocation value - */ - public String meterLocation() { - return this.meterLocation; - } - - /** - * Get the totalIncludedQuantity value. - * - * @return the totalIncludedQuantity value - */ - public BigDecimal totalIncludedQuantity() { - return this.totalIncludedQuantity; - } - - /** - * Get the pretaxStandardRate value. - * - * @return the pretaxStandardRate value - */ - public BigDecimal pretaxStandardRate() { - return this.pretaxStandardRate; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Notification.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Notification.java deleted file mode 100644 index 14636888e00..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/Notification.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.math.BigDecimal; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The notification associated with a budget. - */ -public class Notification { - /** - * The notification is enabled or not. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /** - * The comparison operator. Possible values include: 'EqualTo', - * 'GreaterThan', 'GreaterThanOrEqualTo'. - */ - @JsonProperty(value = "operator", required = true) - private OperatorType operator; - - /** - * Threshold value associated with a notification. Notification is sent - * when the cost exceeded the threshold. It is always percent and has to be - * between 0 and 1000. - */ - @JsonProperty(value = "threshold", required = true) - private BigDecimal threshold; - - /** - * Email addresses to send the budget notification to when the threshold is - * exceeded. - */ - @JsonProperty(value = "contactEmails", required = true) - private List contactEmails; - - /** - * Contact roles to send the budget notification to when the threshold is - * exceeded. - */ - @JsonProperty(value = "contactRoles") - private List contactRoles; - - /** - * Action groups to send the budget notification to when the threshold is - * exceeded. - */ - @JsonProperty(value = "contactGroups") - private List contactGroups; - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the Notification object itself. - */ - public Notification withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the operator value. - * - * @return the operator value - */ - public OperatorType operator() { - return this.operator; - } - - /** - * Set the operator value. - * - * @param operator the operator value to set - * @return the Notification object itself. - */ - public Notification withOperator(OperatorType operator) { - this.operator = operator; - return this; - } - - /** - * Get the threshold value. - * - * @return the threshold value - */ - public BigDecimal threshold() { - return this.threshold; - } - - /** - * Set the threshold value. - * - * @param threshold the threshold value to set - * @return the Notification object itself. - */ - public Notification withThreshold(BigDecimal threshold) { - this.threshold = threshold; - return this; - } - - /** - * Get the contactEmails value. - * - * @return the contactEmails value - */ - public List contactEmails() { - return this.contactEmails; - } - - /** - * Set the contactEmails value. - * - * @param contactEmails the contactEmails value to set - * @return the Notification object itself. - */ - public Notification withContactEmails(List contactEmails) { - this.contactEmails = contactEmails; - return this; - } - - /** - * Get the contactRoles value. - * - * @return the contactRoles value - */ - public List contactRoles() { - return this.contactRoles; - } - - /** - * Set the contactRoles value. - * - * @param contactRoles the contactRoles value to set - * @return the Notification object itself. - */ - public Notification withContactRoles(List contactRoles) { - this.contactRoles = contactRoles; - return this; - } - - /** - * Get the contactGroups value. - * - * @return the contactGroups value - */ - public List contactGroups() { - return this.contactGroups; - } - - /** - * Set the contactGroups value. - * - * @param contactGroups the contactGroups value to set - * @return the Notification object itself. - */ - public Notification withContactGroups(List contactGroups) { - this.contactGroups = contactGroups; - return this; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/OperationDisplay.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/OperationDisplay.java deleted file mode 100644 index e842c697588..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/OperationDisplay.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The object that represents the operation. - */ -public class OperationDisplay { - /** - * Service provider: Microsoft.Consumption. - */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) - private String provider; - - /** - * Resource on which the operation is performed: UsageDetail, etc. - */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) - private String resource; - - /** - * Operation type: Read, write, delete, etc. - */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/OperatorType.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/OperatorType.java deleted file mode 100644 index 64838677e88..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/OperatorType.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for OperatorType. - */ -public final class OperatorType extends ExpandableStringEnum { - /** Static value EqualTo for OperatorType. */ - public static final OperatorType EQUAL_TO = fromString("EqualTo"); - - /** Static value GreaterThan for OperatorType. */ - public static final OperatorType GREATER_THAN = fromString("GreaterThan"); - - /** Static value GreaterThanOrEqualTo for OperatorType. */ - public static final OperatorType GREATER_THAN_OR_EQUAL_TO = fromString("GreaterThanOrEqualTo"); - - /** - * Creates or finds a OperatorType from its string representation. - * @param name a name to look for - * @return the corresponding OperatorType - */ - @JsonCreator - public static OperatorType fromString(String name) { - return fromString(name, OperatorType.class); - } - - /** - * @return known OperatorType values - */ - public static Collection values() { - return values(OperatorType.class); - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/PriceSheetProperties.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/PriceSheetProperties.java deleted file mode 100644 index 1060fa5c902..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/PriceSheetProperties.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the price sheet. - */ -public class PriceSheetProperties { - /** - * The id of the billing period resource that the usage belongs to. - */ - @JsonProperty(value = "billingPeriodId", access = JsonProperty.Access.WRITE_ONLY) - private String billingPeriodId; - - /** - * The meter id. - */ - @JsonProperty(value = "meterId", access = JsonProperty.Access.WRITE_ONLY) - private String meterId; - - /** - * The details about the meter. By default this is not populated, unless - * it's specified in $expand. - */ - @JsonProperty(value = "meterDetails", access = JsonProperty.Access.WRITE_ONLY) - private MeterDetails meterDetails; - - /** - * Unit of measure. - */ - @JsonProperty(value = "unitOfMeasure", access = JsonProperty.Access.WRITE_ONLY) - private String unitOfMeasure; - - /** - * Included quality for an offer. - */ - @JsonProperty(value = "includedQuantity", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal includedQuantity; - - /** - * Part Number. - */ - @JsonProperty(value = "partNumber", access = JsonProperty.Access.WRITE_ONLY) - private String partNumber; - - /** - * Unit Price. - */ - @JsonProperty(value = "unitPrice", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal unitPrice; - - /** - * Currency Code. - */ - @JsonProperty(value = "currencyCode", access = JsonProperty.Access.WRITE_ONLY) - private String currencyCode; - - /** - * Get the billingPeriodId value. - * - * @return the billingPeriodId value - */ - public String billingPeriodId() { - return this.billingPeriodId; - } - - /** - * Get the meterId value. - * - * @return the meterId value - */ - public String meterId() { - return this.meterId; - } - - /** - * Get the meterDetails value. - * - * @return the meterDetails value - */ - public MeterDetails meterDetails() { - return this.meterDetails; - } - - /** - * Get the unitOfMeasure value. - * - * @return the unitOfMeasure value - */ - public String unitOfMeasure() { - return this.unitOfMeasure; - } - - /** - * Get the includedQuantity value. - * - * @return the includedQuantity value - */ - public BigDecimal includedQuantity() { - return this.includedQuantity; - } - - /** - * Get the partNumber value. - * - * @return the partNumber value - */ - public String partNumber() { - return this.partNumber; - } - - /** - * Get the unitPrice value. - * - * @return the unitPrice value - */ - public BigDecimal unitPrice() { - return this.unitPrice; - } - - /** - * Get the currencyCode value. - * - * @return the currencyCode value - */ - public String currencyCode() { - return this.currencyCode; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ProxyResource.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ProxyResource.java deleted file mode 100644 index 36f70c0b3e3..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/ProxyResource.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Resource model definition. - */ -public class ProxyResource { - /** - * Resource Id. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Resource name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * eTag of the resource. To handle concurrent update scenarion, this field - * will be used to determine whether the user is updating the latest - * version or not. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the ProxyResource object itself. - */ - public ProxyResource withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/TimeGrainType.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/TimeGrainType.java deleted file mode 100644 index 8017f7f6651..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/TimeGrainType.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for TimeGrainType. - */ -public final class TimeGrainType extends ExpandableStringEnum { - /** Static value Monthly for TimeGrainType. */ - public static final TimeGrainType MONTHLY = fromString("Monthly"); - - /** Static value Quarterly for TimeGrainType. */ - public static final TimeGrainType QUARTERLY = fromString("Quarterly"); - - /** Static value Annually for TimeGrainType. */ - public static final TimeGrainType ANNUALLY = fromString("Annually"); - - /** - * Creates or finds a TimeGrainType from its string representation. - * @param name a name to look for - * @return the corresponding TimeGrainType - */ - @JsonCreator - public static TimeGrainType fromString(String name) { - return fromString(name, TimeGrainType.class); - } - - /** - * @return known TimeGrainType values - */ - public static Collection values() { - return values(TimeGrainType.class); - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/BudgetInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/BudgetInner.java deleted file mode 100644 index 21f8f093155..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/BudgetInner.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import com.microsoft.azure.management.consumption.CategoryType; -import java.math.BigDecimal; -import com.microsoft.azure.management.consumption.TimeGrainType; -import com.microsoft.azure.management.consumption.BudgetTimePeriod; -import com.microsoft.azure.management.consumption.Filters; -import com.microsoft.azure.management.consumption.CurrentSpend; -import java.util.Map; -import com.microsoft.azure.management.consumption.Notification; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.consumption.ProxyResource; - -/** - * A budget resource. - */ -@JsonFlatten -public class BudgetInner extends ProxyResource { - /** - * The category of the budget, whether the budget tracks cost or usage. - * Possible values include: 'Cost', 'Usage'. - */ - @JsonProperty(value = "properties.category", required = true) - private CategoryType category; - - /** - * The total amount of cost to track with the budget. - */ - @JsonProperty(value = "properties.amount", required = true) - private BigDecimal amount; - - /** - * The time covered by a budget. Tracking of the amount will be reset based - * on the time grain. Possible values include: 'Monthly', 'Quarterly', - * 'Annually'. - */ - @JsonProperty(value = "properties.timeGrain", required = true) - private TimeGrainType timeGrain; - - /** - * Has start and end date of the budget. The start date must be first of - * the month and should be less than the end date. Budget start date must - * be on or after June 1, 2017. Future start date should not be more than - * three months. Past start date should be selected within the timegrain - * preiod. There are no restrictions on the end date. - */ - @JsonProperty(value = "properties.timePeriod", required = true) - private BudgetTimePeriod timePeriod; - - /** - * May be used to filter budgets by resource group, resource, or meter. - */ - @JsonProperty(value = "properties.filters") - private Filters filters; - - /** - * The current amount of cost which is being tracked for a budget. - */ - @JsonProperty(value = "properties.currentSpend", access = JsonProperty.Access.WRITE_ONLY) - private CurrentSpend currentSpend; - - /** - * Dictionary of notifications associated with the budget. Budget can have - * up to five notifications. - */ - @JsonProperty(value = "properties.notifications") - private Map notifications; - - /** - * Get the category value. - * - * @return the category value - */ - public CategoryType category() { - return this.category; - } - - /** - * Set the category value. - * - * @param category the category value to set - * @return the BudgetInner object itself. - */ - public BudgetInner withCategory(CategoryType category) { - this.category = category; - return this; - } - - /** - * Get the amount value. - * - * @return the amount value - */ - public BigDecimal amount() { - return this.amount; - } - - /** - * Set the amount value. - * - * @param amount the amount value to set - * @return the BudgetInner object itself. - */ - public BudgetInner withAmount(BigDecimal amount) { - this.amount = amount; - return this; - } - - /** - * Get the timeGrain value. - * - * @return the timeGrain value - */ - public TimeGrainType timeGrain() { - return this.timeGrain; - } - - /** - * Set the timeGrain value. - * - * @param timeGrain the timeGrain value to set - * @return the BudgetInner object itself. - */ - public BudgetInner withTimeGrain(TimeGrainType timeGrain) { - this.timeGrain = timeGrain; - return this; - } - - /** - * Get the timePeriod value. - * - * @return the timePeriod value - */ - public BudgetTimePeriod timePeriod() { - return this.timePeriod; - } - - /** - * Set the timePeriod value. - * - * @param timePeriod the timePeriod value to set - * @return the BudgetInner object itself. - */ - public BudgetInner withTimePeriod(BudgetTimePeriod timePeriod) { - this.timePeriod = timePeriod; - return this; - } - - /** - * Get the filters value. - * - * @return the filters value - */ - public Filters filters() { - return this.filters; - } - - /** - * Set the filters value. - * - * @param filters the filters value to set - * @return the BudgetInner object itself. - */ - public BudgetInner withFilters(Filters filters) { - this.filters = filters; - return this; - } - - /** - * Get the currentSpend value. - * - * @return the currentSpend value - */ - public CurrentSpend currentSpend() { - return this.currentSpend; - } - - /** - * Get the notifications value. - * - * @return the notifications value - */ - public Map notifications() { - return this.notifications; - } - - /** - * Set the notifications value. - * - * @param notifications the notifications value to set - * @return the BudgetInner object itself. - */ - public BudgetInner withNotifications(Map notifications) { - this.notifications = notifications; - return this; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/BudgetsInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/BudgetsInner.java deleted file mode 100644 index 859139940f2..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/BudgetsInner.java +++ /dev/null @@ -1,1063 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.consumption.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Budgets. - */ -public class BudgetsInner implements InnerSupportsGet, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private BudgetsService service; - /** The service client containing this operation class. */ - private ConsumptionManagementClientImpl client; - - /** - * Initializes an instance of BudgetsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public BudgetsInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { - this.service = retrofit.create(BudgetsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Budgets to be - * used by Retrofit to perform actually REST calls. - */ - interface BudgetsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets get" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("budgetName") String budgetName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("budgetName") String budgetName, @Query("api-version") String apiVersion, @Body BudgetInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("budgetName") String budgetName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("budgetName") String budgetName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets createOrUpdateByResourceGroupName" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}") - Observable> createOrUpdateByResourceGroupName(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("budgetName") String budgetName, @Query("api-version") String apiVersion, @Body BudgetInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets deleteByResourceGroupName" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}", method = "DELETE", hasBody = true) - Observable> deleteByResourceGroupName(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("budgetName") String budgetName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Budgets listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all budgets for a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BudgetInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all budgets for a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all budgets for a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BudgetInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all budgets for a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BudgetInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all budgets for a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BudgetInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all budgets for a resource group under a subscription. - * - * @param resourceGroupName Azure Resource Group Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BudgetInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all budgets for a resource group under a subscription. - * - * @param resourceGroupName Azure Resource Group Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all budgets for a resource group under a subscription. - * - * @param resourceGroupName Azure Resource Group Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BudgetInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all budgets for a resource group under a subscription. - * - * @param resourceGroupName Azure Resource Group Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BudgetInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all budgets for a resource group under a subscription. - * - ServiceResponse> * @param resourceGroupName Azure Resource Group Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BudgetInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the budget for a subscription by budget name. - * - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BudgetInner object if successful. - */ - public BudgetInner get(String budgetName) { - return getWithServiceResponseAsync(budgetName).toBlocking().single().body(); - } - - /** - * Gets the budget for a subscription by budget name. - * - * @param budgetName Budget Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String budgetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(budgetName), serviceCallback); - } - - /** - * Gets the budget for a subscription by budget name. - * - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BudgetInner object - */ - public Observable getAsync(String budgetName) { - return getWithServiceResponseAsync(budgetName).map(new Func1, BudgetInner>() { - @Override - public BudgetInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the budget for a subscription by budget name. - * - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BudgetInner object - */ - public Observable> getWithServiceResponseAsync(String budgetName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (budgetName == null) { - throw new IllegalArgumentException("Parameter budgetName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), budgetName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - * - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BudgetInner object if successful. - */ - public BudgetInner createOrUpdate(String budgetName, BudgetInner parameters) { - return createOrUpdateWithServiceResponseAsync(budgetName, parameters).toBlocking().single().body(); - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - * - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String budgetName, BudgetInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(budgetName, parameters), serviceCallback); - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - * - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BudgetInner object - */ - public Observable createOrUpdateAsync(String budgetName, BudgetInner parameters) { - return createOrUpdateWithServiceResponseAsync(budgetName, parameters).map(new Func1, BudgetInner>() { - @Override - public BudgetInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - * - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BudgetInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String budgetName, BudgetInner parameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (budgetName == null) { - throw new IllegalArgumentException("Parameter budgetName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(this.client.subscriptionId(), budgetName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * The operation to delete a budget. - * - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String budgetName) { - deleteWithServiceResponseAsync(budgetName).toBlocking().single().body(); - } - - /** - * The operation to delete a budget. - * - * @param budgetName Budget Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String budgetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(budgetName), serviceCallback); - } - - /** - * The operation to delete a budget. - * - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String budgetName) { - return deleteWithServiceResponseAsync(budgetName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to delete a budget. - * - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String budgetName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (budgetName == null) { - throw new IllegalArgumentException("Parameter budgetName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), budgetName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets the budget for a resource group under a subscription by budget name. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BudgetInner object if successful. - */ - public BudgetInner getByResourceGroup(String resourceGroupName, String budgetName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, budgetName).toBlocking().single().body(); - } - - /** - * Gets the budget for a resource group under a subscription by budget name. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String budgetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, budgetName), serviceCallback); - } - - /** - * Gets the budget for a resource group under a subscription by budget name. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BudgetInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String budgetName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, budgetName).map(new Func1, BudgetInner>() { - @Override - public BudgetInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the budget for a resource group under a subscription by budget name. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BudgetInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String budgetName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (budgetName == null) { - throw new IllegalArgumentException("Parameter budgetName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, budgetName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BudgetInner object if successful. - */ - public BudgetInner createOrUpdateByResourceGroupName(String resourceGroupName, String budgetName, BudgetInner parameters) { - return createOrUpdateByResourceGroupNameWithServiceResponseAsync(resourceGroupName, budgetName, parameters).toBlocking().single().body(); - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateByResourceGroupNameAsync(String resourceGroupName, String budgetName, BudgetInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateByResourceGroupNameWithServiceResponseAsync(resourceGroupName, budgetName, parameters), serviceCallback); - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BudgetInner object - */ - public Observable createOrUpdateByResourceGroupNameAsync(String resourceGroupName, String budgetName, BudgetInner parameters) { - return createOrUpdateByResourceGroupNameWithServiceResponseAsync(resourceGroupName, budgetName, parameters).map(new Func1, BudgetInner>() { - @Override - public BudgetInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BudgetInner object - */ - public Observable> createOrUpdateByResourceGroupNameWithServiceResponseAsync(String resourceGroupName, String budgetName, BudgetInner parameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (budgetName == null) { - throw new IllegalArgumentException("Parameter budgetName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdateByResourceGroupName(this.client.subscriptionId(), resourceGroupName, budgetName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateByResourceGroupNameDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateByResourceGroupNameDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * The operation to delete a budget. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteByResourceGroupName(String resourceGroupName, String budgetName) { - deleteByResourceGroupNameWithServiceResponseAsync(resourceGroupName, budgetName).toBlocking().single().body(); - } - - /** - * The operation to delete a budget. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteByResourceGroupNameAsync(String resourceGroupName, String budgetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteByResourceGroupNameWithServiceResponseAsync(resourceGroupName, budgetName), serviceCallback); - } - - /** - * The operation to delete a budget. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteByResourceGroupNameAsync(String resourceGroupName, String budgetName) { - return deleteByResourceGroupNameWithServiceResponseAsync(resourceGroupName, budgetName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to delete a budget. - * - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteByResourceGroupNameWithServiceResponseAsync(String resourceGroupName, String budgetName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (budgetName == null) { - throw new IllegalArgumentException("Parameter budgetName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteByResourceGroupName(this.client.subscriptionId(), resourceGroupName, budgetName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteByResourceGroupNameDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteByResourceGroupNameDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all budgets for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BudgetInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all budgets for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all budgets for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BudgetInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all budgets for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BudgetInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all budgets for a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BudgetInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all budgets for a resource group under a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<BudgetInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all budgets for a resource group under a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all budgets for a resource group under a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BudgetInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all budgets for a resource group under a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BudgetInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all budgets for a resource group under a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BudgetInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ConsumptionManagementClientImpl.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ConsumptionManagementClientImpl.java deleted file mode 100644 index ffe5b6bfd79..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ConsumptionManagementClientImpl.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the ConsumptionManagementClientImpl class. - */ -public class ConsumptionManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Version of the API to be used with the client request. The current version is 2018-01-31. */ - private String apiVersion; - - /** - * Gets Version of the API to be used with the client request. The current version is 2018-01-31. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Azure Subscription ID. */ - private String subscriptionId; - - /** - * Gets Azure Subscription ID. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Azure Subscription ID. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public ConsumptionManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public ConsumptionManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public ConsumptionManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public ConsumptionManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The UsageDetailsInner object to access its operations. - */ - private UsageDetailsInner usageDetails; - - /** - * Gets the UsageDetailsInner object to access its operations. - * @return the UsageDetailsInner object. - */ - public UsageDetailsInner usageDetails() { - return this.usageDetails; - } - - /** - * The MarketplacesInner object to access its operations. - */ - private MarketplacesInner marketplaces; - - /** - * Gets the MarketplacesInner object to access its operations. - * @return the MarketplacesInner object. - */ - public MarketplacesInner marketplaces() { - return this.marketplaces; - } - - /** - * The ReservationsSummariesInner object to access its operations. - */ - private ReservationsSummariesInner reservationsSummaries; - - /** - * Gets the ReservationsSummariesInner object to access its operations. - * @return the ReservationsSummariesInner object. - */ - public ReservationsSummariesInner reservationsSummaries() { - return this.reservationsSummaries; - } - - /** - * The ReservationsDetailsInner object to access its operations. - */ - private ReservationsDetailsInner reservationsDetails; - - /** - * Gets the ReservationsDetailsInner object to access its operations. - * @return the ReservationsDetailsInner object. - */ - public ReservationsDetailsInner reservationsDetails() { - return this.reservationsDetails; - } - - /** - * The BudgetsInner object to access its operations. - */ - private BudgetsInner budgets; - - /** - * Gets the BudgetsInner object to access its operations. - * @return the BudgetsInner object. - */ - public BudgetsInner budgets() { - return this.budgets; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * The PriceSheetsInner object to access its operations. - */ - private PriceSheetsInner priceSheets; - - /** - * Gets the PriceSheetsInner object to access its operations. - * @return the PriceSheetsInner object. - */ - public PriceSheetsInner priceSheets() { - return this.priceSheets; - } - - /** - * Initializes an instance of ConsumptionManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public ConsumptionManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of ConsumptionManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public ConsumptionManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of ConsumptionManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public ConsumptionManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2018-01-31"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.usageDetails = new UsageDetailsInner(restClient().retrofit(), this); - this.marketplaces = new MarketplacesInner(restClient().retrofit(), this); - this.reservationsSummaries = new ReservationsSummariesInner(restClient().retrofit(), this); - this.reservationsDetails = new ReservationsDetailsInner(restClient().retrofit(), this); - this.budgets = new BudgetsInner(restClient().retrofit(), this); - this.operations = new OperationsInner(restClient().retrofit(), this); - this.priceSheets = new PriceSheetsInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "ConsumptionManagementClient", "2018-01-31"); - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ConsumptionManager.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ConsumptionManager.java deleted file mode 100644 index 57277fad70e..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ConsumptionManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure Consumption resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class ConsumptionManager extends Manager { - /** - * Get a Configurable instance that can be used to create ConsumptionManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new ConsumptionManager.ConfigurableImpl(); - } - /** - * Creates an instance of ConsumptionManager that exposes Consumption resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the ConsumptionManager - */ - public static ConsumptionManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new ConsumptionManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .build(), subscriptionId); - } - /** - * Creates an instance of ConsumptionManager that exposes Consumption resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the ConsumptionManager - */ - public static ConsumptionManager authenticate(RestClient restClient, String subscriptionId) { - return new ConsumptionManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of ConsumptionManager that exposes Consumption management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing Consumption management API entry points that work across subscriptions - */ - ConsumptionManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public ConsumptionManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return ConsumptionManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private ConsumptionManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new ConsumptionManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/MarketplaceInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/MarketplaceInner.java deleted file mode 100644 index 31bbb1dc3d2..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/MarketplaceInner.java +++ /dev/null @@ -1,384 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import org.joda.time.DateTime; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * An marketplace resource. - */ -@JsonFlatten -public class MarketplaceInner extends Resource { - /** - * The id of the billing period resource that the usage belongs to. - */ - @JsonProperty(value = "properties.billingPeriodId", access = JsonProperty.Access.WRITE_ONLY) - private String billingPeriodId; - - /** - * The start of the date time range covered by the usage detail. - */ - @JsonProperty(value = "properties.usageStart", access = JsonProperty.Access.WRITE_ONLY) - private DateTime usageStart; - - /** - * The end of the date time range covered by the usage detail. - */ - @JsonProperty(value = "properties.usageEnd", access = JsonProperty.Access.WRITE_ONLY) - private DateTime usageEnd; - - /** - * The marketplace resource rate. - */ - @JsonProperty(value = "properties.resourceRate", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal resourceRate; - - /** - * The type of offer. - */ - @JsonProperty(value = "properties.offerName", access = JsonProperty.Access.WRITE_ONLY) - private String offerName; - - /** - * The name of resource group. - */ - @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGroup; - - /** - * The order number. - */ - @JsonProperty(value = "properties.orderNumber", access = JsonProperty.Access.WRITE_ONLY) - private String orderNumber; - - /** - * The name of the resource instance that the usage is about. - */ - @JsonProperty(value = "properties.instanceName", access = JsonProperty.Access.WRITE_ONLY) - private String instanceName; - - /** - * The uri of the resource instance that the usage is about. - */ - @JsonProperty(value = "properties.instanceId", access = JsonProperty.Access.WRITE_ONLY) - private String instanceId; - - /** - * The ISO currency in which the meter is charged, for example, USD. - */ - @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY) - private String currency; - - /** - * The quantity of usage. - */ - @JsonProperty(value = "properties.consumedQuantity", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal consumedQuantity; - - /** - * The unit of measure. - */ - @JsonProperty(value = "properties.unitOfMeasure", access = JsonProperty.Access.WRITE_ONLY) - private String unitOfMeasure; - - /** - * The amount of cost before tax. - */ - @JsonProperty(value = "properties.pretaxCost", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal pretaxCost; - - /** - * The estimated usage is subject to change. - */ - @JsonProperty(value = "properties.isEstimated", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEstimated; - - /** - * The meter id. - */ - @JsonProperty(value = "properties.meterId", access = JsonProperty.Access.WRITE_ONLY) - private String meterId; - - /** - * Subscription guid. - */ - @JsonProperty(value = "properties.subscriptionGuid", access = JsonProperty.Access.WRITE_ONLY) - private String subscriptionGuid; - - /** - * Subscription name. - */ - @JsonProperty(value = "properties.subscriptionName", access = JsonProperty.Access.WRITE_ONLY) - private String subscriptionName; - - /** - * Account name. - */ - @JsonProperty(value = "properties.accountName", access = JsonProperty.Access.WRITE_ONLY) - private String accountName; - - /** - * Department name. - */ - @JsonProperty(value = "properties.departmentName", access = JsonProperty.Access.WRITE_ONLY) - private String departmentName; - - /** - * Consumed service name. - */ - @JsonProperty(value = "properties.consumedService", access = JsonProperty.Access.WRITE_ONLY) - private String consumedService; - - /** - * The cost center of this department if it is a department and a - * costcenter exists. - */ - @JsonProperty(value = "properties.costCenter", access = JsonProperty.Access.WRITE_ONLY) - private String costCenter; - - /** - * Additional details of this usage item. By default this is not populated, - * unless it's specified in $expand. - */ - @JsonProperty(value = "properties.additionalProperties", access = JsonProperty.Access.WRITE_ONLY) - private String additionalProperties; - - /** - * The name of publisher. - */ - @JsonProperty(value = "properties.publisherName", access = JsonProperty.Access.WRITE_ONLY) - private String publisherName; - - /** - * The name of plan. - */ - @JsonProperty(value = "properties.planName", access = JsonProperty.Access.WRITE_ONLY) - private String planName; - - /** - * Get the billingPeriodId value. - * - * @return the billingPeriodId value - */ - public String billingPeriodId() { - return this.billingPeriodId; - } - - /** - * Get the usageStart value. - * - * @return the usageStart value - */ - public DateTime usageStart() { - return this.usageStart; - } - - /** - * Get the usageEnd value. - * - * @return the usageEnd value - */ - public DateTime usageEnd() { - return this.usageEnd; - } - - /** - * Get the resourceRate value. - * - * @return the resourceRate value - */ - public BigDecimal resourceRate() { - return this.resourceRate; - } - - /** - * Get the offerName value. - * - * @return the offerName value - */ - public String offerName() { - return this.offerName; - } - - /** - * Get the resourceGroup value. - * - * @return the resourceGroup value - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Get the orderNumber value. - * - * @return the orderNumber value - */ - public String orderNumber() { - return this.orderNumber; - } - - /** - * Get the instanceName value. - * - * @return the instanceName value - */ - public String instanceName() { - return this.instanceName; - } - - /** - * Get the instanceId value. - * - * @return the instanceId value - */ - public String instanceId() { - return this.instanceId; - } - - /** - * Get the currency value. - * - * @return the currency value - */ - public String currency() { - return this.currency; - } - - /** - * Get the consumedQuantity value. - * - * @return the consumedQuantity value - */ - public BigDecimal consumedQuantity() { - return this.consumedQuantity; - } - - /** - * Get the unitOfMeasure value. - * - * @return the unitOfMeasure value - */ - public String unitOfMeasure() { - return this.unitOfMeasure; - } - - /** - * Get the pretaxCost value. - * - * @return the pretaxCost value - */ - public BigDecimal pretaxCost() { - return this.pretaxCost; - } - - /** - * Get the isEstimated value. - * - * @return the isEstimated value - */ - public Boolean isEstimated() { - return this.isEstimated; - } - - /** - * Get the meterId value. - * - * @return the meterId value - */ - public String meterId() { - return this.meterId; - } - - /** - * Get the subscriptionGuid value. - * - * @return the subscriptionGuid value - */ - public String subscriptionGuid() { - return this.subscriptionGuid; - } - - /** - * Get the subscriptionName value. - * - * @return the subscriptionName value - */ - public String subscriptionName() { - return this.subscriptionName; - } - - /** - * Get the accountName value. - * - * @return the accountName value - */ - public String accountName() { - return this.accountName; - } - - /** - * Get the departmentName value. - * - * @return the departmentName value - */ - public String departmentName() { - return this.departmentName; - } - - /** - * Get the consumedService value. - * - * @return the consumedService value - */ - public String consumedService() { - return this.consumedService; - } - - /** - * Get the costCenter value. - * - * @return the costCenter value - */ - public String costCenter() { - return this.costCenter; - } - - /** - * Get the additionalProperties value. - * - * @return the additionalProperties value - */ - public String additionalProperties() { - return this.additionalProperties; - } - - /** - * Get the publisherName value. - * - * @return the publisherName value - */ - public String publisherName() { - return this.publisherName; - } - - /** - * Get the planName value. - * - * @return the planName value - */ - public String planName() { - return this.planName; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/MarketplacesInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/MarketplacesInner.java deleted file mode 100644 index d128adbd5a8..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/MarketplacesInner.java +++ /dev/null @@ -1,765 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.consumption.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Marketplaces. - */ -public class MarketplacesInner { - /** The Retrofit service to perform REST calls. */ - private MarketplacesService service; - /** The service client containing this operation class. */ - private ConsumptionManagementClientImpl client; - - /** - * Initializes an instance of MarketplacesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public MarketplacesInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { - this.service = retrofit.create(MarketplacesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Marketplaces to be - * used by Retrofit to perform actually REST calls. - */ - interface MarketplacesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Marketplaces list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Consumption/marketplaces") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skiptoken") String skiptoken, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Marketplaces listByBillingPeriod" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces") - Observable> listByBillingPeriod(@Path("subscriptionId") String subscriptionId, @Path("billingPeriodName") String billingPeriodName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skiptoken") String skiptoken, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Marketplaces listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Marketplaces listByBillingPeriodNext" }) - @GET - Observable> listByBillingPeriodNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<MarketplaceInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<MarketplaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final String skiptoken = null; - return service.list(this.client.subscriptionId(), filter, top, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param top May be used to limit the number of results to the most recent N marketplaces. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<MarketplaceInner> object if successful. - */ - public PagedList list(final String filter, final Integer top, final String skiptoken) { - ServiceResponse> response = listSinglePageAsync(filter, top, skiptoken).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param top May be used to limit the number of results to the most recent N marketplaces. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String filter, final Integer top, final String skiptoken, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(filter, top, skiptoken), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param top May be used to limit the number of results to the most recent N marketplaces. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable> listAsync(final String filter, final Integer top, final String skiptoken) { - return listWithServiceResponseAsync(filter, top, skiptoken) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param top May be used to limit the number of results to the most recent N marketplaces. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable>> listWithServiceResponseAsync(final String filter, final Integer top, final String skiptoken) { - return listSinglePageAsync(filter, top, skiptoken) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - ServiceResponse> * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - ServiceResponse> * @param top May be used to limit the number of results to the most recent N marketplaces. - ServiceResponse> * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<MarketplaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String filter, final Integer top, final String skiptoken) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), filter, top, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<MarketplaceInner> object if successful. - */ - public PagedList listByBillingPeriod(final String billingPeriodName) { - ServiceResponse> response = listByBillingPeriodSinglePageAsync(billingPeriodName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByBillingPeriodAsync(final String billingPeriodName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByBillingPeriodSinglePageAsync(billingPeriodName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable> listByBillingPeriodAsync(final String billingPeriodName) { - return listByBillingPeriodWithServiceResponseAsync(billingPeriodName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable>> listByBillingPeriodWithServiceResponseAsync(final String billingPeriodName) { - return listByBillingPeriodSinglePageAsync(billingPeriodName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByBillingPeriodNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<MarketplaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByBillingPeriodSinglePageAsync(final String billingPeriodName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (billingPeriodName == null) { - throw new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final String skiptoken = null; - return service.listByBillingPeriod(this.client.subscriptionId(), billingPeriodName, filter, top, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByBillingPeriodDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param top May be used to limit the number of results to the most recent N marketplaces. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<MarketplaceInner> object if successful. - */ - public PagedList listByBillingPeriod(final String billingPeriodName, final String filter, final Integer top, final String skiptoken) { - ServiceResponse> response = listByBillingPeriodSinglePageAsync(billingPeriodName, filter, top, skiptoken).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param top May be used to limit the number of results to the most recent N marketplaces. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByBillingPeriodAsync(final String billingPeriodName, final String filter, final Integer top, final String skiptoken, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByBillingPeriodSinglePageAsync(billingPeriodName, filter, top, skiptoken), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param top May be used to limit the number of results to the most recent N marketplaces. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable> listByBillingPeriodAsync(final String billingPeriodName, final String filter, final Integer top, final String skiptoken) { - return listByBillingPeriodWithServiceResponseAsync(billingPeriodName, filter, top, skiptoken) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param top May be used to limit the number of results to the most recent N marketplaces. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable>> listByBillingPeriodWithServiceResponseAsync(final String billingPeriodName, final String filter, final Integer top, final String skiptoken) { - return listByBillingPeriodSinglePageAsync(billingPeriodName, filter, top, skiptoken) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByBillingPeriodNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - ServiceResponse> * @param billingPeriodName Billing Period Name. - ServiceResponse> * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - ServiceResponse> * @param top May be used to limit the number of results to the most recent N marketplaces. - ServiceResponse> * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<MarketplaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByBillingPeriodSinglePageAsync(final String billingPeriodName, final String filter, final Integer top, final String skiptoken) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (billingPeriodName == null) { - throw new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByBillingPeriod(this.client.subscriptionId(), billingPeriodName, filter, top, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByBillingPeriodDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByBillingPeriodDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<MarketplaceInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<MarketplaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<MarketplaceInner> object if successful. - */ - public PagedList listByBillingPeriodNext(final String nextPageLink) { - ServiceResponse> response = listByBillingPeriodNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByBillingPeriodNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByBillingPeriodNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable> listByBillingPeriodNextAsync(final String nextPageLink) { - return listByBillingPeriodNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<MarketplaceInner> object - */ - public Observable>> listByBillingPeriodNextWithServiceResponseAsync(final String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByBillingPeriodNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are available via this API only for May 1, 2014 or later. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<MarketplaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByBillingPeriodNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByBillingPeriodNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByBillingPeriodNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByBillingPeriodNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/OperationInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/OperationInner.java deleted file mode 100644 index ff552fe3253..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/OperationInner.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import com.microsoft.azure.management.consumption.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A Consumption REST API operation. - */ -public class OperationInner { - /** - * Operation name: {provider}/{resource}/{operation}. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * The object that represents the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/OperationsInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/OperationsInner.java deleted file mode 100644 index 26fae08947c..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/OperationsInner.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.consumption.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private ConsumptionManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Operations list" }) - @GET("providers/Microsoft.Consumption/operations") - Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available consumption REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available consumption REST API operations. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available consumption REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available consumption REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available consumption REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all of the available consumption REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available consumption REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available consumption REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available consumption REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available consumption REST API operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PageImpl.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PageImpl.java deleted file mode 100644 index 745c6731597..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PageImpl1.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PageImpl1.java deleted file mode 100644 index 5baf49fdda1..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PageImpl1.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl1 implements Page { - /** - * The link to the next page. - */ - @JsonProperty("") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl1 setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl1 setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PriceSheetResultInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PriceSheetResultInner.java deleted file mode 100644 index 80d5afbf3f3..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PriceSheetResultInner.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import java.util.List; -import com.microsoft.azure.management.consumption.PriceSheetProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * An pricesheet resource. - */ -@JsonFlatten -public class PriceSheetResultInner extends Resource { - /** - * Price sheet. - */ - @JsonProperty(value = "properties.pricesheets", access = JsonProperty.Access.WRITE_ONLY) - private List pricesheets; - - /** - * The link (url) to the next page of results. - */ - @JsonProperty(value = "properties.nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the pricesheets value. - * - * @return the pricesheets value - */ - public List pricesheets() { - return this.pricesheets; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PriceSheetsInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PriceSheetsInner.java deleted file mode 100644 index 95b179524e5..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/PriceSheetsInner.java +++ /dev/null @@ -1,372 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.consumption.ErrorResponseException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in PriceSheets. - */ -public class PriceSheetsInner { - /** The Retrofit service to perform REST calls. */ - private PriceSheetsService service; - /** The service client containing this operation class. */ - private ConsumptionManagementClientImpl client; - - /** - * Initializes an instance of PriceSheetsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public PriceSheetsInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { - this.service = retrofit.create(PriceSheetsService.class); - this.client = client; - } - - /** - * The interface defining all the services for PriceSheets to be - * used by Retrofit to perform actually REST calls. - */ - interface PriceSheetsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.PriceSheets get" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default") - Observable> get(@Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("$skiptoken") String skiptoken, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.PriceSheets getByBillingPeriod" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default") - Observable> getByBillingPeriod(@Path("subscriptionId") String subscriptionId, @Path("billingPeriodName") String billingPeriodName, @Query("$expand") String expand, @Query("$skiptoken") String skiptoken, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PriceSheetResultInner object if successful. - */ - public PriceSheetResultInner get() { - return getWithServiceResponseAsync().toBlocking().single().body(); - } - - /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(), serviceCallback); - } - - /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PriceSheetResultInner object - */ - public Observable getAsync() { - return getWithServiceResponseAsync().map(new Func1, PriceSheetResultInner>() { - @Override - public PriceSheetResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PriceSheetResultInner object - */ - public Observable> getWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String skiptoken = null; - return service.get(this.client.subscriptionId(), expand, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PriceSheetResultInner object if successful. - */ - public PriceSheetResultInner get(String expand, String skiptoken) { - return getWithServiceResponseAsync(expand, skiptoken).toBlocking().single().body(); - } - - /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String expand, String skiptoken, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(expand, skiptoken), serviceCallback); - } - - /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PriceSheetResultInner object - */ - public Observable getAsync(String expand, String skiptoken) { - return getWithServiceResponseAsync(expand, skiptoken).map(new Func1, PriceSheetResultInner>() { - @Override - public PriceSheetResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PriceSheetResultInner object - */ - public Observable> getWithServiceResponseAsync(String expand, String skiptoken) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), expand, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PriceSheetResultInner object if successful. - */ - public PriceSheetResultInner getByBillingPeriod(String billingPeriodName) { - return getByBillingPeriodWithServiceResponseAsync(billingPeriodName).toBlocking().single().body(); - } - - /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByBillingPeriodAsync(String billingPeriodName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByBillingPeriodWithServiceResponseAsync(billingPeriodName), serviceCallback); - } - - /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PriceSheetResultInner object - */ - public Observable getByBillingPeriodAsync(String billingPeriodName) { - return getByBillingPeriodWithServiceResponseAsync(billingPeriodName).map(new Func1, PriceSheetResultInner>() { - @Override - public PriceSheetResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PriceSheetResultInner object - */ - public Observable> getByBillingPeriodWithServiceResponseAsync(String billingPeriodName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (billingPeriodName == null) { - throw new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String skiptoken = null; - return service.getByBillingPeriod(this.client.subscriptionId(), billingPeriodName, expand, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByBillingPeriodDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PriceSheetResultInner object if successful. - */ - public PriceSheetResultInner getByBillingPeriod(String billingPeriodName, String expand, String skiptoken) { - return getByBillingPeriodWithServiceResponseAsync(billingPeriodName, expand, skiptoken).toBlocking().single().body(); - } - - /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByBillingPeriodAsync(String billingPeriodName, String expand, String skiptoken, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByBillingPeriodWithServiceResponseAsync(billingPeriodName, expand, skiptoken), serviceCallback); - } - - /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PriceSheetResultInner object - */ - public Observable getByBillingPeriodAsync(String billingPeriodName, String expand, String skiptoken) { - return getByBillingPeriodWithServiceResponseAsync(billingPeriodName, expand, skiptoken).map(new Func1, PriceSheetResultInner>() { - @Override - public PriceSheetResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PriceSheetResultInner object - */ - public Observable> getByBillingPeriodWithServiceResponseAsync(String billingPeriodName, String expand, String skiptoken) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (billingPeriodName == null) { - throw new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByBillingPeriod(this.client.subscriptionId(), billingPeriodName, expand, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByBillingPeriodDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByBillingPeriodDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationDetailsInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationDetailsInner.java deleted file mode 100644 index 1f10916d0da..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationDetailsInner.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import java.math.BigDecimal; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * reservation details resource. - */ -@JsonFlatten -public class ReservationDetailsInner extends Resource { - /** - * The reservation order ID is the identifier for a reservation purchase. - * Each reservation order ID represents a single purchase transaction. A - * reservation order contains reservations. The reservation order specifies - * the VM size and region for the reservations. - */ - @JsonProperty(value = "properties.reservationOrderId", access = JsonProperty.Access.WRITE_ONLY) - private String reservationOrderId; - - /** - * The reservation ID is the identifier of a reservation within a - * reservation order. Each reservation is the grouping for applying the - * benefit scope and also specifies the number of instances to which the - * reservation benefit can be applied to. - */ - @JsonProperty(value = "properties.reservationId", access = JsonProperty.Access.WRITE_ONLY) - private String reservationId; - - /** - * This is the ARM Sku name. It can be used to join with the servicetype - * field in additoinalinfo in usage records. - */ - @JsonProperty(value = "properties.skuName", access = JsonProperty.Access.WRITE_ONLY) - private String skuName; - - /** - * This is the total hours reserved for the day. E.g. if reservation for 1 - * instance was made on 1 PM, this will be 11 hours for that day and 24 - * hours from subsequent days. - */ - @JsonProperty(value = "properties.reservedHours", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal reservedHours; - - /** - * The date on which consumption occurred. - */ - @JsonProperty(value = "properties.usageDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime usageDate; - - /** - * This is the total hours used by the instance. - */ - @JsonProperty(value = "properties.usedHours", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal usedHours; - - /** - * This identifier is the name of the resource or the fully qualified - * Resource ID. - */ - @JsonProperty(value = "properties.instanceId", access = JsonProperty.Access.WRITE_ONLY) - private String instanceId; - - /** - * This is the total count of instances that are reserved for the - * reservationid. - */ - @JsonProperty(value = "properties.totalReservedQuantity", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal totalReservedQuantity; - - /** - * Get the reservationOrderId value. - * - * @return the reservationOrderId value - */ - public String reservationOrderId() { - return this.reservationOrderId; - } - - /** - * Get the reservationId value. - * - * @return the reservationId value - */ - public String reservationId() { - return this.reservationId; - } - - /** - * Get the skuName value. - * - * @return the skuName value - */ - public String skuName() { - return this.skuName; - } - - /** - * Get the reservedHours value. - * - * @return the reservedHours value - */ - public BigDecimal reservedHours() { - return this.reservedHours; - } - - /** - * Get the usageDate value. - * - * @return the usageDate value - */ - public DateTime usageDate() { - return this.usageDate; - } - - /** - * Get the usedHours value. - * - * @return the usedHours value - */ - public BigDecimal usedHours() { - return this.usedHours; - } - - /** - * Get the instanceId value. - * - * @return the instanceId value - */ - public String instanceId() { - return this.instanceId; - } - - /** - * Get the totalReservedQuantity value. - * - * @return the totalReservedQuantity value - */ - public BigDecimal totalReservedQuantity() { - return this.totalReservedQuantity; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationSummariesInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationSummariesInner.java deleted file mode 100644 index 52a9ae75051..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationSummariesInner.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import java.math.BigDecimal; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * reservation summaries resource. - */ -@JsonFlatten -public class ReservationSummariesInner extends Resource { - /** - * The reservation order ID is the identifier for a reservation purchase. - * Each reservation order ID represents a single purchase transaction. A - * reservation order contains reservations. The reservation order specifies - * the VM size and region for the reservations. - */ - @JsonProperty(value = "properties.reservationOrderId", access = JsonProperty.Access.WRITE_ONLY) - private String reservationOrderId; - - /** - * The reservation ID is the identifier of a reservation within a - * reservation order. Each reservation is the grouping for applying the - * benefit scope and also specifies the number of instances to which the - * reservation benefit can be applied to. - */ - @JsonProperty(value = "properties.reservationId", access = JsonProperty.Access.WRITE_ONLY) - private String reservationId; - - /** - * This is the ARM Sku name. It can be used to join with the servicetype - * field in additoinalinfo in usage records. - */ - @JsonProperty(value = "properties.skuName", access = JsonProperty.Access.WRITE_ONLY) - private String skuName; - - /** - * This is the total hours reserved. E.g. if reservation for 1 instance was - * made on 1 PM, this will be 11 hours for that day and 24 hours from - * subsequent days. - */ - @JsonProperty(value = "properties.reservedHours", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal reservedHours; - - /** - * Data corresponding to the utilization record. If the grain of data is - * monthly, it will be first day of month. - */ - @JsonProperty(value = "properties.usageDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime usageDate; - - /** - * Total used hours by the reservation. - */ - @JsonProperty(value = "properties.usedHours", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal usedHours; - - /** - * This is the minimum hourly utilization in the usage time (day or month). - * E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 - * and 5, utilization was 10%, this field will return 10% for that day. - */ - @JsonProperty(value = "properties.minUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal minUtilizationPercentage; - - /** - * This is average utilization for the entire time range. (day or month - * depending on the grain). - */ - @JsonProperty(value = "properties.avgUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal avgUtilizationPercentage; - - /** - * This is the maximum hourly utilization in the usage time (day or month). - * E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 - * and 5, utilization was 100%, this field will return 100% for that day. - */ - @JsonProperty(value = "properties.maxUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal maxUtilizationPercentage; - - /** - * Get the reservationOrderId value. - * - * @return the reservationOrderId value - */ - public String reservationOrderId() { - return this.reservationOrderId; - } - - /** - * Get the reservationId value. - * - * @return the reservationId value - */ - public String reservationId() { - return this.reservationId; - } - - /** - * Get the skuName value. - * - * @return the skuName value - */ - public String skuName() { - return this.skuName; - } - - /** - * Get the reservedHours value. - * - * @return the reservedHours value - */ - public BigDecimal reservedHours() { - return this.reservedHours; - } - - /** - * Get the usageDate value. - * - * @return the usageDate value - */ - public DateTime usageDate() { - return this.usageDate; - } - - /** - * Get the usedHours value. - * - * @return the usedHours value - */ - public BigDecimal usedHours() { - return this.usedHours; - } - - /** - * Get the minUtilizationPercentage value. - * - * @return the minUtilizationPercentage value - */ - public BigDecimal minUtilizationPercentage() { - return this.minUtilizationPercentage; - } - - /** - * Get the avgUtilizationPercentage value. - * - * @return the avgUtilizationPercentage value - */ - public BigDecimal avgUtilizationPercentage() { - return this.avgUtilizationPercentage; - } - - /** - * Get the maxUtilizationPercentage value. - * - * @return the maxUtilizationPercentage value - */ - public BigDecimal maxUtilizationPercentage() { - return this.maxUtilizationPercentage; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationsDetailsInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationsDetailsInner.java deleted file mode 100644 index 0597dc36a0e..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationsDetailsInner.java +++ /dev/null @@ -1,547 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.consumption.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ReservationsDetails. - */ -public class ReservationsDetailsInner { - /** The Retrofit service to perform REST calls. */ - private ReservationsDetailsService service; - /** The service client containing this operation class. */ - private ConsumptionManagementClientImpl client; - - /** - * Initializes an instance of ReservationsDetailsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ReservationsDetailsInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { - this.service = retrofit.create(ReservationsDetailsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ReservationsDetails to be - * used by Retrofit to perform actually REST calls. - */ - interface ReservationsDetailsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.ReservationsDetails listByReservationOrder" }) - @GET("providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails") - Observable> listByReservationOrder(@Path("reservationOrderId") String reservationOrderId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.ReservationsDetails listByReservationOrderAndReservation" }) - @GET("providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails") - Observable> listByReservationOrderAndReservation(@Path("reservationOrderId") String reservationOrderId, @Path("reservationId") String reservationId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.ReservationsDetails listByReservationOrderNext" }) - @GET - Observable> listByReservationOrderNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.ReservationsDetails listByReservationOrderAndReservationNext" }) - @GET - Observable> listByReservationOrderAndReservationNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the reservations details for provided date range. - * - * @param reservationOrderId Order Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationDetailsInner> object if successful. - */ - public PagedList listByReservationOrder(final String reservationOrderId, final String filter) { - ServiceResponse> response = listByReservationOrderSinglePageAsync(reservationOrderId, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations details for provided date range. - * - * @param reservationOrderId Order Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderAsync(final String reservationOrderId, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderSinglePageAsync(reservationOrderId, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations details for provided date range. - * - * @param reservationOrderId Order Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationDetailsInner> object - */ - public Observable> listByReservationOrderAsync(final String reservationOrderId, final String filter) { - return listByReservationOrderWithServiceResponseAsync(reservationOrderId, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations details for provided date range. - * - * @param reservationOrderId Order Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationDetailsInner> object - */ - public Observable>> listByReservationOrderWithServiceResponseAsync(final String reservationOrderId, final String filter) { - return listByReservationOrderSinglePageAsync(reservationOrderId, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations details for provided date range. - * - ServiceResponse> * @param reservationOrderId Order Id of the reservation - ServiceResponse> * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationDetailsInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderSinglePageAsync(final String reservationOrderId, final String filter) { - if (reservationOrderId == null) { - throw new IllegalArgumentException("Parameter reservationOrderId is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByReservationOrder(reservationOrderId, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByReservationOrderDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the reservations details for provided date range. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationDetailsInner> object if successful. - */ - public PagedList listByReservationOrderAndReservation(final String reservationOrderId, final String reservationId, final String filter) { - ServiceResponse> response = listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations details for provided date range. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderAndReservationAsync(final String reservationOrderId, final String reservationId, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations details for provided date range. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationDetailsInner> object - */ - public Observable> listByReservationOrderAndReservationAsync(final String reservationOrderId, final String reservationId, final String filter) { - return listByReservationOrderAndReservationWithServiceResponseAsync(reservationOrderId, reservationId, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations details for provided date range. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationDetailsInner> object - */ - public Observable>> listByReservationOrderAndReservationWithServiceResponseAsync(final String reservationOrderId, final String reservationId, final String filter) { - return listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderAndReservationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations details for provided date range. - * - ServiceResponse> * @param reservationOrderId Order Id of the reservation - ServiceResponse> * @param reservationId Id of the reservation - ServiceResponse> * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationDetailsInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderAndReservationSinglePageAsync(final String reservationOrderId, final String reservationId, final String filter) { - if (reservationOrderId == null) { - throw new IllegalArgumentException("Parameter reservationOrderId is required and cannot be null."); - } - if (reservationId == null) { - throw new IllegalArgumentException("Parameter reservationId is required and cannot be null."); - } - if (filter == null) { - throw new IllegalArgumentException("Parameter filter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByReservationOrderAndReservation(reservationOrderId, reservationId, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderAndReservationDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByReservationOrderAndReservationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the reservations details for provided date range. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationDetailsInner> object if successful. - */ - public PagedList listByReservationOrderNext(final String nextPageLink) { - ServiceResponse> response = listByReservationOrderNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations details for provided date range. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations details for provided date range. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationDetailsInner> object - */ - public Observable> listByReservationOrderNextAsync(final String nextPageLink) { - return listByReservationOrderNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations details for provided date range. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationDetailsInner> object - */ - public Observable>> listByReservationOrderNextWithServiceResponseAsync(final String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations details for provided date range. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationDetailsInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByReservationOrderNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByReservationOrderNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the reservations details for provided date range. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationDetailsInner> object if successful. - */ - public PagedList listByReservationOrderAndReservationNext(final String nextPageLink) { - ServiceResponse> response = listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations details for provided date range. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderAndReservationNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations details for provided date range. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationDetailsInner> object - */ - public Observable> listByReservationOrderAndReservationNextAsync(final String nextPageLink) { - return listByReservationOrderAndReservationNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations details for provided date range. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationDetailsInner> object - */ - public Observable>> listByReservationOrderAndReservationNextWithServiceResponseAsync(final String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderAndReservationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations details for provided date range. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationDetailsInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderAndReservationNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByReservationOrderAndReservationNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderAndReservationNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByReservationOrderAndReservationNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationsSummariesInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationsSummariesInner.java deleted file mode 100644 index c10b9d6b18f..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/ReservationsSummariesInner.java +++ /dev/null @@ -1,794 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.consumption.Datagrain; -import com.microsoft.azure.management.consumption.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ReservationsSummaries. - */ -public class ReservationsSummariesInner { - /** The Retrofit service to perform REST calls. */ - private ReservationsSummariesService service; - /** The service client containing this operation class. */ - private ConsumptionManagementClientImpl client; - - /** - * Initializes an instance of ReservationsSummariesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ReservationsSummariesInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { - this.service = retrofit.create(ReservationsSummariesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ReservationsSummaries to be - * used by Retrofit to perform actually REST calls. - */ - interface ReservationsSummariesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.ReservationsSummaries listByReservationOrder" }) - @GET("providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries") - Observable> listByReservationOrder(@Path("reservationOrderId") String reservationOrderId, @Query("grain") Datagrain grain, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.ReservationsSummaries listByReservationOrderAndReservation" }) - @GET("providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries") - Observable> listByReservationOrderAndReservation(@Path("reservationOrderId") String reservationOrderId, @Path("reservationId") String reservationId, @Query("grain") Datagrain grain, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.ReservationsSummaries listByReservationOrderNext" }) - @GET - Observable> listByReservationOrderNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.ReservationsSummaries listByReservationOrderAndReservationNext" }) - @GET - Observable> listByReservationOrderAndReservationNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationSummariesInner> object if successful. - */ - public PagedList listByReservationOrder(final String reservationOrderId, final Datagrain grain) { - ServiceResponse> response = listByReservationOrderSinglePageAsync(reservationOrderId, grain).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderAsync(final String reservationOrderId, final Datagrain grain, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderSinglePageAsync(reservationOrderId, grain), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable> listByReservationOrderAsync(final String reservationOrderId, final Datagrain grain) { - return listByReservationOrderWithServiceResponseAsync(reservationOrderId, grain) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable>> listByReservationOrderWithServiceResponseAsync(final String reservationOrderId, final Datagrain grain) { - return listByReservationOrderSinglePageAsync(reservationOrderId, grain) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationSummariesInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderSinglePageAsync(final String reservationOrderId, final Datagrain grain) { - if (reservationOrderId == null) { - throw new IllegalArgumentException("Parameter reservationOrderId is required and cannot be null."); - } - if (grain == null) { - throw new IllegalArgumentException("Parameter grain is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - return service.listByReservationOrder(reservationOrderId, grain, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationSummariesInner> object if successful. - */ - public PagedList listByReservationOrder(final String reservationOrderId, final Datagrain grain, final String filter) { - ServiceResponse> response = listByReservationOrderSinglePageAsync(reservationOrderId, grain, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderAsync(final String reservationOrderId, final Datagrain grain, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderSinglePageAsync(reservationOrderId, grain, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable> listByReservationOrderAsync(final String reservationOrderId, final Datagrain grain, final String filter) { - return listByReservationOrderWithServiceResponseAsync(reservationOrderId, grain, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable>> listByReservationOrderWithServiceResponseAsync(final String reservationOrderId, final Datagrain grain, final String filter) { - return listByReservationOrderSinglePageAsync(reservationOrderId, grain, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - ServiceResponse> * @param reservationOrderId Order Id of the reservation - ServiceResponse> * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - ServiceResponse> * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationSummariesInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderSinglePageAsync(final String reservationOrderId, final Datagrain grain, final String filter) { - if (reservationOrderId == null) { - throw new IllegalArgumentException("Parameter reservationOrderId is required and cannot be null."); - } - if (grain == null) { - throw new IllegalArgumentException("Parameter grain is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByReservationOrder(reservationOrderId, grain, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByReservationOrderDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationSummariesInner> object if successful. - */ - public PagedList listByReservationOrderAndReservation(final String reservationOrderId, final String reservationId, final Datagrain grain) { - ServiceResponse> response = listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, grain).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderAndReservationAsync(final String reservationOrderId, final String reservationId, final Datagrain grain, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, grain), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable> listByReservationOrderAndReservationAsync(final String reservationOrderId, final String reservationId, final Datagrain grain) { - return listByReservationOrderAndReservationWithServiceResponseAsync(reservationOrderId, reservationId, grain) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable>> listByReservationOrderAndReservationWithServiceResponseAsync(final String reservationOrderId, final String reservationId, final Datagrain grain) { - return listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, grain) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderAndReservationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationSummariesInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderAndReservationSinglePageAsync(final String reservationOrderId, final String reservationId, final Datagrain grain) { - if (reservationOrderId == null) { - throw new IllegalArgumentException("Parameter reservationOrderId is required and cannot be null."); - } - if (reservationId == null) { - throw new IllegalArgumentException("Parameter reservationId is required and cannot be null."); - } - if (grain == null) { - throw new IllegalArgumentException("Parameter grain is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - return service.listByReservationOrderAndReservation(reservationOrderId, reservationId, grain, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderAndReservationDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationSummariesInner> object if successful. - */ - public PagedList listByReservationOrderAndReservation(final String reservationOrderId, final String reservationId, final Datagrain grain, final String filter) { - ServiceResponse> response = listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, grain, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderAndReservationAsync(final String reservationOrderId, final String reservationId, final Datagrain grain, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, grain, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable> listByReservationOrderAndReservationAsync(final String reservationOrderId, final String reservationId, final Datagrain grain, final String filter) { - return listByReservationOrderAndReservationWithServiceResponseAsync(reservationOrderId, reservationId, grain, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable>> listByReservationOrderAndReservationWithServiceResponseAsync(final String reservationOrderId, final String reservationId, final Datagrain grain, final String filter) { - return listByReservationOrderAndReservationSinglePageAsync(reservationOrderId, reservationId, grain, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderAndReservationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - ServiceResponse> * @param reservationOrderId Order Id of the reservation - ServiceResponse> * @param reservationId Id of the reservation - ServiceResponse> * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' - ServiceResponse> * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationSummariesInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderAndReservationSinglePageAsync(final String reservationOrderId, final String reservationId, final Datagrain grain, final String filter) { - if (reservationOrderId == null) { - throw new IllegalArgumentException("Parameter reservationOrderId is required and cannot be null."); - } - if (reservationId == null) { - throw new IllegalArgumentException("Parameter reservationId is required and cannot be null."); - } - if (grain == null) { - throw new IllegalArgumentException("Parameter grain is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByReservationOrderAndReservation(reservationOrderId, reservationId, grain, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderAndReservationDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByReservationOrderAndReservationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationSummariesInner> object if successful. - */ - public PagedList listByReservationOrderNext(final String nextPageLink) { - ServiceResponse> response = listByReservationOrderNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable> listByReservationOrderNextAsync(final String nextPageLink) { - return listByReservationOrderNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable>> listByReservationOrderNextWithServiceResponseAsync(final String nextPageLink) { - return listByReservationOrderNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationSummariesInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByReservationOrderNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByReservationOrderNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ReservationSummariesInner> object if successful. - */ - public PagedList listByReservationOrderAndReservationNext(final String nextPageLink) { - ServiceResponse> response = listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByReservationOrderAndReservationNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable> listByReservationOrderAndReservationNextAsync(final String nextPageLink) { - return listByReservationOrderAndReservationNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ReservationSummariesInner> object - */ - public Observable>> listByReservationOrderAndReservationNextWithServiceResponseAsync(final String nextPageLink) { - return listByReservationOrderAndReservationNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByReservationOrderAndReservationNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ReservationSummariesInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByReservationOrderAndReservationNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByReservationOrderAndReservationNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByReservationOrderAndReservationNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByReservationOrderAndReservationNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/UsageDetailInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/UsageDetailInner.java deleted file mode 100644 index b5384ffb17a..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/UsageDetailInner.java +++ /dev/null @@ -1,356 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import org.joda.time.DateTime; -import java.math.BigDecimal; -import com.microsoft.azure.management.consumption.MeterDetails; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * An usage detail resource. - */ -@JsonFlatten -public class UsageDetailInner extends Resource { - /** - * The id of the billing period resource that the usage belongs to. - */ - @JsonProperty(value = "properties.billingPeriodId", access = JsonProperty.Access.WRITE_ONLY) - private String billingPeriodId; - - /** - * The id of the invoice resource that the usage belongs to. - */ - @JsonProperty(value = "properties.invoiceId", access = JsonProperty.Access.WRITE_ONLY) - private String invoiceId; - - /** - * The start of the date time range covered by the usage detail. - */ - @JsonProperty(value = "properties.usageStart", access = JsonProperty.Access.WRITE_ONLY) - private DateTime usageStart; - - /** - * The end of the date time range covered by the usage detail. - */ - @JsonProperty(value = "properties.usageEnd", access = JsonProperty.Access.WRITE_ONLY) - private DateTime usageEnd; - - /** - * The name of the resource instance that the usage is about. - */ - @JsonProperty(value = "properties.instanceName", access = JsonProperty.Access.WRITE_ONLY) - private String instanceName; - - /** - * The uri of the resource instance that the usage is about. - */ - @JsonProperty(value = "properties.instanceId", access = JsonProperty.Access.WRITE_ONLY) - private String instanceId; - - /** - * The location of the resource instance that the usage is about. - */ - @JsonProperty(value = "properties.instanceLocation", access = JsonProperty.Access.WRITE_ONLY) - private String instanceLocation; - - /** - * The ISO currency in which the meter is charged, for example, USD. - */ - @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY) - private String currency; - - /** - * The quantity of usage. - */ - @JsonProperty(value = "properties.usageQuantity", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal usageQuantity; - - /** - * The billable usage quantity. - */ - @JsonProperty(value = "properties.billableQuantity", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal billableQuantity; - - /** - * The amount of cost before tax. - */ - @JsonProperty(value = "properties.pretaxCost", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal pretaxCost; - - /** - * The estimated usage is subject to change. - */ - @JsonProperty(value = "properties.isEstimated", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEstimated; - - /** - * The meter id. - */ - @JsonProperty(value = "properties.meterId", access = JsonProperty.Access.WRITE_ONLY) - private String meterId; - - /** - * The details about the meter. By default this is not populated, unless - * it's specified in $expand. - */ - @JsonProperty(value = "properties.meterDetails", access = JsonProperty.Access.WRITE_ONLY) - private MeterDetails meterDetails; - - /** - * Subscription guid. - */ - @JsonProperty(value = "properties.subscriptionGuid", access = JsonProperty.Access.WRITE_ONLY) - private String subscriptionGuid; - - /** - * Subscription name. - */ - @JsonProperty(value = "properties.subscriptionName", access = JsonProperty.Access.WRITE_ONLY) - private String subscriptionName; - - /** - * Account name. - */ - @JsonProperty(value = "properties.accountName", access = JsonProperty.Access.WRITE_ONLY) - private String accountName; - - /** - * Department name. - */ - @JsonProperty(value = "properties.departmentName", access = JsonProperty.Access.WRITE_ONLY) - private String departmentName; - - /** - * Product name. - */ - @JsonProperty(value = "properties.product", access = JsonProperty.Access.WRITE_ONLY) - private String product; - - /** - * Consumed service name. - */ - @JsonProperty(value = "properties.consumedService", access = JsonProperty.Access.WRITE_ONLY) - private String consumedService; - - /** - * The cost center of this department if it is a department and a - * costcenter exists. - */ - @JsonProperty(value = "properties.costCenter", access = JsonProperty.Access.WRITE_ONLY) - private String costCenter; - - /** - * Additional details of this usage item. By default this is not populated, - * unless it's specified in $expand. - */ - @JsonProperty(value = "properties.additionalProperties", access = JsonProperty.Access.WRITE_ONLY) - private String additionalProperties; - - /** - * Get the billingPeriodId value. - * - * @return the billingPeriodId value - */ - public String billingPeriodId() { - return this.billingPeriodId; - } - - /** - * Get the invoiceId value. - * - * @return the invoiceId value - */ - public String invoiceId() { - return this.invoiceId; - } - - /** - * Get the usageStart value. - * - * @return the usageStart value - */ - public DateTime usageStart() { - return this.usageStart; - } - - /** - * Get the usageEnd value. - * - * @return the usageEnd value - */ - public DateTime usageEnd() { - return this.usageEnd; - } - - /** - * Get the instanceName value. - * - * @return the instanceName value - */ - public String instanceName() { - return this.instanceName; - } - - /** - * Get the instanceId value. - * - * @return the instanceId value - */ - public String instanceId() { - return this.instanceId; - } - - /** - * Get the instanceLocation value. - * - * @return the instanceLocation value - */ - public String instanceLocation() { - return this.instanceLocation; - } - - /** - * Get the currency value. - * - * @return the currency value - */ - public String currency() { - return this.currency; - } - - /** - * Get the usageQuantity value. - * - * @return the usageQuantity value - */ - public BigDecimal usageQuantity() { - return this.usageQuantity; - } - - /** - * Get the billableQuantity value. - * - * @return the billableQuantity value - */ - public BigDecimal billableQuantity() { - return this.billableQuantity; - } - - /** - * Get the pretaxCost value. - * - * @return the pretaxCost value - */ - public BigDecimal pretaxCost() { - return this.pretaxCost; - } - - /** - * Get the isEstimated value. - * - * @return the isEstimated value - */ - public Boolean isEstimated() { - return this.isEstimated; - } - - /** - * Get the meterId value. - * - * @return the meterId value - */ - public String meterId() { - return this.meterId; - } - - /** - * Get the meterDetails value. - * - * @return the meterDetails value - */ - public MeterDetails meterDetails() { - return this.meterDetails; - } - - /** - * Get the subscriptionGuid value. - * - * @return the subscriptionGuid value - */ - public String subscriptionGuid() { - return this.subscriptionGuid; - } - - /** - * Get the subscriptionName value. - * - * @return the subscriptionName value - */ - public String subscriptionName() { - return this.subscriptionName; - } - - /** - * Get the accountName value. - * - * @return the accountName value - */ - public String accountName() { - return this.accountName; - } - - /** - * Get the departmentName value. - * - * @return the departmentName value - */ - public String departmentName() { - return this.departmentName; - } - - /** - * Get the product value. - * - * @return the product value - */ - public String product() { - return this.product; - } - - /** - * Get the consumedService value. - * - * @return the consumedService value - */ - public String consumedService() { - return this.consumedService; - } - - /** - * Get the costCenter value. - * - * @return the costCenter value - */ - public String costCenter() { - return this.costCenter; - } - - /** - * Get the additionalProperties value. - * - * @return the additionalProperties value - */ - public String additionalProperties() { - return this.additionalProperties; - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/UsageDetailsInner.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/UsageDetailsInner.java deleted file mode 100644 index da415156906..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/UsageDetailsInner.java +++ /dev/null @@ -1,777 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.consumption.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.consumption.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in UsageDetails. - */ -public class UsageDetailsInner { - /** The Retrofit service to perform REST calls. */ - private UsageDetailsService service; - /** The service client containing this operation class. */ - private ConsumptionManagementClientImpl client; - - /** - * Initializes an instance of UsageDetailsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public UsageDetailsInner(Retrofit retrofit, ConsumptionManagementClientImpl client) { - this.service = retrofit.create(UsageDetailsService.class); - this.client = client; - } - - /** - * The interface defining all the services for UsageDetails to be - * used by Retrofit to perform actually REST calls. - */ - interface UsageDetailsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.UsageDetails list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Consumption/usageDetails") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$skiptoken") String skiptoken, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.UsageDetails listByBillingPeriod" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails") - Observable> listByBillingPeriod(@Path("subscriptionId") String subscriptionId, @Path("billingPeriodName") String billingPeriodName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$skiptoken") String skiptoken, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.UsageDetails listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.consumption.UsageDetails listByBillingPeriodNext" }) - @GET - Observable> listByBillingPeriodNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UsageDetailInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UsageDetailInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final String skiptoken = null; - final Integer top = null; - return service.list(this.client.subscriptionId(), expand, filter, skiptoken, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UsageDetailInner> object if successful. - */ - public PagedList list(final String expand, final String filter, final String skiptoken, final Integer top) { - ServiceResponse> response = listSinglePageAsync(expand, filter, skiptoken, top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String expand, final String filter, final String skiptoken, final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(expand, filter, skiptoken, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable> listAsync(final String expand, final String filter, final String skiptoken, final Integer top) { - return listWithServiceResponseAsync(expand, filter, skiptoken, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable>> listWithServiceResponseAsync(final String expand, final String filter, final String skiptoken, final Integer top) { - return listSinglePageAsync(expand, filter, skiptoken, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - ServiceResponse> * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - ServiceResponse> * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - ServiceResponse> * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - ServiceResponse> * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UsageDetailInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String expand, final String filter, final String skiptoken, final Integer top) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), expand, filter, skiptoken, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UsageDetailInner> object if successful. - */ - public PagedList listByBillingPeriod(final String billingPeriodName) { - ServiceResponse> response = listByBillingPeriodSinglePageAsync(billingPeriodName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByBillingPeriodAsync(final String billingPeriodName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByBillingPeriodSinglePageAsync(billingPeriodName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable> listByBillingPeriodAsync(final String billingPeriodName) { - return listByBillingPeriodWithServiceResponseAsync(billingPeriodName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable>> listByBillingPeriodWithServiceResponseAsync(final String billingPeriodName) { - return listByBillingPeriodSinglePageAsync(billingPeriodName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByBillingPeriodNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UsageDetailInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByBillingPeriodSinglePageAsync(final String billingPeriodName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (billingPeriodName == null) { - throw new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final String skiptoken = null; - final Integer top = null; - return service.listByBillingPeriod(this.client.subscriptionId(), billingPeriodName, expand, filter, skiptoken, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByBillingPeriodDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UsageDetailInner> object if successful. - */ - public PagedList listByBillingPeriod(final String billingPeriodName, final String expand, final String filter, final String skiptoken, final Integer top) { - ServiceResponse> response = listByBillingPeriodSinglePageAsync(billingPeriodName, expand, filter, skiptoken, top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByBillingPeriodAsync(final String billingPeriodName, final String expand, final String filter, final String skiptoken, final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByBillingPeriodSinglePageAsync(billingPeriodName, expand, filter, skiptoken, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable> listByBillingPeriodAsync(final String billingPeriodName, final String expand, final String filter, final String skiptoken, final Integer top) { - return listByBillingPeriodWithServiceResponseAsync(billingPeriodName, expand, filter, skiptoken, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable>> listByBillingPeriodWithServiceResponseAsync(final String billingPeriodName, final String expand, final String filter, final String skiptoken, final Integer top) { - return listByBillingPeriodSinglePageAsync(billingPeriodName, expand, filter, skiptoken, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByBillingPeriodNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - ServiceResponse> * @param billingPeriodName Billing Period Name. - ServiceResponse> * @param expand May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. - ServiceResponse> * @param filter May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - ServiceResponse> * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. - ServiceResponse> * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UsageDetailInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByBillingPeriodSinglePageAsync(final String billingPeriodName, final String expand, final String filter, final String skiptoken, final Integer top) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (billingPeriodName == null) { - throw new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByBillingPeriod(this.client.subscriptionId(), billingPeriodName, expand, filter, skiptoken, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByBillingPeriodDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByBillingPeriodDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UsageDetailInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UsageDetailInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UsageDetailInner> object if successful. - */ - public PagedList listByBillingPeriodNext(final String nextPageLink) { - ServiceResponse> response = listByBillingPeriodNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByBillingPeriodNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByBillingPeriodNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable> listByBillingPeriodNextAsync(final String nextPageLink) { - return listByBillingPeriodNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UsageDetailInner> object - */ - public Observable>> listByBillingPeriodNextWithServiceResponseAsync(final String nextPageLink) { - return listByBillingPeriodNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByBillingPeriodNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UsageDetailInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByBillingPeriodNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByBillingPeriodNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByBillingPeriodNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByBillingPeriodNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/package-info.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/package-info.java deleted file mode 100644 index 913144410ed..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for ConsumptionManagementClient. - * Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. - */ -package com.microsoft.azure.management.consumption.implementation; diff --git a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/package-info.java b/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/package-info.java deleted file mode 100644 index c60ef1c420e..00000000000 --- a/azure-mgmt-consumption/src/main/java/com/microsoft/azure/management/consumption/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for ConsumptionManagementClient. - * Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. - */ -package com.microsoft.azure.management.consumption; diff --git a/azure-mgmt-customerinsights/pom.xml b/azure-mgmt-customerinsights/pom.xml deleted file mode 100644 index 4262f6809af..00000000000 --- a/azure-mgmt-customerinsights/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-customerinsights - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for CustomerInsights Management - This package contains Microsoft CustomerInsights Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/AssignmentPrincipal.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/AssignmentPrincipal.java deleted file mode 100644 index bf552e495b1..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/AssignmentPrincipal.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AssignmentPrincipal. - */ -public class AssignmentPrincipal { - /** - * The principal id being assigned to. - */ - @JsonProperty(value = "principalId", required = true) - private String principalId; - - /** - * The Type of the principal ID. - */ - @JsonProperty(value = "principalType", required = true) - private String principalType; - - /** - * Other metadata for the principal. - */ - @JsonProperty(value = "principalMetadata") - private Map principalMetadata; - - /** - * Get the principalId value. - * - * @return the principalId value - */ - public String principalId() { - return this.principalId; - } - - /** - * Set the principalId value. - * - * @param principalId the principalId value to set - * @return the AssignmentPrincipal object itself. - */ - public AssignmentPrincipal withPrincipalId(String principalId) { - this.principalId = principalId; - return this; - } - - /** - * Get the principalType value. - * - * @return the principalType value - */ - public String principalType() { - return this.principalType; - } - - /** - * Set the principalType value. - * - * @param principalType the principalType value to set - * @return the AssignmentPrincipal object itself. - */ - public AssignmentPrincipal withPrincipalType(String principalType) { - this.principalType = principalType; - return this; - } - - /** - * Get the principalMetadata value. - * - * @return the principalMetadata value - */ - public Map principalMetadata() { - return this.principalMetadata; - } - - /** - * Set the principalMetadata value. - * - * @param principalMetadata the principalMetadata value to set - * @return the AssignmentPrincipal object itself. - */ - public AssignmentPrincipal withPrincipalMetadata(Map principalMetadata) { - this.principalMetadata = principalMetadata; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/AzureBlobConnectorProperties.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/AzureBlobConnectorProperties.java deleted file mode 100644 index 955da475918..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/AzureBlobConnectorProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Azure Blob connector properties. - */ -public class AzureBlobConnectorProperties { - /** - * The connection KeyVault URL. - */ - @JsonProperty(value = "connectionKeyVaultUrl", required = true) - private String connectionKeyVaultUrl; - - /** - * Get the connectionKeyVaultUrl value. - * - * @return the connectionKeyVaultUrl value - */ - public String connectionKeyVaultUrl() { - return this.connectionKeyVaultUrl; - } - - /** - * Set the connectionKeyVaultUrl value. - * - * @param connectionKeyVaultUrl the connectionKeyVaultUrl value to set - * @return the AzureBlobConnectorProperties object itself. - */ - public AzureBlobConnectorProperties withConnectionKeyVaultUrl(String connectionKeyVaultUrl) { - this.connectionKeyVaultUrl = connectionKeyVaultUrl; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CalculationWindowTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CalculationWindowTypes.java deleted file mode 100644 index 51b43dbb6db..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CalculationWindowTypes.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for CalculationWindowTypes. - */ -public enum CalculationWindowTypes { - /** Enum value Lifetime. */ - LIFETIME("Lifetime"), - - /** Enum value Hour. */ - HOUR("Hour"), - - /** Enum value Day. */ - DAY("Day"), - - /** Enum value Week. */ - WEEK("Week"), - - /** Enum value Month. */ - MONTH("Month"); - - /** The actual serialized value for a CalculationWindowTypes instance. */ - private String value; - - CalculationWindowTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CalculationWindowTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed CalculationWindowTypes object, or null if unable to parse. - */ - @JsonCreator - public static CalculationWindowTypes fromString(String value) { - CalculationWindowTypes[] items = CalculationWindowTypes.values(); - for (CalculationWindowTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CardinalityTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CardinalityTypes.java deleted file mode 100644 index c7c349a028e..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CardinalityTypes.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for CardinalityTypes. - */ -public enum CardinalityTypes { - /** Enum value OneToOne. */ - ONE_TO_ONE("OneToOne"), - - /** Enum value OneToMany. */ - ONE_TO_MANY("OneToMany"), - - /** Enum value ManyToMany. */ - MANY_TO_MANY("ManyToMany"); - - /** The actual serialized value for a CardinalityTypes instance. */ - private String value; - - CardinalityTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CardinalityTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed CardinalityTypes object, or null if unable to parse. - */ - @JsonCreator - public static CardinalityTypes fromString(String value) { - CardinalityTypes[] items = CardinalityTypes.values(); - for (CardinalityTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CompletionOperationTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CompletionOperationTypes.java deleted file mode 100644 index 4c98ea19a58..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CompletionOperationTypes.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for CompletionOperationTypes. - */ -public enum CompletionOperationTypes { - /** Enum value DoNothing. */ - DO_NOTHING("DoNothing"), - - /** Enum value DeleteFile. */ - DELETE_FILE("DeleteFile"), - - /** Enum value MoveFile. */ - MOVE_FILE("MoveFile"); - - /** The actual serialized value for a CompletionOperationTypes instance. */ - private String value; - - CompletionOperationTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CompletionOperationTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed CompletionOperationTypes object, or null if unable to parse. - */ - @JsonCreator - public static CompletionOperationTypes fromString(String value) { - CompletionOperationTypes[] items = CompletionOperationTypes.values(); - for (CompletionOperationTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingAvailability.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingAvailability.java deleted file mode 100644 index 639cab39d7e..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingAvailability.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Connector mapping property availability. - */ -public class ConnectorMappingAvailability { - /** - * The frequency to update. Possible values include: 'Minute', 'Hour', - * 'Day', 'Week', 'Month'. - */ - @JsonProperty(value = "frequency") - private FrequencyTypes frequency; - - /** - * The interval of the given frequency to use. - */ - @JsonProperty(value = "interval", required = true) - private int interval; - - /** - * Get the frequency value. - * - * @return the frequency value - */ - public FrequencyTypes frequency() { - return this.frequency; - } - - /** - * Set the frequency value. - * - * @param frequency the frequency value to set - * @return the ConnectorMappingAvailability object itself. - */ - public ConnectorMappingAvailability withFrequency(FrequencyTypes frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the interval value. - * - * @return the interval value - */ - public int interval() { - return this.interval; - } - - /** - * Set the interval value. - * - * @param interval the interval value to set - * @return the ConnectorMappingAvailability object itself. - */ - public ConnectorMappingAvailability withInterval(int interval) { - this.interval = interval; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingCompleteOperation.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingCompleteOperation.java deleted file mode 100644 index e1fb0c273ec..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingCompleteOperation.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The complete operation. - */ -public class ConnectorMappingCompleteOperation { - /** - * The type of completion operation. Possible values include: 'DoNothing', - * 'DeleteFile', 'MoveFile'. - */ - @JsonProperty(value = "completionOperationType") - private CompletionOperationTypes completionOperationType; - - /** - * The destination folder where files will be moved to once the import is - * done. - */ - @JsonProperty(value = "destinationFolder") - private String destinationFolder; - - /** - * Get the completionOperationType value. - * - * @return the completionOperationType value - */ - public CompletionOperationTypes completionOperationType() { - return this.completionOperationType; - } - - /** - * Set the completionOperationType value. - * - * @param completionOperationType the completionOperationType value to set - * @return the ConnectorMappingCompleteOperation object itself. - */ - public ConnectorMappingCompleteOperation withCompletionOperationType(CompletionOperationTypes completionOperationType) { - this.completionOperationType = completionOperationType; - return this; - } - - /** - * Get the destinationFolder value. - * - * @return the destinationFolder value - */ - public String destinationFolder() { - return this.destinationFolder; - } - - /** - * Set the destinationFolder value. - * - * @param destinationFolder the destinationFolder value to set - * @return the ConnectorMappingCompleteOperation object itself. - */ - public ConnectorMappingCompleteOperation withDestinationFolder(String destinationFolder) { - this.destinationFolder = destinationFolder; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingErrorManagement.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingErrorManagement.java deleted file mode 100644 index c1bff4cc742..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingErrorManagement.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The error mangement. - */ -public class ConnectorMappingErrorManagement { - /** - * The type of error management to use for the mapping. Possible values - * include: 'RejectAndContinue', 'StopImport', 'RejectUntilLimit'. - */ - @JsonProperty(value = "errorManagementType", required = true) - private ErrorManagementTypes errorManagementType; - - /** - * The error limit allowed while importing data. - */ - @JsonProperty(value = "errorLimit") - private Integer errorLimit; - - /** - * Get the errorManagementType value. - * - * @return the errorManagementType value - */ - public ErrorManagementTypes errorManagementType() { - return this.errorManagementType; - } - - /** - * Set the errorManagementType value. - * - * @param errorManagementType the errorManagementType value to set - * @return the ConnectorMappingErrorManagement object itself. - */ - public ConnectorMappingErrorManagement withErrorManagementType(ErrorManagementTypes errorManagementType) { - this.errorManagementType = errorManagementType; - return this; - } - - /** - * Get the errorLimit value. - * - * @return the errorLimit value - */ - public Integer errorLimit() { - return this.errorLimit; - } - - /** - * Set the errorLimit value. - * - * @param errorLimit the errorLimit value to set - * @return the ConnectorMappingErrorManagement object itself. - */ - public ConnectorMappingErrorManagement withErrorLimit(Integer errorLimit) { - this.errorLimit = errorLimit; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingFormat.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingFormat.java deleted file mode 100644 index 2b9ca11484b..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingFormat.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Connector mapping property format. - */ -public class ConnectorMappingFormat { - /** - * The type mapping format. - */ - @JsonProperty(value = "formatType", required = true) - private String formatType; - - /** - * The character that signifies a break between columns. - */ - @JsonProperty(value = "columnDelimiter") - private String columnDelimiter; - - /** - * The oData language. - */ - @JsonProperty(value = "acceptLanguage") - private String acceptLanguage; - - /** - * Quote character, used to indicate enquoted fields. - */ - @JsonProperty(value = "quoteCharacter") - private String quoteCharacter; - - /** - * Escape character for quotes, can be the same as the quoteCharacter. - */ - @JsonProperty(value = "quoteEscapeCharacter") - private String quoteEscapeCharacter; - - /** - * Character separating array elements. - */ - @JsonProperty(value = "arraySeparator") - private String arraySeparator; - - /** - * Creates an instance of ConnectorMappingFormat class. - */ - public ConnectorMappingFormat() { - formatType = "TextFormat"; - } - - /** - * Get the formatType value. - * - * @return the formatType value - */ - public String formatType() { - return this.formatType; - } - - /** - * Set the formatType value. - * - * @param formatType the formatType value to set - * @return the ConnectorMappingFormat object itself. - */ - public ConnectorMappingFormat withFormatType(String formatType) { - this.formatType = formatType; - return this; - } - - /** - * Get the columnDelimiter value. - * - * @return the columnDelimiter value - */ - public String columnDelimiter() { - return this.columnDelimiter; - } - - /** - * Set the columnDelimiter value. - * - * @param columnDelimiter the columnDelimiter value to set - * @return the ConnectorMappingFormat object itself. - */ - public ConnectorMappingFormat withColumnDelimiter(String columnDelimiter) { - this.columnDelimiter = columnDelimiter; - return this; - } - - /** - * Get the acceptLanguage value. - * - * @return the acceptLanguage value - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Set the acceptLanguage value. - * - * @param acceptLanguage the acceptLanguage value to set - * @return the ConnectorMappingFormat object itself. - */ - public ConnectorMappingFormat withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** - * Get the quoteCharacter value. - * - * @return the quoteCharacter value - */ - public String quoteCharacter() { - return this.quoteCharacter; - } - - /** - * Set the quoteCharacter value. - * - * @param quoteCharacter the quoteCharacter value to set - * @return the ConnectorMappingFormat object itself. - */ - public ConnectorMappingFormat withQuoteCharacter(String quoteCharacter) { - this.quoteCharacter = quoteCharacter; - return this; - } - - /** - * Get the quoteEscapeCharacter value. - * - * @return the quoteEscapeCharacter value - */ - public String quoteEscapeCharacter() { - return this.quoteEscapeCharacter; - } - - /** - * Set the quoteEscapeCharacter value. - * - * @param quoteEscapeCharacter the quoteEscapeCharacter value to set - * @return the ConnectorMappingFormat object itself. - */ - public ConnectorMappingFormat withQuoteEscapeCharacter(String quoteEscapeCharacter) { - this.quoteEscapeCharacter = quoteEscapeCharacter; - return this; - } - - /** - * Get the arraySeparator value. - * - * @return the arraySeparator value - */ - public String arraySeparator() { - return this.arraySeparator; - } - - /** - * Set the arraySeparator value. - * - * @param arraySeparator the arraySeparator value to set - * @return the ConnectorMappingFormat object itself. - */ - public ConnectorMappingFormat withArraySeparator(String arraySeparator) { - this.arraySeparator = arraySeparator; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingProperties.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingProperties.java deleted file mode 100644 index 13703bf8158..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingProperties.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The connector mapping properties. - */ -public class ConnectorMappingProperties { - /** - * The folder path for the mapping. - */ - @JsonProperty(value = "folderPath") - private String folderPath; - - /** - * The file filter for the mapping. - */ - @JsonProperty(value = "fileFilter") - private String fileFilter; - - /** - * If the file contains a header or not. - */ - @JsonProperty(value = "hasHeader") - private Boolean hasHeader; - - /** - * The error management setting for the mapping. - */ - @JsonProperty(value = "errorManagement", required = true) - private ConnectorMappingErrorManagement errorManagement; - - /** - * The format of mapping property. - */ - @JsonProperty(value = "format", required = true) - private ConnectorMappingFormat format; - - /** - * The availability of mapping property. - */ - @JsonProperty(value = "availability", required = true) - private ConnectorMappingAvailability availability; - - /** - * Ingestion mapping information at property level. - */ - @JsonProperty(value = "structure", required = true) - private List structure; - - /** - * The operation after import is done. - */ - @JsonProperty(value = "completeOperation", required = true) - private ConnectorMappingCompleteOperation completeOperation; - - /** - * Get the folderPath value. - * - * @return the folderPath value - */ - public String folderPath() { - return this.folderPath; - } - - /** - * Set the folderPath value. - * - * @param folderPath the folderPath value to set - * @return the ConnectorMappingProperties object itself. - */ - public ConnectorMappingProperties withFolderPath(String folderPath) { - this.folderPath = folderPath; - return this; - } - - /** - * Get the fileFilter value. - * - * @return the fileFilter value - */ - public String fileFilter() { - return this.fileFilter; - } - - /** - * Set the fileFilter value. - * - * @param fileFilter the fileFilter value to set - * @return the ConnectorMappingProperties object itself. - */ - public ConnectorMappingProperties withFileFilter(String fileFilter) { - this.fileFilter = fileFilter; - return this; - } - - /** - * Get the hasHeader value. - * - * @return the hasHeader value - */ - public Boolean hasHeader() { - return this.hasHeader; - } - - /** - * Set the hasHeader value. - * - * @param hasHeader the hasHeader value to set - * @return the ConnectorMappingProperties object itself. - */ - public ConnectorMappingProperties withHasHeader(Boolean hasHeader) { - this.hasHeader = hasHeader; - return this; - } - - /** - * Get the errorManagement value. - * - * @return the errorManagement value - */ - public ConnectorMappingErrorManagement errorManagement() { - return this.errorManagement; - } - - /** - * Set the errorManagement value. - * - * @param errorManagement the errorManagement value to set - * @return the ConnectorMappingProperties object itself. - */ - public ConnectorMappingProperties withErrorManagement(ConnectorMappingErrorManagement errorManagement) { - this.errorManagement = errorManagement; - return this; - } - - /** - * Get the format value. - * - * @return the format value - */ - public ConnectorMappingFormat format() { - return this.format; - } - - /** - * Set the format value. - * - * @param format the format value to set - * @return the ConnectorMappingProperties object itself. - */ - public ConnectorMappingProperties withFormat(ConnectorMappingFormat format) { - this.format = format; - return this; - } - - /** - * Get the availability value. - * - * @return the availability value - */ - public ConnectorMappingAvailability availability() { - return this.availability; - } - - /** - * Set the availability value. - * - * @param availability the availability value to set - * @return the ConnectorMappingProperties object itself. - */ - public ConnectorMappingProperties withAvailability(ConnectorMappingAvailability availability) { - this.availability = availability; - return this; - } - - /** - * Get the structure value. - * - * @return the structure value - */ - public List structure() { - return this.structure; - } - - /** - * Set the structure value. - * - * @param structure the structure value to set - * @return the ConnectorMappingProperties object itself. - */ - public ConnectorMappingProperties withStructure(List structure) { - this.structure = structure; - return this; - } - - /** - * Get the completeOperation value. - * - * @return the completeOperation value - */ - public ConnectorMappingCompleteOperation completeOperation() { - return this.completeOperation; - } - - /** - * Set the completeOperation value. - * - * @param completeOperation the completeOperation value to set - * @return the ConnectorMappingProperties object itself. - */ - public ConnectorMappingProperties withCompleteOperation(ConnectorMappingCompleteOperation completeOperation) { - this.completeOperation = completeOperation; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingStates.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingStates.java deleted file mode 100644 index 1ffb352f057..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingStates.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ConnectorMappingStates. - */ -public enum ConnectorMappingStates { - /** Enum value Creating. */ - CREATING("Creating"), - - /** Enum value Created. */ - CREATED("Created"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Ready. */ - READY("Ready"), - - /** Enum value Running. */ - RUNNING("Running"), - - /** Enum value Stopped. */ - STOPPED("Stopped"), - - /** Enum value Expiring. */ - EXPIRING("Expiring"); - - /** The actual serialized value for a ConnectorMappingStates instance. */ - private String value; - - ConnectorMappingStates(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ConnectorMappingStates instance. - * - * @param value the serialized value to parse. - * @return the parsed ConnectorMappingStates object, or null if unable to parse. - */ - @JsonCreator - public static ConnectorMappingStates fromString(String value) { - ConnectorMappingStates[] items = ConnectorMappingStates.values(); - for (ConnectorMappingStates item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingStructure.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingStructure.java deleted file mode 100644 index 8f7e89e9964..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorMappingStructure.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Connector mapping property structure. - */ -public class ConnectorMappingStructure { - /** - * The property name of the mapping entity. - */ - @JsonProperty(value = "propertyName", required = true) - private String propertyName; - - /** - * The column name of the import file. - */ - @JsonProperty(value = "columnName", required = true) - private String columnName; - - /** - * Custom format specifier for input parsing. - */ - @JsonProperty(value = "customFormatSpecifier") - private String customFormatSpecifier; - - /** - * Indicates if the column is encrypted. - */ - @JsonProperty(value = "isEncrypted") - private Boolean isEncrypted; - - /** - * Get the propertyName value. - * - * @return the propertyName value - */ - public String propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName value. - * - * @param propertyName the propertyName value to set - * @return the ConnectorMappingStructure object itself. - */ - public ConnectorMappingStructure withPropertyName(String propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the columnName value. - * - * @return the columnName value - */ - public String columnName() { - return this.columnName; - } - - /** - * Set the columnName value. - * - * @param columnName the columnName value to set - * @return the ConnectorMappingStructure object itself. - */ - public ConnectorMappingStructure withColumnName(String columnName) { - this.columnName = columnName; - return this; - } - - /** - * Get the customFormatSpecifier value. - * - * @return the customFormatSpecifier value - */ - public String customFormatSpecifier() { - return this.customFormatSpecifier; - } - - /** - * Set the customFormatSpecifier value. - * - * @param customFormatSpecifier the customFormatSpecifier value to set - * @return the ConnectorMappingStructure object itself. - */ - public ConnectorMappingStructure withCustomFormatSpecifier(String customFormatSpecifier) { - this.customFormatSpecifier = customFormatSpecifier; - return this; - } - - /** - * Get the isEncrypted value. - * - * @return the isEncrypted value - */ - public Boolean isEncrypted() { - return this.isEncrypted; - } - - /** - * Set the isEncrypted value. - * - * @param isEncrypted the isEncrypted value to set - * @return the ConnectorMappingStructure object itself. - */ - public ConnectorMappingStructure withIsEncrypted(Boolean isEncrypted) { - this.isEncrypted = isEncrypted; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorStates.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorStates.java deleted file mode 100644 index d985cf0b1fb..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorStates.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ConnectorStates. - */ -public enum ConnectorStates { - /** Enum value Creating. */ - CREATING("Creating"), - - /** Enum value Created. */ - CREATED("Created"), - - /** Enum value Ready. */ - READY("Ready"), - - /** Enum value Expiring. */ - EXPIRING("Expiring"), - - /** Enum value Deleting. */ - DELETING("Deleting"), - - /** Enum value Failed. */ - FAILED("Failed"); - - /** The actual serialized value for a ConnectorStates instance. */ - private String value; - - ConnectorStates(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ConnectorStates instance. - * - * @param value the serialized value to parse. - * @return the parsed ConnectorStates object, or null if unable to parse. - */ - @JsonCreator - public static ConnectorStates fromString(String value) { - ConnectorStates[] items = ConnectorStates.values(); - for (ConnectorStates item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorTypes.java deleted file mode 100644 index ca24de27c6a..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ConnectorTypes.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ConnectorTypes. - */ -public final class ConnectorTypes { - /** Static value None for ConnectorTypes. */ - public static final ConnectorTypes NONE = new ConnectorTypes("None"); - - /** Static value CRM for ConnectorTypes. */ - public static final ConnectorTypes CRM = new ConnectorTypes("CRM"); - - /** Static value AzureBlob for ConnectorTypes. */ - public static final ConnectorTypes AZURE_BLOB = new ConnectorTypes("AzureBlob"); - - /** Static value Salesforce for ConnectorTypes. */ - public static final ConnectorTypes SALESFORCE = new ConnectorTypes("Salesforce"); - - /** Static value ExchangeOnline for ConnectorTypes. */ - public static final ConnectorTypes EXCHANGE_ONLINE = new ConnectorTypes("ExchangeOnline"); - - /** Static value Outbound for ConnectorTypes. */ - public static final ConnectorTypes OUTBOUND = new ConnectorTypes("Outbound"); - - private String value; - - /** - * Creates a custom value for ConnectorTypes. - * @param value the custom value - */ - public ConnectorTypes(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ConnectorTypes)) { - return false; - } - if (obj == this) { - return true; - } - ConnectorTypes rhs = (ConnectorTypes) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CrmConnectorEntities.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CrmConnectorEntities.java deleted file mode 100644 index c697d5f4632..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CrmConnectorEntities.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The CRM connector entities. - */ -public class CrmConnectorEntities { - /** - * The logical name. - */ - @JsonProperty(value = "logicalName", required = true) - private String logicalName; - - /** - * The display name. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** - * Indicating whether this is profile. - */ - @JsonProperty(value = "isProfile") - private Boolean isProfile; - - /** - * Get the logicalName value. - * - * @return the logicalName value - */ - public String logicalName() { - return this.logicalName; - } - - /** - * Set the logicalName value. - * - * @param logicalName the logicalName value to set - * @return the CrmConnectorEntities object itself. - */ - public CrmConnectorEntities withLogicalName(String logicalName) { - this.logicalName = logicalName; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the CrmConnectorEntities object itself. - */ - public CrmConnectorEntities withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the isProfile value. - * - * @return the isProfile value - */ - public Boolean isProfile() { - return this.isProfile; - } - - /** - * Set the isProfile value. - * - * @param isProfile the isProfile value to set - * @return the CrmConnectorEntities object itself. - */ - public CrmConnectorEntities withIsProfile(Boolean isProfile) { - this.isProfile = isProfile; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CrmConnectorProperties.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CrmConnectorProperties.java deleted file mode 100644 index af3299a4da3..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/CrmConnectorProperties.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The CRM connector properties. - */ -public class CrmConnectorProperties { - /** - * The connection string. - */ - @JsonProperty(value = "connectionString") - private String connectionString; - - /** - * The organization ID. - */ - @JsonProperty(value = "organizationId", required = true) - private String organizationId; - - /** - * The organization URL. - */ - @JsonProperty(value = "organizationUrl", required = true) - private String organizationUrl; - - /** - * The entities like account, contact, opportunity. - */ - @JsonProperty(value = "entities", required = true) - private List entities; - - /** - * The access token. - */ - @JsonProperty(value = "accessToken") - private String accessToken; - - /** - * Get the connectionString value. - * - * @return the connectionString value - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Set the connectionString value. - * - * @param connectionString the connectionString value to set - * @return the CrmConnectorProperties object itself. - */ - public CrmConnectorProperties withConnectionString(String connectionString) { - this.connectionString = connectionString; - return this; - } - - /** - * Get the organizationId value. - * - * @return the organizationId value - */ - public String organizationId() { - return this.organizationId; - } - - /** - * Set the organizationId value. - * - * @param organizationId the organizationId value to set - * @return the CrmConnectorProperties object itself. - */ - public CrmConnectorProperties withOrganizationId(String organizationId) { - this.organizationId = organizationId; - return this; - } - - /** - * Get the organizationUrl value. - * - * @return the organizationUrl value - */ - public String organizationUrl() { - return this.organizationUrl; - } - - /** - * Set the organizationUrl value. - * - * @param organizationUrl the organizationUrl value to set - * @return the CrmConnectorProperties object itself. - */ - public CrmConnectorProperties withOrganizationUrl(String organizationUrl) { - this.organizationUrl = organizationUrl; - return this; - } - - /** - * Get the entities value. - * - * @return the entities value - */ - public List entities() { - return this.entities; - } - - /** - * Set the entities value. - * - * @param entities the entities value to set - * @return the CrmConnectorProperties object itself. - */ - public CrmConnectorProperties withEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the accessToken value. - * - * @return the accessToken value - */ - public String accessToken() { - return this.accessToken; - } - - /** - * Set the accessToken value. - * - * @param accessToken the accessToken value to set - * @return the CrmConnectorProperties object itself. - */ - public CrmConnectorProperties withAccessToken(String accessToken) { - this.accessToken = accessToken; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/DataSourcePrecedence.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/DataSourcePrecedence.java deleted file mode 100644 index a5adabc8005..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/DataSourcePrecedence.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * The data source precedence is a way to know the precedence of each data - * source. - */ -@JsonFlatten -public class DataSourcePrecedence { - /** - * The data source name. - */ - @JsonProperty(value = "dataSource.name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * The data source type. Possible values include: 'Connector', - * 'LinkInteraction', 'SystemDefault'. - */ - @JsonProperty(value = "dataSource.dataSourceType", access = JsonProperty.Access.WRITE_ONLY) - private DataSourceType dataSourceType; - - /** - * The data source status. Possible values include: 'None', 'Active', - * 'Deleted'. - */ - @JsonProperty(value = "dataSource.status", access = JsonProperty.Access.WRITE_ONLY) - private Status status; - - /** - * The data source ID. - */ - @JsonProperty(value = "dataSource.id", access = JsonProperty.Access.WRITE_ONLY) - private Integer id; - - /** - * The data source reference id. - */ - @JsonProperty(value = "dataSource.dataSourceReferenceId", access = JsonProperty.Access.WRITE_ONLY) - private String dataSourceReferenceId; - - /** - * the precedence value. - */ - @JsonProperty(value = "precedence") - private Integer precedence; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the dataSourceType value. - * - * @return the dataSourceType value - */ - public DataSourceType dataSourceType() { - return this.dataSourceType; - } - - /** - * Get the status value. - * - * @return the status value - */ - public Status status() { - return this.status; - } - - /** - * Get the id value. - * - * @return the id value - */ - public Integer id() { - return this.id; - } - - /** - * Get the dataSourceReferenceId value. - * - * @return the dataSourceReferenceId value - */ - public String dataSourceReferenceId() { - return this.dataSourceReferenceId; - } - - /** - * Get the precedence value. - * - * @return the precedence value - */ - public Integer precedence() { - return this.precedence; - } - - /** - * Set the precedence value. - * - * @param precedence the precedence value to set - * @return the DataSourcePrecedence object itself. - */ - public DataSourcePrecedence withPrecedence(Integer precedence) { - this.precedence = precedence; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/DataSourceType.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/DataSourceType.java deleted file mode 100644 index 5c91a281a7a..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/DataSourceType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for DataSourceType. - */ -public final class DataSourceType { - /** Static value Connector for DataSourceType. */ - public static final DataSourceType CONNECTOR = new DataSourceType("Connector"); - - /** Static value LinkInteraction for DataSourceType. */ - public static final DataSourceType LINK_INTERACTION = new DataSourceType("LinkInteraction"); - - /** Static value SystemDefault for DataSourceType. */ - public static final DataSourceType SYSTEM_DEFAULT = new DataSourceType("SystemDefault"); - - private String value; - - /** - * Creates a custom value for DataSourceType. - * @param value the custom value - */ - public DataSourceType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof DataSourceType)) { - return false; - } - if (obj == this) { - return true; - } - DataSourceType rhs = (DataSourceType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EnrichingKpi.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EnrichingKpi.java deleted file mode 100644 index 2048779fcf7..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EnrichingKpi.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.microsoft.azure.management.customerinsights.implementation.KpiDefinitionInner; - -/** - * The enriching KPI definition. - */ -public class EnrichingKpi extends KpiDefinitionInner { -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityType.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityType.java deleted file mode 100644 index e9b93cd9d4d..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for EntityType. - */ -public enum EntityType { - /** Enum value None. */ - NONE("None"), - - /** Enum value Profile. */ - PROFILE("Profile"), - - /** Enum value Interaction. */ - INTERACTION("Interaction"), - - /** Enum value Relationship. */ - RELATIONSHIP("Relationship"); - - /** The actual serialized value for a EntityType instance. */ - private String value; - - EntityType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a EntityType instance. - * - * @param value the serialized value to parse. - * @return the parsed EntityType object, or null if unable to parse. - */ - @JsonCreator - public static EntityType fromString(String value) { - EntityType[] items = EntityType.values(); - for (EntityType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityTypeDefinition.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityTypeDefinition.java deleted file mode 100644 index 4a2c4045f47..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityTypeDefinition.java +++ /dev/null @@ -1,251 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes an entity. - */ -public class EntityTypeDefinition extends MetadataDefinitionBase { - /** - * The api entity set name. This becomes the odata entity set name for the - * entity Type being refered in this object. - */ - @JsonProperty(value = "apiEntitySetName") - private String apiEntitySetName; - - /** - * Type of entity. Possible values include: 'None', 'Profile', - * 'Interaction', 'Relationship'. - */ - @JsonProperty(value = "entityType") - private EntityTypes entityType; - - /** - * The properties of the Profile. - */ - @JsonProperty(value = "fields") - private List fields; - - /** - * The instance count. - */ - @JsonProperty(value = "instancesCount") - private Integer instancesCount; - - /** - * The last changed time for the type definition. - */ - @JsonProperty(value = "lastChangedUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastChangedUtc; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * The schema org link. This helps ACI identify and suggest semantic - * models. - */ - @JsonProperty(value = "schemaItemTypeLink") - private String schemaItemTypeLink; - - /** - * The hub name. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * The timestamp property name. Represents the time when the interaction or - * profile update happened. - */ - @JsonProperty(value = "timestampFieldName") - private String timestampFieldName; - - /** - * The name of the entity. - */ - @JsonProperty(value = "typeName") - private String typeName; - - /** - * Get the apiEntitySetName value. - * - * @return the apiEntitySetName value - */ - public String apiEntitySetName() { - return this.apiEntitySetName; - } - - /** - * Set the apiEntitySetName value. - * - * @param apiEntitySetName the apiEntitySetName value to set - * @return the EntityTypeDefinition object itself. - */ - public EntityTypeDefinition withApiEntitySetName(String apiEntitySetName) { - this.apiEntitySetName = apiEntitySetName; - return this; - } - - /** - * Get the entityType value. - * - * @return the entityType value - */ - public EntityTypes entityType() { - return this.entityType; - } - - /** - * Set the entityType value. - * - * @param entityType the entityType value to set - * @return the EntityTypeDefinition object itself. - */ - public EntityTypeDefinition withEntityType(EntityTypes entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the fields value. - * - * @return the fields value - */ - public List fields() { - return this.fields; - } - - /** - * Set the fields value. - * - * @param fields the fields value to set - * @return the EntityTypeDefinition object itself. - */ - public EntityTypeDefinition withFields(List fields) { - this.fields = fields; - return this; - } - - /** - * Get the instancesCount value. - * - * @return the instancesCount value - */ - public Integer instancesCount() { - return this.instancesCount; - } - - /** - * Set the instancesCount value. - * - * @param instancesCount the instancesCount value to set - * @return the EntityTypeDefinition object itself. - */ - public EntityTypeDefinition withInstancesCount(Integer instancesCount) { - this.instancesCount = instancesCount; - return this; - } - - /** - * Get the lastChangedUtc value. - * - * @return the lastChangedUtc value - */ - public DateTime lastChangedUtc() { - return this.lastChangedUtc; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the schemaItemTypeLink value. - * - * @return the schemaItemTypeLink value - */ - public String schemaItemTypeLink() { - return this.schemaItemTypeLink; - } - - /** - * Set the schemaItemTypeLink value. - * - * @param schemaItemTypeLink the schemaItemTypeLink value to set - * @return the EntityTypeDefinition object itself. - */ - public EntityTypeDefinition withSchemaItemTypeLink(String schemaItemTypeLink) { - this.schemaItemTypeLink = schemaItemTypeLink; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the timestampFieldName value. - * - * @return the timestampFieldName value - */ - public String timestampFieldName() { - return this.timestampFieldName; - } - - /** - * Set the timestampFieldName value. - * - * @param timestampFieldName the timestampFieldName value to set - * @return the EntityTypeDefinition object itself. - */ - public EntityTypeDefinition withTimestampFieldName(String timestampFieldName) { - this.timestampFieldName = timestampFieldName; - return this; - } - - /** - * Get the typeName value. - * - * @return the typeName value - */ - public String typeName() { - return this.typeName; - } - - /** - * Set the typeName value. - * - * @param typeName the typeName value to set - * @return the EntityTypeDefinition object itself. - */ - public EntityTypeDefinition withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityTypes.java deleted file mode 100644 index b4f371147e7..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/EntityTypes.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for EntityTypes. - */ -public enum EntityTypes { - /** Enum value None. */ - NONE("None"), - - /** Enum value Profile. */ - PROFILE("Profile"), - - /** Enum value Interaction. */ - INTERACTION("Interaction"), - - /** Enum value Relationship. */ - RELATIONSHIP("Relationship"); - - /** The actual serialized value for a EntityTypes instance. */ - private String value; - - EntityTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a EntityTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed EntityTypes object, or null if unable to parse. - */ - @JsonCreator - public static EntityTypes fromString(String value) { - EntityTypes[] items = EntityTypes.values(); - for (EntityTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ErrorManagementTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ErrorManagementTypes.java deleted file mode 100644 index 04e63b77b7c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ErrorManagementTypes.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ErrorManagementTypes. - */ -public enum ErrorManagementTypes { - /** Enum value RejectAndContinue. */ - REJECT_AND_CONTINUE("RejectAndContinue"), - - /** Enum value StopImport. */ - STOP_IMPORT("StopImport"), - - /** Enum value RejectUntilLimit. */ - REJECT_UNTIL_LIMIT("RejectUntilLimit"); - - /** The actual serialized value for a ErrorManagementTypes instance. */ - private String value; - - ErrorManagementTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ErrorManagementTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed ErrorManagementTypes object, or null if unable to parse. - */ - @JsonCreator - public static ErrorManagementTypes fromString(String value) { - ErrorManagementTypes[] items = ErrorManagementTypes.values(); - for (ErrorManagementTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/FrequencyTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/FrequencyTypes.java deleted file mode 100644 index 65d17844ae7..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/FrequencyTypes.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for FrequencyTypes. - */ -public enum FrequencyTypes { - /** Enum value Minute. */ - MINUTE("Minute"), - - /** Enum value Hour. */ - HOUR("Hour"), - - /** Enum value Day. */ - DAY("Day"), - - /** Enum value Week. */ - WEEK("Week"), - - /** Enum value Month. */ - MONTH("Month"); - - /** The actual serialized value for a FrequencyTypes instance. */ - private String value; - - FrequencyTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a FrequencyTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed FrequencyTypes object, or null if unable to parse. - */ - @JsonCreator - public static FrequencyTypes fromString(String value) { - FrequencyTypes[] items = FrequencyTypes.values(); - for (FrequencyTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/HubBillingInfoFormat.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/HubBillingInfoFormat.java deleted file mode 100644 index ff294b1dcb0..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/HubBillingInfoFormat.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Hub billing info. - */ -public class HubBillingInfoFormat { - /** - * The sku name. - */ - @JsonProperty(value = "skuName") - private String skuName; - - /** - * The minimum number of units will be billed. One unit is 10,000 Profiles - * and 100,000 Interactions. - */ - @JsonProperty(value = "minUnits") - private Integer minUnits; - - /** - * The maximum number of units can be used. One unit is 10,000 Profiles - * and 100,000 Interactions. - */ - @JsonProperty(value = "maxUnits") - private Integer maxUnits; - - /** - * Get the skuName value. - * - * @return the skuName value - */ - public String skuName() { - return this.skuName; - } - - /** - * Set the skuName value. - * - * @param skuName the skuName value to set - * @return the HubBillingInfoFormat object itself. - */ - public HubBillingInfoFormat withSkuName(String skuName) { - this.skuName = skuName; - return this; - } - - /** - * Get the minUnits value. - * - * @return the minUnits value - */ - public Integer minUnits() { - return this.minUnits; - } - - /** - * Set the minUnits value. - * - * @param minUnits the minUnits value to set - * @return the HubBillingInfoFormat object itself. - */ - public HubBillingInfoFormat withMinUnits(Integer minUnits) { - this.minUnits = minUnits; - return this; - } - - /** - * Get the maxUnits value. - * - * @return the maxUnits value - */ - public Integer maxUnits() { - return this.maxUnits; - } - - /** - * Set the maxUnits value. - * - * @param maxUnits the maxUnits value to set - * @return the HubBillingInfoFormat object itself. - */ - public HubBillingInfoFormat withMaxUnits(Integer maxUnits) { - this.maxUnits = maxUnits; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/InstanceOperationType.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/InstanceOperationType.java deleted file mode 100644 index 22991b35b00..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/InstanceOperationType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for InstanceOperationType. - */ -public enum InstanceOperationType { - /** Enum value Upsert. */ - UPSERT("Upsert"), - - /** Enum value Delete. */ - DELETE("Delete"); - - /** The actual serialized value for a InstanceOperationType instance. */ - private String value; - - InstanceOperationType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a InstanceOperationType instance. - * - * @param value the serialized value to parse. - * @return the parsed InstanceOperationType object, or null if unable to parse. - */ - @JsonCreator - public static InstanceOperationType fromString(String value) { - InstanceOperationType[] items = InstanceOperationType.values(); - for (InstanceOperationType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiAlias.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiAlias.java deleted file mode 100644 index 9c711500701..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiAlias.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The KPI alias. - */ -public class KpiAlias { - /** - * KPI alias name. - */ - @JsonProperty(value = "aliasName", required = true) - private String aliasName; - - /** - * The expression. - */ - @JsonProperty(value = "expression", required = true) - private String expression; - - /** - * Get the aliasName value. - * - * @return the aliasName value - */ - public String aliasName() { - return this.aliasName; - } - - /** - * Set the aliasName value. - * - * @param aliasName the aliasName value to set - * @return the KpiAlias object itself. - */ - public KpiAlias withAliasName(String aliasName) { - this.aliasName = aliasName; - return this; - } - - /** - * Get the expression value. - * - * @return the expression value - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression value. - * - * @param expression the expression value to set - * @return the KpiAlias object itself. - */ - public KpiAlias withExpression(String expression) { - this.expression = expression; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiExtract.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiExtract.java deleted file mode 100644 index 240563fe3cb..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiExtract.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The KPI extract. - */ -public class KpiExtract { - /** - * KPI extract name. - */ - @JsonProperty(value = "extractName", required = true) - private String extractName; - - /** - * The expression. - */ - @JsonProperty(value = "expression", required = true) - private String expression; - - /** - * Get the extractName value. - * - * @return the extractName value - */ - public String extractName() { - return this.extractName; - } - - /** - * Set the extractName value. - * - * @param extractName the extractName value to set - * @return the KpiExtract object itself. - */ - public KpiExtract withExtractName(String extractName) { - this.extractName = extractName; - return this; - } - - /** - * Get the expression value. - * - * @return the expression value - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression value. - * - * @param expression the expression value to set - * @return the KpiExtract object itself. - */ - public KpiExtract withExpression(String expression) { - this.expression = expression; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiFunctions.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiFunctions.java deleted file mode 100644 index 9beb4e58ed4..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiFunctions.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for KpiFunctions. - */ -public enum KpiFunctions { - /** Enum value Sum. */ - SUM("Sum"), - - /** Enum value Avg. */ - AVG("Avg"), - - /** Enum value Min. */ - MIN("Min"), - - /** Enum value Max. */ - MAX("Max"), - - /** Enum value Last. */ - LAST("Last"), - - /** Enum value Count. */ - COUNT("Count"), - - /** Enum value None. */ - NONE("None"), - - /** Enum value CountDistinct. */ - COUNT_DISTINCT("CountDistinct"); - - /** The actual serialized value for a KpiFunctions instance. */ - private String value; - - KpiFunctions(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a KpiFunctions instance. - * - * @param value the serialized value to parse. - * @return the parsed KpiFunctions object, or null if unable to parse. - */ - @JsonCreator - public static KpiFunctions fromString(String value) { - KpiFunctions[] items = KpiFunctions.values(); - for (KpiFunctions item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiGroupByMetadata.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiGroupByMetadata.java deleted file mode 100644 index 2cef57d36d6..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiGroupByMetadata.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The KPI GroupBy field metadata. - */ -public class KpiGroupByMetadata { - /** - * The display name. - */ - @JsonProperty(value = "displayName") - private Map displayName; - - /** - * The name of the field. - */ - @JsonProperty(value = "fieldName") - private String fieldName; - - /** - * The type of the field. - */ - @JsonProperty(value = "fieldType") - private String fieldType; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the KpiGroupByMetadata object itself. - */ - public KpiGroupByMetadata withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the fieldName value. - * - * @return the fieldName value - */ - public String fieldName() { - return this.fieldName; - } - - /** - * Set the fieldName value. - * - * @param fieldName the fieldName value to set - * @return the KpiGroupByMetadata object itself. - */ - public KpiGroupByMetadata withFieldName(String fieldName) { - this.fieldName = fieldName; - return this; - } - - /** - * Get the fieldType value. - * - * @return the fieldType value - */ - public String fieldType() { - return this.fieldType; - } - - /** - * Set the fieldType value. - * - * @param fieldType the fieldType value to set - * @return the KpiGroupByMetadata object itself. - */ - public KpiGroupByMetadata withFieldType(String fieldType) { - this.fieldType = fieldType; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiParticipantProfilesMetadata.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiParticipantProfilesMetadata.java deleted file mode 100644 index 3bd1f2d9da7..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiParticipantProfilesMetadata.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The KPI participant profile metadata. - */ -public class KpiParticipantProfilesMetadata { - /** - * Name of the type. - */ - @JsonProperty(value = "typeName", required = true) - private String typeName; - - /** - * Get the typeName value. - * - * @return the typeName value - */ - public String typeName() { - return this.typeName; - } - - /** - * Set the typeName value. - * - * @param typeName the typeName value to set - * @return the KpiParticipantProfilesMetadata object itself. - */ - public KpiParticipantProfilesMetadata withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiThresholds.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiThresholds.java deleted file mode 100644 index 3df12fcfa3c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/KpiThresholds.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines the KPI Threshold limits. - */ -public class KpiThresholds { - /** - * The lower threshold limit. - */ - @JsonProperty(value = "lowerLimit", required = true) - private BigDecimal lowerLimit; - - /** - * The upper threshold limit. - */ - @JsonProperty(value = "upperLimit", required = true) - private BigDecimal upperLimit; - - /** - * Whether or not the KPI is an increasing KPI. - */ - @JsonProperty(value = "increasingKpi", required = true) - private boolean increasingKpi; - - /** - * Get the lowerLimit value. - * - * @return the lowerLimit value - */ - public BigDecimal lowerLimit() { - return this.lowerLimit; - } - - /** - * Set the lowerLimit value. - * - * @param lowerLimit the lowerLimit value to set - * @return the KpiThresholds object itself. - */ - public KpiThresholds withLowerLimit(BigDecimal lowerLimit) { - this.lowerLimit = lowerLimit; - return this; - } - - /** - * Get the upperLimit value. - * - * @return the upperLimit value - */ - public BigDecimal upperLimit() { - return this.upperLimit; - } - - /** - * Set the upperLimit value. - * - * @param upperLimit the upperLimit value to set - * @return the KpiThresholds object itself. - */ - public KpiThresholds withUpperLimit(BigDecimal upperLimit) { - this.upperLimit = upperLimit; - return this; - } - - /** - * Get the increasingKpi value. - * - * @return the increasingKpi value - */ - public boolean increasingKpi() { - return this.increasingKpi; - } - - /** - * Set the increasingKpi value. - * - * @param increasingKpi the increasingKpi value to set - * @return the KpiThresholds object itself. - */ - public KpiThresholds withIncreasingKpi(boolean increasingKpi) { - this.increasingKpi = increasingKpi; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/LinkTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/LinkTypes.java deleted file mode 100644 index cb4195208c1..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/LinkTypes.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for LinkTypes. - */ -public enum LinkTypes { - /** Enum value UpdateAlways. */ - UPDATE_ALWAYS("UpdateAlways"), - - /** Enum value CopyIfNull. */ - COPY_IF_NULL("CopyIfNull"); - - /** The actual serialized value for a LinkTypes instance. */ - private String value; - - LinkTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a LinkTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed LinkTypes object, or null if unable to parse. - */ - @JsonCreator - public static LinkTypes fromString(String value) { - LinkTypes[] items = LinkTypes.values(); - for (LinkTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/MetadataDefinitionBase.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/MetadataDefinitionBase.java deleted file mode 100644 index 8108eadb9b0..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/MetadataDefinitionBase.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.Map; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Metadata definition base. - */ -public class MetadataDefinitionBase { - /** - * The attributes for the Type. - */ - @JsonProperty(value = "attributes") - private Map> attributes; - - /** - * Localized descriptions for the property. - */ - @JsonProperty(value = "description") - private Map description; - - /** - * Localized display names for the property. - */ - @JsonProperty(value = "displayName") - private Map displayName; - - /** - * Any custom localized attributes for the Type. - */ - @JsonProperty(value = "localizedAttributes") - private Map> localizedAttributes; - - /** - * Small Image associated with the Property or EntityType. - */ - @JsonProperty(value = "smallImage") - private String smallImage; - - /** - * Medium Image associated with the Property or EntityType. - */ - @JsonProperty(value = "mediumImage") - private String mediumImage; - - /** - * Large Image associated with the Property or EntityType. - */ - @JsonProperty(value = "largeImage") - private String largeImage; - - /** - * Get the attributes value. - * - * @return the attributes value - */ - public Map> attributes() { - return this.attributes; - } - - /** - * Set the attributes value. - * - * @param attributes the attributes value to set - * @return the MetadataDefinitionBase object itself. - */ - public MetadataDefinitionBase withAttributes(Map> attributes) { - this.attributes = attributes; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the MetadataDefinitionBase object itself. - */ - public MetadataDefinitionBase withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the MetadataDefinitionBase object itself. - */ - public MetadataDefinitionBase withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the localizedAttributes value. - * - * @return the localizedAttributes value - */ - public Map> localizedAttributes() { - return this.localizedAttributes; - } - - /** - * Set the localizedAttributes value. - * - * @param localizedAttributes the localizedAttributes value to set - * @return the MetadataDefinitionBase object itself. - */ - public MetadataDefinitionBase withLocalizedAttributes(Map> localizedAttributes) { - this.localizedAttributes = localizedAttributes; - return this; - } - - /** - * Get the smallImage value. - * - * @return the smallImage value - */ - public String smallImage() { - return this.smallImage; - } - - /** - * Set the smallImage value. - * - * @param smallImage the smallImage value to set - * @return the MetadataDefinitionBase object itself. - */ - public MetadataDefinitionBase withSmallImage(String smallImage) { - this.smallImage = smallImage; - return this; - } - - /** - * Get the mediumImage value. - * - * @return the mediumImage value - */ - public String mediumImage() { - return this.mediumImage; - } - - /** - * Set the mediumImage value. - * - * @param mediumImage the mediumImage value to set - * @return the MetadataDefinitionBase object itself. - */ - public MetadataDefinitionBase withMediumImage(String mediumImage) { - this.mediumImage = mediumImage; - return this; - } - - /** - * Get the largeImage value. - * - * @return the largeImage value - */ - public String largeImage() { - return this.largeImage; - } - - /** - * Set the largeImage value. - * - * @param largeImage the largeImage value to set - * @return the MetadataDefinitionBase object itself. - */ - public MetadataDefinitionBase withLargeImage(String largeImage) { - this.largeImage = largeImage; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/Participant.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/Participant.java deleted file mode 100644 index b0168bb704c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/Participant.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes a profile type participating in an interaction. - */ -public class Participant { - /** - * Profile type name. - */ - @JsonProperty(value = "profileTypeName", required = true) - private String profileTypeName; - - /** - * The property references. - */ - @JsonProperty(value = "participantPropertyReferences", required = true) - private List participantPropertyReferences; - - /** - * Participant name. - */ - @JsonProperty(value = "participantName", required = true) - private String participantName; - - /** - * Localized display name. - */ - @JsonProperty(value = "displayName") - private Map displayName; - - /** - * Localized descriptions. - */ - @JsonProperty(value = "description") - private Map description; - - /** - * The role that the participant is playing in the interaction. - */ - @JsonProperty(value = "role") - private String role; - - /** - * Get the profileTypeName value. - * - * @return the profileTypeName value - */ - public String profileTypeName() { - return this.profileTypeName; - } - - /** - * Set the profileTypeName value. - * - * @param profileTypeName the profileTypeName value to set - * @return the Participant object itself. - */ - public Participant withProfileTypeName(String profileTypeName) { - this.profileTypeName = profileTypeName; - return this; - } - - /** - * Get the participantPropertyReferences value. - * - * @return the participantPropertyReferences value - */ - public List participantPropertyReferences() { - return this.participantPropertyReferences; - } - - /** - * Set the participantPropertyReferences value. - * - * @param participantPropertyReferences the participantPropertyReferences value to set - * @return the Participant object itself. - */ - public Participant withParticipantPropertyReferences(List participantPropertyReferences) { - this.participantPropertyReferences = participantPropertyReferences; - return this; - } - - /** - * Get the participantName value. - * - * @return the participantName value - */ - public String participantName() { - return this.participantName; - } - - /** - * Set the participantName value. - * - * @param participantName the participantName value to set - * @return the Participant object itself. - */ - public Participant withParticipantName(String participantName) { - this.participantName = participantName; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the Participant object itself. - */ - public Participant withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the Participant object itself. - */ - public Participant withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the role value. - * - * @return the role value - */ - public String role() { - return this.role; - } - - /** - * Set the role value. - * - * @param role the role value to set - * @return the Participant object itself. - */ - public Participant withRole(String role) { - this.role = role; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ParticipantProfilePropertyReference.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ParticipantProfilePropertyReference.java deleted file mode 100644 index d70bf85ad9e..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ParticipantProfilePropertyReference.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The participant profile property reference. - */ -public class ParticipantProfilePropertyReference { - /** - * The source interaction property that maps to the target profile - * property. - */ - @JsonProperty(value = "interactionPropertyName", required = true) - private String interactionPropertyName; - - /** - * The target profile property that maps to the source interaction - * property. - */ - @JsonProperty(value = "profilePropertyName", required = true) - private String profilePropertyName; - - /** - * Get the interactionPropertyName value. - * - * @return the interactionPropertyName value - */ - public String interactionPropertyName() { - return this.interactionPropertyName; - } - - /** - * Set the interactionPropertyName value. - * - * @param interactionPropertyName the interactionPropertyName value to set - * @return the ParticipantProfilePropertyReference object itself. - */ - public ParticipantProfilePropertyReference withInteractionPropertyName(String interactionPropertyName) { - this.interactionPropertyName = interactionPropertyName; - return this; - } - - /** - * Get the profilePropertyName value. - * - * @return the profilePropertyName value - */ - public String profilePropertyName() { - return this.profilePropertyName; - } - - /** - * Set the profilePropertyName value. - * - * @param profilePropertyName the profilePropertyName value to set - * @return the ParticipantProfilePropertyReference object itself. - */ - public ParticipantProfilePropertyReference withProfilePropertyName(String profilePropertyName) { - this.profilePropertyName = profilePropertyName; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ParticipantPropertyReference.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ParticipantPropertyReference.java deleted file mode 100644 index 851788fdc21..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ParticipantPropertyReference.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The participant property reference. - */ -public class ParticipantPropertyReference { - /** - * The source property that maps to the target property. - */ - @JsonProperty(value = "sourcePropertyName", required = true) - private String sourcePropertyName; - - /** - * The target property that maps to the source property. - */ - @JsonProperty(value = "targetPropertyName", required = true) - private String targetPropertyName; - - /** - * Get the sourcePropertyName value. - * - * @return the sourcePropertyName value - */ - public String sourcePropertyName() { - return this.sourcePropertyName; - } - - /** - * Set the sourcePropertyName value. - * - * @param sourcePropertyName the sourcePropertyName value to set - * @return the ParticipantPropertyReference object itself. - */ - public ParticipantPropertyReference withSourcePropertyName(String sourcePropertyName) { - this.sourcePropertyName = sourcePropertyName; - return this; - } - - /** - * Get the targetPropertyName value. - * - * @return the targetPropertyName value - */ - public String targetPropertyName() { - return this.targetPropertyName; - } - - /** - * Set the targetPropertyName value. - * - * @param targetPropertyName the targetPropertyName value to set - * @return the ParticipantPropertyReference object itself. - */ - public ParticipantPropertyReference withTargetPropertyName(String targetPropertyName) { - this.targetPropertyName = targetPropertyName; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/PermissionTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/PermissionTypes.java deleted file mode 100644 index 12a29ddf50f..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/PermissionTypes.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for PermissionTypes. - */ -public enum PermissionTypes { - /** Enum value Read. */ - READ("Read"), - - /** Enum value Write. */ - WRITE("Write"), - - /** Enum value Manage. */ - MANAGE("Manage"); - - /** The actual serialized value for a PermissionTypes instance. */ - private String value; - - PermissionTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a PermissionTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed PermissionTypes object, or null if unable to parse. - */ - @JsonCreator - public static PermissionTypes fromString(String value) { - PermissionTypes[] items = PermissionTypes.values(); - for (PermissionTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProfileEnumValidValuesFormat.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProfileEnumValidValuesFormat.java deleted file mode 100644 index c876c418604..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProfileEnumValidValuesFormat.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Valid enum values in case of an enum property. - */ -public class ProfileEnumValidValuesFormat { - /** - * The integer value of the enum member. - */ - @JsonProperty(value = "value") - private Integer value; - - /** - * Localized names of the enum member. - */ - @JsonProperty(value = "localizedValueNames") - private Map localizedValueNames; - - /** - * Get the value value. - * - * @return the value value - */ - public Integer value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the ProfileEnumValidValuesFormat object itself. - */ - public ProfileEnumValidValuesFormat withValue(Integer value) { - this.value = value; - return this; - } - - /** - * Get the localizedValueNames value. - * - * @return the localizedValueNames value - */ - public Map localizedValueNames() { - return this.localizedValueNames; - } - - /** - * Set the localizedValueNames value. - * - * @param localizedValueNames the localizedValueNames value to set - * @return the ProfileEnumValidValuesFormat object itself. - */ - public ProfileEnumValidValuesFormat withLocalizedValueNames(Map localizedValueNames) { - this.localizedValueNames = localizedValueNames; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/PropertyDefinition.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/PropertyDefinition.java deleted file mode 100644 index fe066443df0..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/PropertyDefinition.java +++ /dev/null @@ -1,426 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Property definition. - */ -public class PropertyDefinition { - /** - * Array value separator for properties with isArray set. - */ - @JsonProperty(value = "arrayValueSeparator") - private String arrayValueSeparator; - - /** - * Describes valid values for an enum property. - */ - @JsonProperty(value = "enumValidValues") - private List enumValidValues; - - /** - * Name of the property. - */ - @JsonProperty(value = "fieldName", required = true) - private String fieldName; - - /** - * Type of the property. - */ - @JsonProperty(value = "fieldType", required = true) - private String fieldType; - - /** - * Indicates if the property is actually an array of the fieldType above on - * the data api. - */ - @JsonProperty(value = "isArray") - private Boolean isArray; - - /** - * Indicates if the property is an enum. - */ - @JsonProperty(value = "isEnum") - private Boolean isEnum; - - /** - * Indicates if the property is an flag enum. - */ - @JsonProperty(value = "isFlagEnum") - private Boolean isFlagEnum; - - /** - * Whether the property is an Image. - */ - @JsonProperty(value = "isImage") - private Boolean isImage; - - /** - * Whether the property is a localized string. - */ - @JsonProperty(value = "isLocalizedString") - private Boolean isLocalizedString; - - /** - * Whether the property is a name or a part of name. - */ - @JsonProperty(value = "isName") - private Boolean isName; - - /** - * Whether property value is required on instances, IsRequired field only - * for Intercation. Profile Instance will not check for required field. - */ - @JsonProperty(value = "isRequired") - private Boolean isRequired; - - /** - * The ID associated with the property. - */ - @JsonProperty(value = "propertyId") - private String propertyId; - - /** - * URL encoded schema.org item prop link for the property. - */ - @JsonProperty(value = "schemaItemPropLink") - private String schemaItemPropLink; - - /** - * Max length of string. Used only if type is string. - */ - @JsonProperty(value = "maxLength") - private Integer maxLength; - - /** - * Whether property is available in graph or not. - */ - @JsonProperty(value = "isAvailableInGraph") - private Boolean isAvailableInGraph; - - /** - * This is specific to interactions modeled as activities. Data sources are - * used to determine where data is stored and also in precedence rules. - */ - @JsonProperty(value = "dataSourcePrecedenceRules", access = JsonProperty.Access.WRITE_ONLY) - private List dataSourcePrecedenceRules; - - /** - * Get the arrayValueSeparator value. - * - * @return the arrayValueSeparator value - */ - public String arrayValueSeparator() { - return this.arrayValueSeparator; - } - - /** - * Set the arrayValueSeparator value. - * - * @param arrayValueSeparator the arrayValueSeparator value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withArrayValueSeparator(String arrayValueSeparator) { - this.arrayValueSeparator = arrayValueSeparator; - return this; - } - - /** - * Get the enumValidValues value. - * - * @return the enumValidValues value - */ - public List enumValidValues() { - return this.enumValidValues; - } - - /** - * Set the enumValidValues value. - * - * @param enumValidValues the enumValidValues value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withEnumValidValues(List enumValidValues) { - this.enumValidValues = enumValidValues; - return this; - } - - /** - * Get the fieldName value. - * - * @return the fieldName value - */ - public String fieldName() { - return this.fieldName; - } - - /** - * Set the fieldName value. - * - * @param fieldName the fieldName value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withFieldName(String fieldName) { - this.fieldName = fieldName; - return this; - } - - /** - * Get the fieldType value. - * - * @return the fieldType value - */ - public String fieldType() { - return this.fieldType; - } - - /** - * Set the fieldType value. - * - * @param fieldType the fieldType value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withFieldType(String fieldType) { - this.fieldType = fieldType; - return this; - } - - /** - * Get the isArray value. - * - * @return the isArray value - */ - public Boolean isArray() { - return this.isArray; - } - - /** - * Set the isArray value. - * - * @param isArray the isArray value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withIsArray(Boolean isArray) { - this.isArray = isArray; - return this; - } - - /** - * Get the isEnum value. - * - * @return the isEnum value - */ - public Boolean isEnum() { - return this.isEnum; - } - - /** - * Set the isEnum value. - * - * @param isEnum the isEnum value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withIsEnum(Boolean isEnum) { - this.isEnum = isEnum; - return this; - } - - /** - * Get the isFlagEnum value. - * - * @return the isFlagEnum value - */ - public Boolean isFlagEnum() { - return this.isFlagEnum; - } - - /** - * Set the isFlagEnum value. - * - * @param isFlagEnum the isFlagEnum value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withIsFlagEnum(Boolean isFlagEnum) { - this.isFlagEnum = isFlagEnum; - return this; - } - - /** - * Get the isImage value. - * - * @return the isImage value - */ - public Boolean isImage() { - return this.isImage; - } - - /** - * Set the isImage value. - * - * @param isImage the isImage value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withIsImage(Boolean isImage) { - this.isImage = isImage; - return this; - } - - /** - * Get the isLocalizedString value. - * - * @return the isLocalizedString value - */ - public Boolean isLocalizedString() { - return this.isLocalizedString; - } - - /** - * Set the isLocalizedString value. - * - * @param isLocalizedString the isLocalizedString value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withIsLocalizedString(Boolean isLocalizedString) { - this.isLocalizedString = isLocalizedString; - return this; - } - - /** - * Get the isName value. - * - * @return the isName value - */ - public Boolean isName() { - return this.isName; - } - - /** - * Set the isName value. - * - * @param isName the isName value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withIsName(Boolean isName) { - this.isName = isName; - return this; - } - - /** - * Get the isRequired value. - * - * @return the isRequired value - */ - public Boolean isRequired() { - return this.isRequired; - } - - /** - * Set the isRequired value. - * - * @param isRequired the isRequired value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withIsRequired(Boolean isRequired) { - this.isRequired = isRequired; - return this; - } - - /** - * Get the propertyId value. - * - * @return the propertyId value - */ - public String propertyId() { - return this.propertyId; - } - - /** - * Set the propertyId value. - * - * @param propertyId the propertyId value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withPropertyId(String propertyId) { - this.propertyId = propertyId; - return this; - } - - /** - * Get the schemaItemPropLink value. - * - * @return the schemaItemPropLink value - */ - public String schemaItemPropLink() { - return this.schemaItemPropLink; - } - - /** - * Set the schemaItemPropLink value. - * - * @param schemaItemPropLink the schemaItemPropLink value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withSchemaItemPropLink(String schemaItemPropLink) { - this.schemaItemPropLink = schemaItemPropLink; - return this; - } - - /** - * Get the maxLength value. - * - * @return the maxLength value - */ - public Integer maxLength() { - return this.maxLength; - } - - /** - * Set the maxLength value. - * - * @param maxLength the maxLength value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withMaxLength(Integer maxLength) { - this.maxLength = maxLength; - return this; - } - - /** - * Get the isAvailableInGraph value. - * - * @return the isAvailableInGraph value - */ - public Boolean isAvailableInGraph() { - return this.isAvailableInGraph; - } - - /** - * Set the isAvailableInGraph value. - * - * @param isAvailableInGraph the isAvailableInGraph value to set - * @return the PropertyDefinition object itself. - */ - public PropertyDefinition withIsAvailableInGraph(Boolean isAvailableInGraph) { - this.isAvailableInGraph = isAvailableInGraph; - return this; - } - - /** - * Get the dataSourcePrecedenceRules value. - * - * @return the dataSourcePrecedenceRules value - */ - public List dataSourcePrecedenceRules() { - return this.dataSourcePrecedenceRules; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProvisioningStates.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProvisioningStates.java deleted file mode 100644 index 86cafd00105..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProvisioningStates.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ProvisioningStates. - */ -public final class ProvisioningStates { - /** Static value Provisioning for ProvisioningStates. */ - public static final ProvisioningStates PROVISIONING = new ProvisioningStates("Provisioning"); - - /** Static value Succeeded for ProvisioningStates. */ - public static final ProvisioningStates SUCCEEDED = new ProvisioningStates("Succeeded"); - - /** Static value Expiring for ProvisioningStates. */ - public static final ProvisioningStates EXPIRING = new ProvisioningStates("Expiring"); - - /** Static value Deleting for ProvisioningStates. */ - public static final ProvisioningStates DELETING = new ProvisioningStates("Deleting"); - - /** Static value HumanIntervention for ProvisioningStates. */ - public static final ProvisioningStates HUMAN_INTERVENTION = new ProvisioningStates("HumanIntervention"); - - /** Static value Failed for ProvisioningStates. */ - public static final ProvisioningStates FAILED = new ProvisioningStates("Failed"); - - private String value; - - /** - * Creates a custom value for ProvisioningStates. - * @param value the custom value - */ - public ProvisioningStates(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ProvisioningStates)) { - return false; - } - if (obj == this) { - return true; - } - ProvisioningStates rhs = (ProvisioningStates) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProxyResource.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProxyResource.java deleted file mode 100644 index ad62fda279a..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ProxyResource.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Common properties of proxy resource. - */ -public class ProxyResource { - /** - * Resource ID. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Resource name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipLinkFieldMapping.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipLinkFieldMapping.java deleted file mode 100644 index d3cab500732..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipLinkFieldMapping.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The fields mapping for Relationships. - */ -public class RelationshipLinkFieldMapping { - /** - * The field name on the Interaction Type. - */ - @JsonProperty(value = "interactionFieldName", required = true) - private String interactionFieldName; - - /** - * Link type. Possible values include: 'UpdateAlways', 'CopyIfNull'. - */ - @JsonProperty(value = "linkType") - private LinkTypes linkType; - - /** - * The field name on the Relationship metadata. - */ - @JsonProperty(value = "relationshipFieldName", required = true) - private String relationshipFieldName; - - /** - * Get the interactionFieldName value. - * - * @return the interactionFieldName value - */ - public String interactionFieldName() { - return this.interactionFieldName; - } - - /** - * Set the interactionFieldName value. - * - * @param interactionFieldName the interactionFieldName value to set - * @return the RelationshipLinkFieldMapping object itself. - */ - public RelationshipLinkFieldMapping withInteractionFieldName(String interactionFieldName) { - this.interactionFieldName = interactionFieldName; - return this; - } - - /** - * Get the linkType value. - * - * @return the linkType value - */ - public LinkTypes linkType() { - return this.linkType; - } - - /** - * Set the linkType value. - * - * @param linkType the linkType value to set - * @return the RelationshipLinkFieldMapping object itself. - */ - public RelationshipLinkFieldMapping withLinkType(LinkTypes linkType) { - this.linkType = linkType; - return this; - } - - /** - * Get the relationshipFieldName value. - * - * @return the relationshipFieldName value - */ - public String relationshipFieldName() { - return this.relationshipFieldName; - } - - /** - * Set the relationshipFieldName value. - * - * @param relationshipFieldName the relationshipFieldName value to set - * @return the RelationshipLinkFieldMapping object itself. - */ - public RelationshipLinkFieldMapping withRelationshipFieldName(String relationshipFieldName) { - this.relationshipFieldName = relationshipFieldName; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipTypeFieldMapping.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipTypeFieldMapping.java deleted file mode 100644 index c2171d1b74f..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipTypeFieldMapping.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Map a field of profile to its corresponding StrongId in Related Profile. - */ -public class RelationshipTypeFieldMapping { - /** - * Specifies the fieldName in profile. - */ - @JsonProperty(value = "profileFieldName", required = true) - private String profileFieldName; - - /** - * Specifies the KeyProperty (from StrongId) of the related profile. - */ - @JsonProperty(value = "relatedProfileKeyProperty", required = true) - private String relatedProfileKeyProperty; - - /** - * Get the profileFieldName value. - * - * @return the profileFieldName value - */ - public String profileFieldName() { - return this.profileFieldName; - } - - /** - * Set the profileFieldName value. - * - * @param profileFieldName the profileFieldName value to set - * @return the RelationshipTypeFieldMapping object itself. - */ - public RelationshipTypeFieldMapping withProfileFieldName(String profileFieldName) { - this.profileFieldName = profileFieldName; - return this; - } - - /** - * Get the relatedProfileKeyProperty value. - * - * @return the relatedProfileKeyProperty value - */ - public String relatedProfileKeyProperty() { - return this.relatedProfileKeyProperty; - } - - /** - * Set the relatedProfileKeyProperty value. - * - * @param relatedProfileKeyProperty the relatedProfileKeyProperty value to set - * @return the RelationshipTypeFieldMapping object itself. - */ - public RelationshipTypeFieldMapping withRelatedProfileKeyProperty(String relatedProfileKeyProperty) { - this.relatedProfileKeyProperty = relatedProfileKeyProperty; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipTypeMapping.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipTypeMapping.java deleted file mode 100644 index 6a6971002e0..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipTypeMapping.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Maps fields in Profile to their corresponding StrongIds in Related Profile. - */ -public class RelationshipTypeMapping { - /** - * Maps a profile property with the StrongId of related profile. This is an - * array to support StrongIds that are composite key as well. - */ - @JsonProperty(value = "fieldMappings", required = true) - private List fieldMappings; - - /** - * Get the fieldMappings value. - * - * @return the fieldMappings value - */ - public List fieldMappings() { - return this.fieldMappings; - } - - /** - * Set the fieldMappings value. - * - * @param fieldMappings the fieldMappings value to set - * @return the RelationshipTypeMapping object itself. - */ - public RelationshipTypeMapping withFieldMappings(List fieldMappings) { - this.fieldMappings = fieldMappings; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipsLookup.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipsLookup.java deleted file mode 100644 index 9ec4cf06cf6..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RelationshipsLookup.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The definition of suggested relationship for the type. - */ -public class RelationshipsLookup { - /** - * The relationship profile. - */ - @JsonProperty(value = "profileName", access = JsonProperty.Access.WRITE_ONLY) - private String profileName; - - /** - * The property references for the profile type. - */ - @JsonProperty(value = "profilePropertyReferences", access = JsonProperty.Access.WRITE_ONLY) - private List profilePropertyReferences; - - /** - * The related profile. - */ - @JsonProperty(value = "relatedProfileName", access = JsonProperty.Access.WRITE_ONLY) - private String relatedProfileName; - - /** - * The property references for the related profile type. - */ - @JsonProperty(value = "relatedProfilePropertyReferences", access = JsonProperty.Access.WRITE_ONLY) - private List relatedProfilePropertyReferences; - - /** - * The name of existing Relationship. - */ - @JsonProperty(value = "existingRelationshipName", access = JsonProperty.Access.WRITE_ONLY) - private String existingRelationshipName; - - /** - * Get the profileName value. - * - * @return the profileName value - */ - public String profileName() { - return this.profileName; - } - - /** - * Get the profilePropertyReferences value. - * - * @return the profilePropertyReferences value - */ - public List profilePropertyReferences() { - return this.profilePropertyReferences; - } - - /** - * Get the relatedProfileName value. - * - * @return the relatedProfileName value - */ - public String relatedProfileName() { - return this.relatedProfileName; - } - - /** - * Get the relatedProfilePropertyReferences value. - * - * @return the relatedProfilePropertyReferences value - */ - public List relatedProfilePropertyReferences() { - return this.relatedProfilePropertyReferences; - } - - /** - * Get the existingRelationshipName value. - * - * @return the existingRelationshipName value - */ - public String existingRelationshipName() { - return this.existingRelationshipName; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ResourceSetDescription.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ResourceSetDescription.java deleted file mode 100644 index 2e49c4d584c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/ResourceSetDescription.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The resource set description. - */ -public class ResourceSetDescription { - /** - * The elements included in the set. - */ - @JsonProperty(value = "elements") - private List elements; - - /** - * The elements that are not included in the set, in case elements contains - * '*' indicating 'all'. - */ - @JsonProperty(value = "exceptions") - private List exceptions; - - /** - * Get the elements value. - * - * @return the elements value - */ - public List elements() { - return this.elements; - } - - /** - * Set the elements value. - * - * @param elements the elements value to set - * @return the ResourceSetDescription object itself. - */ - public ResourceSetDescription withElements(List elements) { - this.elements = elements; - return this; - } - - /** - * Get the exceptions value. - * - * @return the exceptions value - */ - public List exceptions() { - return this.exceptions; - } - - /** - * Set the exceptions value. - * - * @param exceptions the exceptions value to set - * @return the ResourceSetDescription object itself. - */ - public ResourceSetDescription withExceptions(List exceptions) { - this.exceptions = exceptions; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RoleTypes.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RoleTypes.java deleted file mode 100644 index 094d4dd8037..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/RoleTypes.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for RoleTypes. - */ -public enum RoleTypes { - /** Enum value Admin. */ - ADMIN("Admin"), - - /** Enum value Reader. */ - READER("Reader"), - - /** Enum value ManageAdmin. */ - MANAGE_ADMIN("ManageAdmin"), - - /** Enum value ManageReader. */ - MANAGE_READER("ManageReader"), - - /** Enum value DataAdmin. */ - DATA_ADMIN("DataAdmin"), - - /** Enum value DataReader. */ - DATA_READER("DataReader"); - - /** The actual serialized value for a RoleTypes instance. */ - private String value; - - RoleTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a RoleTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed RoleTypes object, or null if unable to parse. - */ - @JsonCreator - public static RoleTypes fromString(String value) { - RoleTypes[] items = RoleTypes.values(); - for (RoleTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceConnectorProperties.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceConnectorProperties.java deleted file mode 100644 index 7ede2b87132..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceConnectorProperties.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Salesforce connector properties. - */ -public class SalesforceConnectorProperties { - /** - * The user settings. - */ - @JsonProperty(value = "usersetting", required = true) - private SalesforceDiscoverSetting usersetting; - - /** - * The Salesforce tables. - */ - @JsonProperty(value = "salesforcetables", required = true) - private List salesforcetables; - - /** - * Get the usersetting value. - * - * @return the usersetting value - */ - public SalesforceDiscoverSetting usersetting() { - return this.usersetting; - } - - /** - * Set the usersetting value. - * - * @param usersetting the usersetting value to set - * @return the SalesforceConnectorProperties object itself. - */ - public SalesforceConnectorProperties withUsersetting(SalesforceDiscoverSetting usersetting) { - this.usersetting = usersetting; - return this; - } - - /** - * Get the salesforcetables value. - * - * @return the salesforcetables value - */ - public List salesforcetables() { - return this.salesforcetables; - } - - /** - * Set the salesforcetables value. - * - * @param salesforcetables the salesforcetables value to set - * @return the SalesforceConnectorProperties object itself. - */ - public SalesforceConnectorProperties withSalesforcetables(List salesforcetables) { - this.salesforcetables = salesforcetables; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceDiscoverSetting.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceDiscoverSetting.java deleted file mode 100644 index a25a813f3e7..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceDiscoverSetting.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Salesforce discover setting. - */ -public class SalesforceDiscoverSetting { - /** - * The salesforce connection string secret URL. - */ - @JsonProperty(value = "salesforceConnectionStringSecretUrl", required = true) - private String salesforceConnectionStringSecretUrl; - - /** - * Get the salesforceConnectionStringSecretUrl value. - * - * @return the salesforceConnectionStringSecretUrl value - */ - public String salesforceConnectionStringSecretUrl() { - return this.salesforceConnectionStringSecretUrl; - } - - /** - * Set the salesforceConnectionStringSecretUrl value. - * - * @param salesforceConnectionStringSecretUrl the salesforceConnectionStringSecretUrl value to set - * @return the SalesforceDiscoverSetting object itself. - */ - public SalesforceDiscoverSetting withSalesforceConnectionStringSecretUrl(String salesforceConnectionStringSecretUrl) { - this.salesforceConnectionStringSecretUrl = salesforceConnectionStringSecretUrl; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceTable.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceTable.java deleted file mode 100644 index f89da40f1be..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/SalesforceTable.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Salesforce table. - */ -public class SalesforceTable { - /** - * Indicating whether this instance is profile. - */ - @JsonProperty(value = "isProfile") - private String isProfile; - - /** - * The table category. - */ - @JsonProperty(value = "tableCategory", required = true) - private String tableCategory; - - /** - * The name of the table. - */ - @JsonProperty(value = "tableName", required = true) - private String tableName; - - /** - * The table remarks. - */ - @JsonProperty(value = "tableRemarks") - private String tableRemarks; - - /** - * The table schema. - */ - @JsonProperty(value = "tableSchema", required = true) - private String tableSchema; - - /** - * Get the isProfile value. - * - * @return the isProfile value - */ - public String isProfile() { - return this.isProfile; - } - - /** - * Set the isProfile value. - * - * @param isProfile the isProfile value to set - * @return the SalesforceTable object itself. - */ - public SalesforceTable withIsProfile(String isProfile) { - this.isProfile = isProfile; - return this; - } - - /** - * Get the tableCategory value. - * - * @return the tableCategory value - */ - public String tableCategory() { - return this.tableCategory; - } - - /** - * Set the tableCategory value. - * - * @param tableCategory the tableCategory value to set - * @return the SalesforceTable object itself. - */ - public SalesforceTable withTableCategory(String tableCategory) { - this.tableCategory = tableCategory; - return this; - } - - /** - * Get the tableName value. - * - * @return the tableName value - */ - public String tableName() { - return this.tableName; - } - - /** - * Set the tableName value. - * - * @param tableName the tableName value to set - * @return the SalesforceTable object itself. - */ - public SalesforceTable withTableName(String tableName) { - this.tableName = tableName; - return this; - } - - /** - * Get the tableRemarks value. - * - * @return the tableRemarks value - */ - public String tableRemarks() { - return this.tableRemarks; - } - - /** - * Set the tableRemarks value. - * - * @param tableRemarks the tableRemarks value to set - * @return the SalesforceTable object itself. - */ - public SalesforceTable withTableRemarks(String tableRemarks) { - this.tableRemarks = tableRemarks; - return this; - } - - /** - * Get the tableSchema value. - * - * @return the tableSchema value - */ - public String tableSchema() { - return this.tableSchema; - } - - /** - * Set the tableSchema value. - * - * @param tableSchema the tableSchema value to set - * @return the SalesforceTable object itself. - */ - public SalesforceTable withTableSchema(String tableSchema) { - this.tableSchema = tableSchema; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/Status.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/Status.java deleted file mode 100644 index 8a48c5459b2..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/Status.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for Status. - */ -public final class Status { - /** Static value None for Status. */ - public static final Status NONE = new Status("None"); - - /** Static value Active for Status. */ - public static final Status ACTIVE = new Status("Active"); - - /** Static value Deleted for Status. */ - public static final Status DELETED = new Status("Deleted"); - - private String value; - - /** - * Creates a custom value for Status. - * @param value the custom value - */ - public Status(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof Status)) { - return false; - } - if (obj == this) { - return true; - } - Status rhs = (Status) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/StrongId.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/StrongId.java deleted file mode 100644 index 9cbd46bfb34..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/StrongId.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Property/Properties which represent a unique ID. - */ -public class StrongId { - /** - * The properties which make up the unique ID. - */ - @JsonProperty(value = "keyPropertyNames", required = true) - private List keyPropertyNames; - - /** - * The Name identifying the strong ID. - */ - @JsonProperty(value = "strongIdName", required = true) - private String strongIdName; - - /** - * Localized display name. - */ - @JsonProperty(value = "displayName") - private Map displayName; - - /** - * Localized descriptions. - */ - @JsonProperty(value = "description") - private Map description; - - /** - * Get the keyPropertyNames value. - * - * @return the keyPropertyNames value - */ - public List keyPropertyNames() { - return this.keyPropertyNames; - } - - /** - * Set the keyPropertyNames value. - * - * @param keyPropertyNames the keyPropertyNames value to set - * @return the StrongId object itself. - */ - public StrongId withKeyPropertyNames(List keyPropertyNames) { - this.keyPropertyNames = keyPropertyNames; - return this; - } - - /** - * Get the strongIdName value. - * - * @return the strongIdName value - */ - public String strongIdName() { - return this.strongIdName; - } - - /** - * Set the strongIdName value. - * - * @param strongIdName the strongIdName value to set - * @return the StrongId object itself. - */ - public StrongId withStrongIdName(String strongIdName) { - this.strongIdName = strongIdName; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the StrongId object itself. - */ - public StrongId withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the StrongId object itself. - */ - public StrongId withDescription(Map description) { - this.description = description; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/TypePropertiesMapping.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/TypePropertiesMapping.java deleted file mode 100644 index e6b74cab5dd..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/TypePropertiesMapping.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Metadata for a Link's property mapping. - */ -public class TypePropertiesMapping { - /** - * Property name on the source Entity Type. - */ - @JsonProperty(value = "sourcePropertyName", required = true) - private String sourcePropertyName; - - /** - * Property name on the target Entity Type. - */ - @JsonProperty(value = "targetPropertyName", required = true) - private String targetPropertyName; - - /** - * Link type. Possible values include: 'UpdateAlways', 'CopyIfNull'. - */ - @JsonProperty(value = "linkType") - private LinkTypes linkType; - - /** - * Get the sourcePropertyName value. - * - * @return the sourcePropertyName value - */ - public String sourcePropertyName() { - return this.sourcePropertyName; - } - - /** - * Set the sourcePropertyName value. - * - * @param sourcePropertyName the sourcePropertyName value to set - * @return the TypePropertiesMapping object itself. - */ - public TypePropertiesMapping withSourcePropertyName(String sourcePropertyName) { - this.sourcePropertyName = sourcePropertyName; - return this; - } - - /** - * Get the targetPropertyName value. - * - * @return the targetPropertyName value - */ - public String targetPropertyName() { - return this.targetPropertyName; - } - - /** - * Set the targetPropertyName value. - * - * @param targetPropertyName the targetPropertyName value to set - * @return the TypePropertiesMapping object itself. - */ - public TypePropertiesMapping withTargetPropertyName(String targetPropertyName) { - this.targetPropertyName = targetPropertyName; - return this; - } - - /** - * Get the linkType value. - * - * @return the linkType value - */ - public LinkTypes linkType() { - return this.linkType; - } - - /** - * Set the linkType value. - * - * @param linkType the linkType value to set - * @return the TypePropertiesMapping object itself. - */ - public TypePropertiesMapping withLinkType(LinkTypes linkType) { - this.linkType = linkType; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPoliciesInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPoliciesInner.java deleted file mode 100644 index d2aa5e552c9..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPoliciesInner.java +++ /dev/null @@ -1,705 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in AuthorizationPolicies. - */ -public class AuthorizationPoliciesInner { - /** The Retrofit service to perform REST calls. */ - private AuthorizationPoliciesService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of AuthorizationPoliciesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public AuthorizationPoliciesInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(AuthorizationPoliciesService.class); - this.client = client; - } - - /** - * The interface defining all the services for AuthorizationPolicies to be - * used by Retrofit to perform actually REST calls. - */ - interface AuthorizationPoliciesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.AuthorizationPolicies createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("authorizationPolicyName") String authorizationPolicyName, @Path("subscriptionId") String subscriptionId, @Body AuthorizationPolicyResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.AuthorizationPolicies get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("authorizationPolicyName") String authorizationPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.AuthorizationPolicies listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.AuthorizationPolicies regeneratePrimaryKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/regeneratePrimaryKey") - Observable> regeneratePrimaryKey(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("authorizationPolicyName") String authorizationPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.AuthorizationPolicies regenerateSecondaryKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/regenerateSecondaryKey") - Observable> regenerateSecondaryKey(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("authorizationPolicyName") String authorizationPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.AuthorizationPolicies listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates an authorization policy or updates an existing authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @param parameters Parameters supplied to the CreateOrUpdate authorization policy operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationPolicyResourceFormatInner object if successful. - */ - public AuthorizationPolicyResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String authorizationPolicyName, AuthorizationPolicyResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName, parameters).toBlocking().single().body(); - } - - /** - * Creates an authorization policy or updates an existing authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @param parameters Parameters supplied to the CreateOrUpdate authorization policy operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String authorizationPolicyName, AuthorizationPolicyResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName, parameters), serviceCallback); - } - - /** - * Creates an authorization policy or updates an existing authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @param parameters Parameters supplied to the CreateOrUpdate authorization policy operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationPolicyResourceFormatInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String authorizationPolicyName, AuthorizationPolicyResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName, parameters).map(new Func1, AuthorizationPolicyResourceFormatInner>() { - @Override - public AuthorizationPolicyResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates an authorization policy or updates an existing authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @param parameters Parameters supplied to the CreateOrUpdate authorization policy operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationPolicyResourceFormatInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String authorizationPolicyName, AuthorizationPolicyResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (authorizationPolicyName == null) { - throw new IllegalArgumentException("Parameter authorizationPolicyName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, hubName, authorizationPolicyName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an authorization policy in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationPolicyResourceFormatInner object if successful. - */ - public AuthorizationPolicyResourceFormatInner get(String resourceGroupName, String hubName, String authorizationPolicyName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName).toBlocking().single().body(); - } - - /** - * Gets an authorization policy in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String authorizationPolicyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName), serviceCallback); - } - - /** - * Gets an authorization policy in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationPolicyResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String authorizationPolicyName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName).map(new Func1, AuthorizationPolicyResourceFormatInner>() { - @Override - public AuthorizationPolicyResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an authorization policy in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationPolicyResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String authorizationPolicyName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (authorizationPolicyName == null) { - throw new IllegalArgumentException("Parameter authorizationPolicyName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, authorizationPolicyName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the authorization policies in a specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationPolicyResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the authorization policies in a specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the authorization policies in a specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationPolicyResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the authorization policies in a specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationPolicyResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the authorization policies in a specified hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationPolicyResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Regenerates the primary policy key of the specified authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationPolicyInner object if successful. - */ - public AuthorizationPolicyInner regeneratePrimaryKey(String resourceGroupName, String hubName, String authorizationPolicyName) { - return regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName).toBlocking().single().body(); - } - - /** - * Regenerates the primary policy key of the specified authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regeneratePrimaryKeyAsync(String resourceGroupName, String hubName, String authorizationPolicyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName), serviceCallback); - } - - /** - * Regenerates the primary policy key of the specified authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationPolicyInner object - */ - public Observable regeneratePrimaryKeyAsync(String resourceGroupName, String hubName, String authorizationPolicyName) { - return regeneratePrimaryKeyWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName).map(new Func1, AuthorizationPolicyInner>() { - @Override - public AuthorizationPolicyInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the primary policy key of the specified authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationPolicyInner object - */ - public Observable> regeneratePrimaryKeyWithServiceResponseAsync(String resourceGroupName, String hubName, String authorizationPolicyName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (authorizationPolicyName == null) { - throw new IllegalArgumentException("Parameter authorizationPolicyName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.regeneratePrimaryKey(resourceGroupName, hubName, authorizationPolicyName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regeneratePrimaryKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regeneratePrimaryKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Regenerates the secondary policy key of the specified authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationPolicyInner object if successful. - */ - public AuthorizationPolicyInner regenerateSecondaryKey(String resourceGroupName, String hubName, String authorizationPolicyName) { - return regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName).toBlocking().single().body(); - } - - /** - * Regenerates the secondary policy key of the specified authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateSecondaryKeyAsync(String resourceGroupName, String hubName, String authorizationPolicyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName), serviceCallback); - } - - /** - * Regenerates the secondary policy key of the specified authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationPolicyInner object - */ - public Observable regenerateSecondaryKeyAsync(String resourceGroupName, String hubName, String authorizationPolicyName) { - return regenerateSecondaryKeyWithServiceResponseAsync(resourceGroupName, hubName, authorizationPolicyName).map(new Func1, AuthorizationPolicyInner>() { - @Override - public AuthorizationPolicyInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the secondary policy key of the specified authorization policy. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param authorizationPolicyName The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationPolicyInner object - */ - public Observable> regenerateSecondaryKeyWithServiceResponseAsync(String resourceGroupName, String hubName, String authorizationPolicyName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (authorizationPolicyName == null) { - throw new IllegalArgumentException("Parameter authorizationPolicyName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.regenerateSecondaryKey(resourceGroupName, hubName, authorizationPolicyName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateSecondaryKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateSecondaryKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the authorization policies in a specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationPolicyResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the authorization policies in a specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the authorization policies in a specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationPolicyResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the authorization policies in a specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationPolicyResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the authorization policies in a specified hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationPolicyResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPolicyInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPolicyInner.java deleted file mode 100644 index 73a32363f3d..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPolicyInner.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.List; -import com.microsoft.azure.management.customerinsights.PermissionTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The authorization policy. - */ -public class AuthorizationPolicyInner { - /** - * Name of the policy. - */ - @JsonProperty(value = "policyName", access = JsonProperty.Access.WRITE_ONLY) - private String policyName; - - /** - * The permissions associated with the policy. - */ - @JsonProperty(value = "permissions", required = true) - private List permissions; - - /** - * Primary key assiciated with the policy. - */ - @JsonProperty(value = "primaryKey") - private String primaryKey; - - /** - * Secondary key assiciated with the policy. - */ - @JsonProperty(value = "secondaryKey") - private String secondaryKey; - - /** - * Get the policyName value. - * - * @return the policyName value - */ - public String policyName() { - return this.policyName; - } - - /** - * Get the permissions value. - * - * @return the permissions value - */ - public List permissions() { - return this.permissions; - } - - /** - * Set the permissions value. - * - * @param permissions the permissions value to set - * @return the AuthorizationPolicyInner object itself. - */ - public AuthorizationPolicyInner withPermissions(List permissions) { - this.permissions = permissions; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the AuthorizationPolicyInner object itself. - */ - public AuthorizationPolicyInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the AuthorizationPolicyInner object itself. - */ - public AuthorizationPolicyInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPolicyResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPolicyResourceFormatInner.java deleted file mode 100644 index 0b4cd86db1c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPolicyResourceFormatInner.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.List; -import com.microsoft.azure.management.customerinsights.PermissionTypes; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The authorization policy resource format. - */ -@JsonFlatten -public class AuthorizationPolicyResourceFormatInner extends ProxyResource { - /** - * Name of the policy. - */ - @JsonProperty(value = "properties.policyName", access = JsonProperty.Access.WRITE_ONLY) - private String policyName; - - /** - * The permissions associated with the policy. - */ - @JsonProperty(value = "properties.permissions", required = true) - private List permissions; - - /** - * Primary key assiciated with the policy. - */ - @JsonProperty(value = "properties.primaryKey") - private String primaryKey; - - /** - * Secondary key assiciated with the policy. - */ - @JsonProperty(value = "properties.secondaryKey") - private String secondaryKey; - - /** - * Get the policyName value. - * - * @return the policyName value - */ - public String policyName() { - return this.policyName; - } - - /** - * Get the permissions value. - * - * @return the permissions value - */ - public List permissions() { - return this.permissions; - } - - /** - * Set the permissions value. - * - * @param permissions the permissions value to set - * @return the AuthorizationPolicyResourceFormatInner object itself. - */ - public AuthorizationPolicyResourceFormatInner withPermissions(List permissions) { - this.permissions = permissions; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the AuthorizationPolicyResourceFormatInner object itself. - */ - public AuthorizationPolicyResourceFormatInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the AuthorizationPolicyResourceFormatInner object itself. - */ - public AuthorizationPolicyResourceFormatInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorMappingResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorMappingResourceFormatInner.java deleted file mode 100644 index 158f3835af5..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorMappingResourceFormatInner.java +++ /dev/null @@ -1,319 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.management.customerinsights.ConnectorTypes; -import org.joda.time.DateTime; -import com.microsoft.azure.management.customerinsights.EntityTypes; -import com.microsoft.azure.management.customerinsights.ConnectorMappingProperties; -import com.microsoft.azure.management.customerinsights.ConnectorMappingStates; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The c onnector mapping resource format. - */ -@JsonFlatten -public class ConnectorMappingResourceFormatInner extends ProxyResource { - /** - * The connector name. - */ - @JsonProperty(value = "properties.connectorName", access = JsonProperty.Access.WRITE_ONLY) - private String connectorName; - - /** - * Type of connector. Possible values include: 'None', 'CRM', 'AzureBlob', - * 'Salesforce', 'ExchangeOnline', 'Outbound'. - */ - @JsonProperty(value = "properties.connectorType") - private ConnectorTypes connectorType; - - /** - * The created time. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private DateTime created; - - /** - * The last monified time. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastModified; - - /** - * Defines which entity type the file should map to. Possible values - * include: 'None', 'Profile', 'Interaction', 'Relationship'. - */ - @JsonProperty(value = "properties.entityType", required = true) - private EntityTypes entityType; - - /** - * The mapping entity name. - */ - @JsonProperty(value = "properties.entityTypeName", required = true) - private String entityTypeName; - - /** - * The connector mapping name. - */ - @JsonProperty(value = "properties.connectorMappingName", access = JsonProperty.Access.WRITE_ONLY) - private String connectorMappingName; - - /** - * Display name for the connector mapping. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * The description of the connector mapping. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The DataFormat ID. - */ - @JsonProperty(value = "properties.dataFormatId", access = JsonProperty.Access.WRITE_ONLY) - private String dataFormatId; - - /** - * The properties of the mapping. - */ - @JsonProperty(value = "properties.mappingProperties", required = true) - private ConnectorMappingProperties mappingProperties; - - /** - * The next run time based on customer's settings. - */ - @JsonProperty(value = "properties.nextRunTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime nextRunTime; - - /** - * The RunId. - */ - @JsonProperty(value = "properties.runId", access = JsonProperty.Access.WRITE_ONLY) - private String runId; - - /** - * State of connector mapping. Possible values include: 'Creating', - * 'Created', 'Failed', 'Ready', 'Running', 'Stopped', 'Expiring'. - */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) - private ConnectorMappingStates state; - - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * Get the connectorName value. - * - * @return the connectorName value - */ - public String connectorName() { - return this.connectorName; - } - - /** - * Get the connectorType value. - * - * @return the connectorType value - */ - public ConnectorTypes connectorType() { - return this.connectorType; - } - - /** - * Set the connectorType value. - * - * @param connectorType the connectorType value to set - * @return the ConnectorMappingResourceFormatInner object itself. - */ - public ConnectorMappingResourceFormatInner withConnectorType(ConnectorTypes connectorType) { - this.connectorType = connectorType; - return this; - } - - /** - * Get the created value. - * - * @return the created value - */ - public DateTime created() { - return this.created; - } - - /** - * Get the lastModified value. - * - * @return the lastModified value - */ - public DateTime lastModified() { - return this.lastModified; - } - - /** - * Get the entityType value. - * - * @return the entityType value - */ - public EntityTypes entityType() { - return this.entityType; - } - - /** - * Set the entityType value. - * - * @param entityType the entityType value to set - * @return the ConnectorMappingResourceFormatInner object itself. - */ - public ConnectorMappingResourceFormatInner withEntityType(EntityTypes entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the entityTypeName value. - * - * @return the entityTypeName value - */ - public String entityTypeName() { - return this.entityTypeName; - } - - /** - * Set the entityTypeName value. - * - * @param entityTypeName the entityTypeName value to set - * @return the ConnectorMappingResourceFormatInner object itself. - */ - public ConnectorMappingResourceFormatInner withEntityTypeName(String entityTypeName) { - this.entityTypeName = entityTypeName; - return this; - } - - /** - * Get the connectorMappingName value. - * - * @return the connectorMappingName value - */ - public String connectorMappingName() { - return this.connectorMappingName; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ConnectorMappingResourceFormatInner object itself. - */ - public ConnectorMappingResourceFormatInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ConnectorMappingResourceFormatInner object itself. - */ - public ConnectorMappingResourceFormatInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the dataFormatId value. - * - * @return the dataFormatId value - */ - public String dataFormatId() { - return this.dataFormatId; - } - - /** - * Get the mappingProperties value. - * - * @return the mappingProperties value - */ - public ConnectorMappingProperties mappingProperties() { - return this.mappingProperties; - } - - /** - * Set the mappingProperties value. - * - * @param mappingProperties the mappingProperties value to set - * @return the ConnectorMappingResourceFormatInner object itself. - */ - public ConnectorMappingResourceFormatInner withMappingProperties(ConnectorMappingProperties mappingProperties) { - this.mappingProperties = mappingProperties; - return this; - } - - /** - * Get the nextRunTime value. - * - * @return the nextRunTime value - */ - public DateTime nextRunTime() { - return this.nextRunTime; - } - - /** - * Get the runId value. - * - * @return the runId value - */ - public String runId() { - return this.runId; - } - - /** - * Get the state value. - * - * @return the state value - */ - public ConnectorMappingStates state() { - return this.state; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorMappingsInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorMappingsInner.java deleted file mode 100644 index 863c3f07417..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorMappingsInner.java +++ /dev/null @@ -1,637 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ConnectorMappings. - */ -public class ConnectorMappingsInner { - /** The Retrofit service to perform REST calls. */ - private ConnectorMappingsService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of ConnectorMappingsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ConnectorMappingsInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(ConnectorMappingsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ConnectorMappings to be - * used by Retrofit to perform actually REST calls. - */ - interface ConnectorMappingsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.ConnectorMappings createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("mappingName") String mappingName, @Path("subscriptionId") String subscriptionId, @Body ConnectorMappingResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.ConnectorMappings get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("mappingName") String mappingName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.ConnectorMappings delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("mappingName") String mappingName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.ConnectorMappings listByConnector" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings") - Observable> listByConnector(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.ConnectorMappings listByConnectorNext" }) - @GET - Observable> listByConnectorNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a connector mapping or updates an existing connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @param parameters Parameters supplied to the CreateOrUpdate Connector Mapping operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectorMappingResourceFormatInner object if successful. - */ - public ConnectorMappingResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String connectorName, String mappingName, ConnectorMappingResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName, parameters).toBlocking().single().body(); - } - - /** - * Creates a connector mapping or updates an existing connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @param parameters Parameters supplied to the CreateOrUpdate Connector Mapping operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String connectorName, String mappingName, ConnectorMappingResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName, parameters), serviceCallback); - } - - /** - * Creates a connector mapping or updates an existing connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @param parameters Parameters supplied to the CreateOrUpdate Connector Mapping operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ConnectorMappingResourceFormatInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String connectorName, String mappingName, ConnectorMappingResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName, parameters).map(new Func1, ConnectorMappingResourceFormatInner>() { - @Override - public ConnectorMappingResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a connector mapping or updates an existing connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @param parameters Parameters supplied to the CreateOrUpdate Connector Mapping operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ConnectorMappingResourceFormatInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String connectorName, String mappingName, ConnectorMappingResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (mappingName == null) { - throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, hubName, connectorName, mappingName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectorMappingResourceFormatInner object if successful. - */ - public ConnectorMappingResourceFormatInner get(String resourceGroupName, String hubName, String connectorName, String mappingName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName).toBlocking().single().body(); - } - - /** - * Gets a connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String connectorName, String mappingName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName), serviceCallback); - } - - /** - * Gets a connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ConnectorMappingResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String connectorName, String mappingName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName).map(new Func1, ConnectorMappingResourceFormatInner>() { - @Override - public ConnectorMappingResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ConnectorMappingResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String connectorName, String mappingName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (mappingName == null) { - throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, connectorName, mappingName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String connectorName, String mappingName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName).toBlocking().single().body(); - } - - /** - * Deletes a connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String connectorName, String mappingName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName), serviceCallback); - } - - /** - * Deletes a connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String connectorName, String mappingName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName, mappingName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a connector mapping in the connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param mappingName The name of the connector mapping. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String connectorName, String mappingName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (mappingName == null) { - throw new IllegalArgumentException("Parameter mappingName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, hubName, connectorName, mappingName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the connector mappings in the specified connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ConnectorMappingResourceFormatInner> object if successful. - */ - public PagedList listByConnector(final String resourceGroupName, final String hubName, final String connectorName) { - ServiceResponse> response = listByConnectorSinglePageAsync(resourceGroupName, hubName, connectorName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByConnectorNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the connector mappings in the specified connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByConnectorAsync(final String resourceGroupName, final String hubName, final String connectorName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByConnectorSinglePageAsync(resourceGroupName, hubName, connectorName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByConnectorNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the connector mappings in the specified connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ConnectorMappingResourceFormatInner> object - */ - public Observable> listByConnectorAsync(final String resourceGroupName, final String hubName, final String connectorName) { - return listByConnectorWithServiceResponseAsync(resourceGroupName, hubName, connectorName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the connector mappings in the specified connector. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ConnectorMappingResourceFormatInner> object - */ - public Observable>> listByConnectorWithServiceResponseAsync(final String resourceGroupName, final String hubName, final String connectorName) { - return listByConnectorSinglePageAsync(resourceGroupName, hubName, connectorName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByConnectorNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the connector mappings in the specified connector. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - ServiceResponse> * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ConnectorMappingResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByConnectorSinglePageAsync(final String resourceGroupName, final String hubName, final String connectorName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByConnector(resourceGroupName, hubName, connectorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByConnectorDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByConnectorDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the connector mappings in the specified connector. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ConnectorMappingResourceFormatInner> object if successful. - */ - public PagedList listByConnectorNext(final String nextPageLink) { - ServiceResponse> response = listByConnectorNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByConnectorNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the connector mappings in the specified connector. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByConnectorNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByConnectorNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByConnectorNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the connector mappings in the specified connector. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ConnectorMappingResourceFormatInner> object - */ - public Observable> listByConnectorNextAsync(final String nextPageLink) { - return listByConnectorNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the connector mappings in the specified connector. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ConnectorMappingResourceFormatInner> object - */ - public Observable>> listByConnectorNextWithServiceResponseAsync(final String nextPageLink) { - return listByConnectorNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByConnectorNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the connector mappings in the specified connector. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ConnectorMappingResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByConnectorNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByConnectorNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByConnectorNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByConnectorNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorResourceFormatInner.java deleted file mode 100644 index 6c65cf017b2..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorResourceFormatInner.java +++ /dev/null @@ -1,257 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.management.customerinsights.ConnectorTypes; -import java.util.Map; -import org.joda.time.DateTime; -import com.microsoft.azure.management.customerinsights.ConnectorStates; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The connector resource format. - */ -@JsonFlatten -public class ConnectorResourceFormatInner extends ProxyResource { - /** - * ID of the connector. - */ - @JsonProperty(value = "properties.connectorId", access = JsonProperty.Access.WRITE_ONLY) - private Integer connectorId; - - /** - * Name of the connector. - */ - @JsonProperty(value = "properties.connectorName") - private String connectorName; - - /** - * Type of connector. Possible values include: 'None', 'CRM', 'AzureBlob', - * 'Salesforce', 'ExchangeOnline', 'Outbound'. - */ - @JsonProperty(value = "properties.connectorType", required = true) - private ConnectorTypes connectorType; - - /** - * Display name of the connector. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * Description of the connector. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The connector properties. - */ - @JsonProperty(value = "properties.connectorProperties", required = true) - private Map connectorProperties; - - /** - * The created time. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private DateTime created; - - /** - * The last monified time. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastModified; - - /** - * State of connector. Possible values include: 'Creating', 'Created', - * 'Ready', 'Expiring', 'Deleting', 'Failed'. - */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) - private ConnectorStates state; - - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * If this is an internal connector. - */ - @JsonProperty(value = "properties.isInternal") - private Boolean isInternal; - - /** - * Get the connectorId value. - * - * @return the connectorId value - */ - public Integer connectorId() { - return this.connectorId; - } - - /** - * Get the connectorName value. - * - * @return the connectorName value - */ - public String connectorName() { - return this.connectorName; - } - - /** - * Set the connectorName value. - * - * @param connectorName the connectorName value to set - * @return the ConnectorResourceFormatInner object itself. - */ - public ConnectorResourceFormatInner withConnectorName(String connectorName) { - this.connectorName = connectorName; - return this; - } - - /** - * Get the connectorType value. - * - * @return the connectorType value - */ - public ConnectorTypes connectorType() { - return this.connectorType; - } - - /** - * Set the connectorType value. - * - * @param connectorType the connectorType value to set - * @return the ConnectorResourceFormatInner object itself. - */ - public ConnectorResourceFormatInner withConnectorType(ConnectorTypes connectorType) { - this.connectorType = connectorType; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ConnectorResourceFormatInner object itself. - */ - public ConnectorResourceFormatInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ConnectorResourceFormatInner object itself. - */ - public ConnectorResourceFormatInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the connectorProperties value. - * - * @return the connectorProperties value - */ - public Map connectorProperties() { - return this.connectorProperties; - } - - /** - * Set the connectorProperties value. - * - * @param connectorProperties the connectorProperties value to set - * @return the ConnectorResourceFormatInner object itself. - */ - public ConnectorResourceFormatInner withConnectorProperties(Map connectorProperties) { - this.connectorProperties = connectorProperties; - return this; - } - - /** - * Get the created value. - * - * @return the created value - */ - public DateTime created() { - return this.created; - } - - /** - * Get the lastModified value. - * - * @return the lastModified value - */ - public DateTime lastModified() { - return this.lastModified; - } - - /** - * Get the state value. - * - * @return the state value - */ - public ConnectorStates state() { - return this.state; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the isInternal value. - * - * @return the isInternal value - */ - public Boolean isInternal() { - return this.isInternal; - } - - /** - * Set the isInternal value. - * - * @param isInternal the isInternal value to set - * @return the ConnectorResourceFormatInner object itself. - */ - public ConnectorResourceFormatInner withIsInternal(Boolean isInternal) { - this.isInternal = isInternal; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorsInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorsInner.java deleted file mode 100644 index d6ceb8d1e9c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ConnectorsInner.java +++ /dev/null @@ -1,776 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Connectors. - */ -public class ConnectorsInner { - /** The Retrofit service to perform REST calls. */ - private ConnectorsService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of ConnectorsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ConnectorsInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(ConnectorsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Connectors to be - * used by Retrofit to perform actually REST calls. - */ - interface ConnectorsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Connectors createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("subscriptionId") String subscriptionId, @Body ConnectorResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Connectors beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("subscriptionId") String subscriptionId, @Body ConnectorResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Connectors get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Connectors delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Connectors beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectorName") String connectorName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Connectors listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Connectors listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a connector or updates an existing connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param parameters Parameters supplied to the CreateOrUpdate Connector operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectorResourceFormatInner object if successful. - */ - public ConnectorResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String connectorName, ConnectorResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, parameters).toBlocking().last().body(); - } - - /** - * Creates a connector or updates an existing connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param parameters Parameters supplied to the CreateOrUpdate Connector operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String connectorName, ConnectorResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, parameters), serviceCallback); - } - - /** - * Creates a connector or updates an existing connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param parameters Parameters supplied to the CreateOrUpdate Connector operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String connectorName, ConnectorResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, parameters).map(new Func1, ConnectorResourceFormatInner>() { - @Override - public ConnectorResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a connector or updates an existing connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param parameters Parameters supplied to the CreateOrUpdate Connector operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String connectorName, ConnectorResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, hubName, connectorName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates a connector or updates an existing connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param parameters Parameters supplied to the CreateOrUpdate Connector operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectorResourceFormatInner object if successful. - */ - public ConnectorResourceFormatInner beginCreateOrUpdate(String resourceGroupName, String hubName, String connectorName, ConnectorResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, parameters).toBlocking().single().body(); - } - - /** - * Creates a connector or updates an existing connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param parameters Parameters supplied to the CreateOrUpdate Connector operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String connectorName, ConnectorResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, parameters), serviceCallback); - } - - /** - * Creates a connector or updates an existing connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param parameters Parameters supplied to the CreateOrUpdate Connector operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ConnectorResourceFormatInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String connectorName, ConnectorResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, connectorName, parameters).map(new Func1, ConnectorResourceFormatInner>() { - @Override - public ConnectorResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a connector or updates an existing connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param parameters Parameters supplied to the CreateOrUpdate Connector operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ConnectorResourceFormatInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String connectorName, ConnectorResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, hubName, connectorName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectorResourceFormatInner object if successful. - */ - public ConnectorResourceFormatInner get(String resourceGroupName, String hubName, String connectorName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, connectorName).toBlocking().single().body(); - } - - /** - * Gets a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String connectorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, connectorName), serviceCallback); - } - - /** - * Gets a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ConnectorResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String connectorName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, connectorName).map(new Func1, ConnectorResourceFormatInner>() { - @Override - public ConnectorResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ConnectorResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String connectorName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, connectorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String connectorName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName).toBlocking().last().body(); - } - - /** - * Deletes a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String connectorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName), serviceCallback); - } - - /** - * Deletes a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String connectorName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String connectorName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, hubName, connectorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String hubName, String connectorName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName).toBlocking().single().body(); - } - - /** - * Deletes a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String hubName, String connectorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName), serviceCallback); - } - - /** - * Deletes a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String hubName, String connectorName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, connectorName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a connector in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param connectorName The name of the connector. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String hubName, String connectorName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (connectorName == null) { - throw new IllegalArgumentException("Parameter connectorName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, hubName, connectorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the connectors in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ConnectorResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the connectors in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the connectors in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ConnectorResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the connectors in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ConnectorResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the connectors in the specified hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ConnectorResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the connectors in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ConnectorResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the connectors in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the connectors in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ConnectorResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the connectors in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ConnectorResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the connectors in the specified hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ConnectorResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/CustomerInsightsManagementClientImpl.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/CustomerInsightsManagementClientImpl.java deleted file mode 100644 index 7e7c164b244..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/CustomerInsightsManagementClientImpl.java +++ /dev/null @@ -1,392 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the CustomerInsightsManagementClientImpl class. - */ -public class CustomerInsightsManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ - private String subscriptionId; - - /** - * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public CustomerInsightsManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Client Api Version. */ - private String apiVersion; - - /** - * Gets Client Api Version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public CustomerInsightsManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public CustomerInsightsManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public CustomerInsightsManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The HubsInner object to access its operations. - */ - private HubsInner hubs; - - /** - * Gets the HubsInner object to access its operations. - * @return the HubsInner object. - */ - public HubsInner hubs() { - return this.hubs; - } - - /** - * The ProfilesInner object to access its operations. - */ - private ProfilesInner profiles; - - /** - * Gets the ProfilesInner object to access its operations. - * @return the ProfilesInner object. - */ - public ProfilesInner profiles() { - return this.profiles; - } - - /** - * The InteractionsInner object to access its operations. - */ - private InteractionsInner interactions; - - /** - * Gets the InteractionsInner object to access its operations. - * @return the InteractionsInner object. - */ - public InteractionsInner interactions() { - return this.interactions; - } - - /** - * The RelationshipsInner object to access its operations. - */ - private RelationshipsInner relationships; - - /** - * Gets the RelationshipsInner object to access its operations. - * @return the RelationshipsInner object. - */ - public RelationshipsInner relationships() { - return this.relationships; - } - - /** - * The RelationshipLinksInner object to access its operations. - */ - private RelationshipLinksInner relationshipLinks; - - /** - * Gets the RelationshipLinksInner object to access its operations. - * @return the RelationshipLinksInner object. - */ - public RelationshipLinksInner relationshipLinks() { - return this.relationshipLinks; - } - - /** - * The AuthorizationPoliciesInner object to access its operations. - */ - private AuthorizationPoliciesInner authorizationPolicies; - - /** - * Gets the AuthorizationPoliciesInner object to access its operations. - * @return the AuthorizationPoliciesInner object. - */ - public AuthorizationPoliciesInner authorizationPolicies() { - return this.authorizationPolicies; - } - - /** - * The ConnectorsInner object to access its operations. - */ - private ConnectorsInner connectors; - - /** - * Gets the ConnectorsInner object to access its operations. - * @return the ConnectorsInner object. - */ - public ConnectorsInner connectors() { - return this.connectors; - } - - /** - * The ConnectorMappingsInner object to access its operations. - */ - private ConnectorMappingsInner connectorMappings; - - /** - * Gets the ConnectorMappingsInner object to access its operations. - * @return the ConnectorMappingsInner object. - */ - public ConnectorMappingsInner connectorMappings() { - return this.connectorMappings; - } - - /** - * The KpisInner object to access its operations. - */ - private KpisInner kpis; - - /** - * Gets the KpisInner object to access its operations. - * @return the KpisInner object. - */ - public KpisInner kpis() { - return this.kpis; - } - - /** - * The WidgetTypesInner object to access its operations. - */ - private WidgetTypesInner widgetTypes; - - /** - * Gets the WidgetTypesInner object to access its operations. - * @return the WidgetTypesInner object. - */ - public WidgetTypesInner widgetTypes() { - return this.widgetTypes; - } - - /** - * The ViewsInner object to access its operations. - */ - private ViewsInner views; - - /** - * Gets the ViewsInner object to access its operations. - * @return the ViewsInner object. - */ - public ViewsInner views() { - return this.views; - } - - /** - * The LinksInner object to access its operations. - */ - private LinksInner links; - - /** - * Gets the LinksInner object to access its operations. - * @return the LinksInner object. - */ - public LinksInner links() { - return this.links; - } - - /** - * The RolesInner object to access its operations. - */ - private RolesInner roles; - - /** - * Gets the RolesInner object to access its operations. - * @return the RolesInner object. - */ - public RolesInner roles() { - return this.roles; - } - - /** - * The RoleAssignmentsInner object to access its operations. - */ - private RoleAssignmentsInner roleAssignments; - - /** - * Gets the RoleAssignmentsInner object to access its operations. - * @return the RoleAssignmentsInner object. - */ - public RoleAssignmentsInner roleAssignments() { - return this.roleAssignments; - } - - /** - * The ImagesInner object to access its operations. - */ - private ImagesInner images; - - /** - * Gets the ImagesInner object to access its operations. - * @return the ImagesInner object. - */ - public ImagesInner images() { - return this.images; - } - - /** - * Initializes an instance of CustomerInsightsManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public CustomerInsightsManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of CustomerInsightsManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public CustomerInsightsManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of CustomerInsightsManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public CustomerInsightsManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2017-04-26"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.hubs = new HubsInner(restClient().retrofit(), this); - this.profiles = new ProfilesInner(restClient().retrofit(), this); - this.interactions = new InteractionsInner(restClient().retrofit(), this); - this.relationships = new RelationshipsInner(restClient().retrofit(), this); - this.relationshipLinks = new RelationshipLinksInner(restClient().retrofit(), this); - this.authorizationPolicies = new AuthorizationPoliciesInner(restClient().retrofit(), this); - this.connectors = new ConnectorsInner(restClient().retrofit(), this); - this.connectorMappings = new ConnectorMappingsInner(restClient().retrofit(), this); - this.kpis = new KpisInner(restClient().retrofit(), this); - this.widgetTypes = new WidgetTypesInner(restClient().retrofit(), this); - this.views = new ViewsInner(restClient().retrofit(), this); - this.links = new LinksInner(restClient().retrofit(), this); - this.roles = new RolesInner(restClient().retrofit(), this); - this.roleAssignments = new RoleAssignmentsInner(restClient().retrofit(), this); - this.images = new ImagesInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "CustomerInsightsManagementClient", "2017-04-26"); - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/CustomerInsightsManager.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/CustomerInsightsManager.java deleted file mode 100644 index a92f132b30c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/CustomerInsightsManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure CustomerInsights resource management. - */ -@Beta(Beta.SinceVersion.V1_2_0) -public final class CustomerInsightsManager extends Manager { - /** - * Get a Configurable instance that can be used to create CustomerInsightsManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new CustomerInsightsManager.ConfigurableImpl(); - } - /** - * Creates an instance of CustomerInsightsManager that exposes CustomerInsights resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the CustomerInsightsManager - */ - public static CustomerInsightsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new CustomerInsightsManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of CustomerInsightsManager that exposes CustomerInsights resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the CustomerInsightsManager - */ - public static CustomerInsightsManager authenticate(RestClient restClient, String subscriptionId) { - return new CustomerInsightsManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of CustomerInsightsManager that exposes CustomerInsights management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing CustomerInsights management API entry points that work across subscriptions - */ - CustomerInsightsManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public CustomerInsightsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return CustomerInsightsManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private CustomerInsightsManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new CustomerInsightsManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/GetImageUploadUrlInputInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/GetImageUploadUrlInputInner.java deleted file mode 100644 index 74c35109a8a..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/GetImageUploadUrlInputInner.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Input type for getting image upload url. - */ -public class GetImageUploadUrlInputInner { - /** - * Type of entity. Can be Profile or Interaction. - */ - @JsonProperty(value = "entityType") - private String entityType; - - /** - * Name of the entity type. - */ - @JsonProperty(value = "entityTypeName") - private String entityTypeName; - - /** - * Relative path of the image. - */ - @JsonProperty(value = "relativePath") - private String relativePath; - - /** - * Get the entityType value. - * - * @return the entityType value - */ - public String entityType() { - return this.entityType; - } - - /** - * Set the entityType value. - * - * @param entityType the entityType value to set - * @return the GetImageUploadUrlInputInner object itself. - */ - public GetImageUploadUrlInputInner withEntityType(String entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the entityTypeName value. - * - * @return the entityTypeName value - */ - public String entityTypeName() { - return this.entityTypeName; - } - - /** - * Set the entityTypeName value. - * - * @param entityTypeName the entityTypeName value to set - * @return the GetImageUploadUrlInputInner object itself. - */ - public GetImageUploadUrlInputInner withEntityTypeName(String entityTypeName) { - this.entityTypeName = entityTypeName; - return this; - } - - /** - * Get the relativePath value. - * - * @return the relativePath value - */ - public String relativePath() { - return this.relativePath; - } - - /** - * Set the relativePath value. - * - * @param relativePath the relativePath value to set - * @return the GetImageUploadUrlInputInner object itself. - */ - public GetImageUploadUrlInputInner withRelativePath(String relativePath) { - this.relativePath = relativePath; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/HubInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/HubInner.java deleted file mode 100644 index e4e7aa94765..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/HubInner.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.management.customerinsights.HubBillingInfoFormat; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Hub resource. - */ -@JsonFlatten -public class HubInner extends Resource { - /** - * API endpoint URL of the hub. - */ - @JsonProperty(value = "properties.apiEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String apiEndpoint; - - /** - * Web endpoint URL of the hub. - */ - @JsonProperty(value = "properties.webEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String webEndpoint; - - /** - * Provisioning state of the hub. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The bit flags for enabled hub features. Bit 0 is set to 1 indicates - * graph is enabled, or disabled if set to 0. Bit 1 is set to 1 indicates - * the hub is disabled, or enabled if set to 0. - */ - @JsonProperty(value = "properties.tenantFeatures") - private Integer tenantFeatures; - - /** - * Billing settings of the hub. - */ - @JsonProperty(value = "properties.hubBillingInfo") - private HubBillingInfoFormat hubBillingInfo; - - /** - * Get the apiEndpoint value. - * - * @return the apiEndpoint value - */ - public String apiEndpoint() { - return this.apiEndpoint; - } - - /** - * Get the webEndpoint value. - * - * @return the webEndpoint value - */ - public String webEndpoint() { - return this.webEndpoint; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the tenantFeatures value. - * - * @return the tenantFeatures value - */ - public Integer tenantFeatures() { - return this.tenantFeatures; - } - - /** - * Set the tenantFeatures value. - * - * @param tenantFeatures the tenantFeatures value to set - * @return the HubInner object itself. - */ - public HubInner withTenantFeatures(Integer tenantFeatures) { - this.tenantFeatures = tenantFeatures; - return this; - } - - /** - * Get the hubBillingInfo value. - * - * @return the hubBillingInfo value - */ - public HubBillingInfoFormat hubBillingInfo() { - return this.hubBillingInfo; - } - - /** - * Set the hubBillingInfo value. - * - * @param hubBillingInfo the hubBillingInfo value to set - * @return the HubInner object itself. - */ - public HubInner withHubBillingInfo(HubBillingInfoFormat hubBillingInfo) { - this.hubBillingInfo = hubBillingInfo; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/HubsInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/HubsInner.java deleted file mode 100644 index 0566def848b..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/HubsInner.java +++ /dev/null @@ -1,980 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Hubs. - */ -public class HubsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private HubsService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of HubsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public HubsInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(HubsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Hubs to be - * used by Retrofit to perform actually REST calls. - */ - interface HubsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Body HubInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Body HubInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.CustomerInsights/hubs") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Hubs listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a hub, or updates an existing hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the Hub. - * @param parameters Parameters supplied to the CreateOrUpdate Hub operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the HubInner object if successful. - */ - public HubInner createOrUpdate(String resourceGroupName, String hubName, HubInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, parameters).toBlocking().single().body(); - } - - /** - * Creates a hub, or updates an existing hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the Hub. - * @param parameters Parameters supplied to the CreateOrUpdate Hub operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, HubInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, parameters), serviceCallback); - } - - /** - * Creates a hub, or updates an existing hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the Hub. - * @param parameters Parameters supplied to the CreateOrUpdate Hub operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HubInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, HubInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, parameters).map(new Func1, HubInner>() { - @Override - public HubInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a hub, or updates an existing hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the Hub. - * @param parameters Parameters supplied to the CreateOrUpdate Hub operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HubInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, HubInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, hubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates a Hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the Hub. - * @param parameters Parameters supplied to the Update Hub operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the HubInner object if successful. - */ - public HubInner update(String resourceGroupName, String hubName, HubInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, hubName, parameters).toBlocking().single().body(); - } - - /** - * Updates a Hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the Hub. - * @param parameters Parameters supplied to the Update Hub operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String hubName, HubInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, hubName, parameters), serviceCallback); - } - - /** - * Updates a Hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the Hub. - * @param parameters Parameters supplied to the Update Hub operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HubInner object - */ - public Observable updateAsync(String resourceGroupName, String hubName, HubInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, hubName, parameters).map(new Func1, HubInner>() { - @Override - public HubInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a Hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the Hub. - * @param parameters Parameters supplied to the Update Hub operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HubInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String hubName, HubInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, hubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName).toBlocking().last().body(); - } - - /** - * Deletes the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName), serviceCallback); - } - - /** - * Deletes the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String hubName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String hubName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, hubName).toBlocking().single().body(); - } - - /** - * Deletes the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String hubName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, hubName), serviceCallback); - } - - /** - * Deletes the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String hubName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, hubName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets information about the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the HubInner object if successful. - */ - public HubInner getByResourceGroup(String resourceGroupName, String hubName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, hubName).toBlocking().single().body(); - } - - /** - * Gets information about the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String hubName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, hubName), serviceCallback); - } - - /** - * Gets information about the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HubInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String hubName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, hubName).map(new Func1, HubInner>() { - @Override - public HubInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HubInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the hubs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<HubInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the hubs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the hubs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HubInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the hubs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HubInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the hubs in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<HubInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all hubs in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<HubInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all hubs in the specified subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all hubs in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HubInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all hubs in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HubInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all hubs in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<HubInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the hubs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<HubInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the hubs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the hubs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HubInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the hubs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HubInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the hubs in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<HubInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all hubs in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<HubInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all hubs in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all hubs in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HubInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all hubs in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HubInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all hubs in the specified subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<HubInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ImageDefinitionInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ImageDefinitionInner.java deleted file mode 100644 index 5fb684ba1ee..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ImageDefinitionInner.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The image definition. - */ -public class ImageDefinitionInner { - /** - * Whether image exists already. - */ - @JsonProperty(value = "imageExists") - private Boolean imageExists; - - /** - * Content URL for the image blob. - */ - @JsonProperty(value = "contentUrl") - private String contentUrl; - - /** - * Relative path of the image. - */ - @JsonProperty(value = "relativePath") - private String relativePath; - - /** - * Get the imageExists value. - * - * @return the imageExists value - */ - public Boolean imageExists() { - return this.imageExists; - } - - /** - * Set the imageExists value. - * - * @param imageExists the imageExists value to set - * @return the ImageDefinitionInner object itself. - */ - public ImageDefinitionInner withImageExists(Boolean imageExists) { - this.imageExists = imageExists; - return this; - } - - /** - * Get the contentUrl value. - * - * @return the contentUrl value - */ - public String contentUrl() { - return this.contentUrl; - } - - /** - * Set the contentUrl value. - * - * @param contentUrl the contentUrl value to set - * @return the ImageDefinitionInner object itself. - */ - public ImageDefinitionInner withContentUrl(String contentUrl) { - this.contentUrl = contentUrl; - return this; - } - - /** - * Get the relativePath value. - * - * @return the relativePath value - */ - public String relativePath() { - return this.relativePath; - } - - /** - * Set the relativePath value. - * - * @param relativePath the relativePath value to set - * @return the ImageDefinitionInner object itself. - */ - public ImageDefinitionInner withRelativePath(String relativePath) { - this.relativePath = relativePath; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ImagesInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ImagesInner.java deleted file mode 100644 index b734a5e47b3..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ImagesInner.java +++ /dev/null @@ -1,254 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Images. - */ -public class ImagesInner { - /** The Retrofit service to perform REST calls. */ - private ImagesService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of ImagesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ImagesInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(ImagesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Images to be - * used by Retrofit to perform actually REST calls. - */ - interface ImagesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Images getUploadUrlForEntityType" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/images/getEntityTypeImageUploadUrl") - Observable> getUploadUrlForEntityType(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Body GetImageUploadUrlInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Images getUploadUrlForData" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/images/getDataImageUploadUrl") - Observable> getUploadUrlForData(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Body GetImageUploadUrlInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets entity type (profile or interaction) image upload URL. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param parameters Parameters supplied to the GetUploadUrlForEntityType operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ImageDefinitionInner object if successful. - */ - public ImageDefinitionInner getUploadUrlForEntityType(String resourceGroupName, String hubName, GetImageUploadUrlInputInner parameters) { - return getUploadUrlForEntityTypeWithServiceResponseAsync(resourceGroupName, hubName, parameters).toBlocking().single().body(); - } - - /** - * Gets entity type (profile or interaction) image upload URL. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param parameters Parameters supplied to the GetUploadUrlForEntityType operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getUploadUrlForEntityTypeAsync(String resourceGroupName, String hubName, GetImageUploadUrlInputInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getUploadUrlForEntityTypeWithServiceResponseAsync(resourceGroupName, hubName, parameters), serviceCallback); - } - - /** - * Gets entity type (profile or interaction) image upload URL. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param parameters Parameters supplied to the GetUploadUrlForEntityType operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ImageDefinitionInner object - */ - public Observable getUploadUrlForEntityTypeAsync(String resourceGroupName, String hubName, GetImageUploadUrlInputInner parameters) { - return getUploadUrlForEntityTypeWithServiceResponseAsync(resourceGroupName, hubName, parameters).map(new Func1, ImageDefinitionInner>() { - @Override - public ImageDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets entity type (profile or interaction) image upload URL. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param parameters Parameters supplied to the GetUploadUrlForEntityType operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ImageDefinitionInner object - */ - public Observable> getUploadUrlForEntityTypeWithServiceResponseAsync(String resourceGroupName, String hubName, GetImageUploadUrlInputInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.getUploadUrlForEntityType(resourceGroupName, hubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getUploadUrlForEntityTypeDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getUploadUrlForEntityTypeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets data image upload URL. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param parameters Parameters supplied to the GetUploadUrlForData operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ImageDefinitionInner object if successful. - */ - public ImageDefinitionInner getUploadUrlForData(String resourceGroupName, String hubName, GetImageUploadUrlInputInner parameters) { - return getUploadUrlForDataWithServiceResponseAsync(resourceGroupName, hubName, parameters).toBlocking().single().body(); - } - - /** - * Gets data image upload URL. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param parameters Parameters supplied to the GetUploadUrlForData operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getUploadUrlForDataAsync(String resourceGroupName, String hubName, GetImageUploadUrlInputInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getUploadUrlForDataWithServiceResponseAsync(resourceGroupName, hubName, parameters), serviceCallback); - } - - /** - * Gets data image upload URL. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param parameters Parameters supplied to the GetUploadUrlForData operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ImageDefinitionInner object - */ - public Observable getUploadUrlForDataAsync(String resourceGroupName, String hubName, GetImageUploadUrlInputInner parameters) { - return getUploadUrlForDataWithServiceResponseAsync(resourceGroupName, hubName, parameters).map(new Func1, ImageDefinitionInner>() { - @Override - public ImageDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets data image upload URL. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param parameters Parameters supplied to the GetUploadUrlForData operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ImageDefinitionInner object - */ - public Observable> getUploadUrlForDataWithServiceResponseAsync(String resourceGroupName, String hubName, GetImageUploadUrlInputInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.getUploadUrlForData(resourceGroupName, hubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getUploadUrlForDataDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getUploadUrlForDataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/InteractionResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/InteractionResourceFormatInner.java deleted file mode 100644 index 63923670725..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/InteractionResourceFormatInner.java +++ /dev/null @@ -1,647 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.customerinsights.EntityTypes; -import com.microsoft.azure.management.customerinsights.PropertyDefinition; -import org.joda.time.DateTime; -import com.microsoft.azure.management.customerinsights.ProvisioningStates; -import com.microsoft.azure.management.customerinsights.Participant; -import com.microsoft.azure.management.customerinsights.DataSourcePrecedence; -import com.microsoft.azure.management.customerinsights.DataSourceType; -import com.microsoft.azure.management.customerinsights.Status; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The interaction resource format. - */ -@JsonFlatten -public class InteractionResourceFormatInner extends ProxyResource { - /** - * The attributes for the Type. - */ - @JsonProperty(value = "properties.attributes") - private Map> attributes; - - /** - * Localized descriptions for the property. - */ - @JsonProperty(value = "properties.description") - private Map description; - - /** - * Localized display names for the property. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * Any custom localized attributes for the Type. - */ - @JsonProperty(value = "properties.localizedAttributes") - private Map> localizedAttributes; - - /** - * Small Image associated with the Property or EntityType. - */ - @JsonProperty(value = "properties.smallImage") - private String smallImage; - - /** - * Medium Image associated with the Property or EntityType. - */ - @JsonProperty(value = "properties.mediumImage") - private String mediumImage; - - /** - * Large Image associated with the Property or EntityType. - */ - @JsonProperty(value = "properties.largeImage") - private String largeImage; - - /** - * The api entity set name. This becomes the odata entity set name for the - * entity Type being refered in this object. - */ - @JsonProperty(value = "properties.apiEntitySetName") - private String apiEntitySetName; - - /** - * Type of entity. Possible values include: 'None', 'Profile', - * 'Interaction', 'Relationship'. - */ - @JsonProperty(value = "properties.entityType") - private EntityTypes entityType; - - /** - * The properties of the Profile. - */ - @JsonProperty(value = "properties.fields") - private List fields; - - /** - * The instance count. - */ - @JsonProperty(value = "properties.instancesCount") - private Integer instancesCount; - - /** - * The last changed time for the type definition. - */ - @JsonProperty(value = "properties.lastChangedUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastChangedUtc; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * The schema org link. This helps ACI identify and suggest semantic - * models. - */ - @JsonProperty(value = "properties.schemaItemTypeLink") - private String schemaItemTypeLink; - - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * The timestamp property name. Represents the time when the interaction or - * profile update happened. - */ - @JsonProperty(value = "properties.timestampFieldName") - private String timestampFieldName; - - /** - * The name of the entity. - */ - @JsonProperty(value = "properties.typeName") - private String typeName; - - /** - * The id property names. Properties which uniquely identify an interaction - * instance. - */ - @JsonProperty(value = "properties.idPropertyNames") - private List idPropertyNames; - - /** - * Profiles that participated in the interaction. - */ - @JsonProperty(value = "properties.participantProfiles") - private List participantProfiles; - - /** - * The primary participant property name for an interaction ,This is used - * to logically represent the agent of the interaction, Specify the - * participant name here from ParticipantName. - */ - @JsonProperty(value = "properties.primaryParticipantProfilePropertyName") - private String primaryParticipantProfilePropertyName; - - /** - * This is specific to interactions modeled as activities. Data sources are - * used to determine where data is stored and also in precedence rules. - */ - @JsonProperty(value = "properties.dataSourcePrecedenceRules", access = JsonProperty.Access.WRITE_ONLY) - private List dataSourcePrecedenceRules; - - /** - * The data source name. - */ - @JsonProperty(value = "properties.defaultDataSource.name", access = JsonProperty.Access.WRITE_ONLY) - private String interactionResourceFormatName; - - /** - * The data source type. Possible values include: 'Connector', - * 'LinkInteraction', 'SystemDefault'. - */ - @JsonProperty(value = "properties.defaultDataSource.dataSourceType", access = JsonProperty.Access.WRITE_ONLY) - private DataSourceType dataSourceType; - - /** - * The data source status. Possible values include: 'None', 'Active', - * 'Deleted'. - */ - @JsonProperty(value = "properties.defaultDataSource.status", access = JsonProperty.Access.WRITE_ONLY) - private Status status; - - /** - * The data source ID. - */ - @JsonProperty(value = "properties.defaultDataSource.id", access = JsonProperty.Access.WRITE_ONLY) - private Integer interactionResourceFormatId; - - /** - * The data source reference id. - */ - @JsonProperty(value = "properties.defaultDataSource.dataSourceReferenceId", access = JsonProperty.Access.WRITE_ONLY) - private String dataSourceReferenceId; - - /** - * An interaction can be tagged as an activity only during create. This - * enables the interaction to be editable and can enable merging of - * properties from multiple data sources based on precedence, which is - * defined at a link level. - */ - @JsonProperty(value = "properties.isActivity") - private Boolean isActivity; - - /** - * Get the attributes value. - * - * @return the attributes value - */ - public Map> attributes() { - return this.attributes; - } - - /** - * Set the attributes value. - * - * @param attributes the attributes value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withAttributes(Map> attributes) { - this.attributes = attributes; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the localizedAttributes value. - * - * @return the localizedAttributes value - */ - public Map> localizedAttributes() { - return this.localizedAttributes; - } - - /** - * Set the localizedAttributes value. - * - * @param localizedAttributes the localizedAttributes value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withLocalizedAttributes(Map> localizedAttributes) { - this.localizedAttributes = localizedAttributes; - return this; - } - - /** - * Get the smallImage value. - * - * @return the smallImage value - */ - public String smallImage() { - return this.smallImage; - } - - /** - * Set the smallImage value. - * - * @param smallImage the smallImage value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withSmallImage(String smallImage) { - this.smallImage = smallImage; - return this; - } - - /** - * Get the mediumImage value. - * - * @return the mediumImage value - */ - public String mediumImage() { - return this.mediumImage; - } - - /** - * Set the mediumImage value. - * - * @param mediumImage the mediumImage value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withMediumImage(String mediumImage) { - this.mediumImage = mediumImage; - return this; - } - - /** - * Get the largeImage value. - * - * @return the largeImage value - */ - public String largeImage() { - return this.largeImage; - } - - /** - * Set the largeImage value. - * - * @param largeImage the largeImage value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withLargeImage(String largeImage) { - this.largeImage = largeImage; - return this; - } - - /** - * Get the apiEntitySetName value. - * - * @return the apiEntitySetName value - */ - public String apiEntitySetName() { - return this.apiEntitySetName; - } - - /** - * Set the apiEntitySetName value. - * - * @param apiEntitySetName the apiEntitySetName value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withApiEntitySetName(String apiEntitySetName) { - this.apiEntitySetName = apiEntitySetName; - return this; - } - - /** - * Get the entityType value. - * - * @return the entityType value - */ - public EntityTypes entityType() { - return this.entityType; - } - - /** - * Set the entityType value. - * - * @param entityType the entityType value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withEntityType(EntityTypes entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the fields value. - * - * @return the fields value - */ - public List fields() { - return this.fields; - } - - /** - * Set the fields value. - * - * @param fields the fields value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withFields(List fields) { - this.fields = fields; - return this; - } - - /** - * Get the instancesCount value. - * - * @return the instancesCount value - */ - public Integer instancesCount() { - return this.instancesCount; - } - - /** - * Set the instancesCount value. - * - * @param instancesCount the instancesCount value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withInstancesCount(Integer instancesCount) { - this.instancesCount = instancesCount; - return this; - } - - /** - * Get the lastChangedUtc value. - * - * @return the lastChangedUtc value - */ - public DateTime lastChangedUtc() { - return this.lastChangedUtc; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the schemaItemTypeLink value. - * - * @return the schemaItemTypeLink value - */ - public String schemaItemTypeLink() { - return this.schemaItemTypeLink; - } - - /** - * Set the schemaItemTypeLink value. - * - * @param schemaItemTypeLink the schemaItemTypeLink value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withSchemaItemTypeLink(String schemaItemTypeLink) { - this.schemaItemTypeLink = schemaItemTypeLink; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the timestampFieldName value. - * - * @return the timestampFieldName value - */ - public String timestampFieldName() { - return this.timestampFieldName; - } - - /** - * Set the timestampFieldName value. - * - * @param timestampFieldName the timestampFieldName value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withTimestampFieldName(String timestampFieldName) { - this.timestampFieldName = timestampFieldName; - return this; - } - - /** - * Get the typeName value. - * - * @return the typeName value - */ - public String typeName() { - return this.typeName; - } - - /** - * Set the typeName value. - * - * @param typeName the typeName value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - - /** - * Get the idPropertyNames value. - * - * @return the idPropertyNames value - */ - public List idPropertyNames() { - return this.idPropertyNames; - } - - /** - * Set the idPropertyNames value. - * - * @param idPropertyNames the idPropertyNames value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withIdPropertyNames(List idPropertyNames) { - this.idPropertyNames = idPropertyNames; - return this; - } - - /** - * Get the participantProfiles value. - * - * @return the participantProfiles value - */ - public List participantProfiles() { - return this.participantProfiles; - } - - /** - * Set the participantProfiles value. - * - * @param participantProfiles the participantProfiles value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withParticipantProfiles(List participantProfiles) { - this.participantProfiles = participantProfiles; - return this; - } - - /** - * Get the primaryParticipantProfilePropertyName value. - * - * @return the primaryParticipantProfilePropertyName value - */ - public String primaryParticipantProfilePropertyName() { - return this.primaryParticipantProfilePropertyName; - } - - /** - * Set the primaryParticipantProfilePropertyName value. - * - * @param primaryParticipantProfilePropertyName the primaryParticipantProfilePropertyName value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withPrimaryParticipantProfilePropertyName(String primaryParticipantProfilePropertyName) { - this.primaryParticipantProfilePropertyName = primaryParticipantProfilePropertyName; - return this; - } - - /** - * Get the dataSourcePrecedenceRules value. - * - * @return the dataSourcePrecedenceRules value - */ - public List dataSourcePrecedenceRules() { - return this.dataSourcePrecedenceRules; - } - - /** - * Get the interactionResourceFormatName value. - * - * @return the interactionResourceFormatName value - */ - public String interactionResourceFormatName() { - return this.interactionResourceFormatName; - } - - /** - * Get the dataSourceType value. - * - * @return the dataSourceType value - */ - public DataSourceType dataSourceType() { - return this.dataSourceType; - } - - /** - * Get the status value. - * - * @return the status value - */ - public Status status() { - return this.status; - } - - /** - * Get the interactionResourceFormatId value. - * - * @return the interactionResourceFormatId value - */ - public Integer interactionResourceFormatId() { - return this.interactionResourceFormatId; - } - - /** - * Get the dataSourceReferenceId value. - * - * @return the dataSourceReferenceId value - */ - public String dataSourceReferenceId() { - return this.dataSourceReferenceId; - } - - /** - * Get the isActivity value. - * - * @return the isActivity value - */ - public Boolean isActivity() { - return this.isActivity; - } - - /** - * Set the isActivity value. - * - * @param isActivity the isActivity value to set - * @return the InteractionResourceFormatInner object itself. - */ - public InteractionResourceFormatInner withIsActivity(Boolean isActivity) { - this.isActivity = isActivity; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/InteractionsInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/InteractionsInner.java deleted file mode 100644 index 18f56bfad3b..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/InteractionsInner.java +++ /dev/null @@ -1,909 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Interactions. - */ -public class InteractionsInner { - /** The Retrofit service to perform REST calls. */ - private InteractionsService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of InteractionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public InteractionsInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(InteractionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Interactions to be - * used by Retrofit to perform actually REST calls. - */ - interface InteractionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Interactions createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions/{interactionName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("interactionName") String interactionName, @Path("subscriptionId") String subscriptionId, @Body InteractionResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Interactions beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions/{interactionName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("interactionName") String interactionName, @Path("subscriptionId") String subscriptionId, @Body InteractionResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Interactions get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions/{interactionName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("interactionName") String interactionName, @Path("subscriptionId") String subscriptionId, @Query("locale-code") String localeCode, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Interactions listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("locale-code") String localeCode, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Interactions suggestRelationshipLinks" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions/{interactionName}/suggestRelationshipLinks") - Observable> suggestRelationshipLinks(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("interactionName") String interactionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Interactions listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates an interaction or updates an existing interaction within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InteractionResourceFormatInner object if successful. - */ - public InteractionResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String interactionName, InteractionResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, interactionName, parameters).toBlocking().last().body(); - } - - /** - * Creates an interaction or updates an existing interaction within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String interactionName, InteractionResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, interactionName, parameters), serviceCallback); - } - - /** - * Creates an interaction or updates an existing interaction within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String interactionName, InteractionResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, interactionName, parameters).map(new Func1, InteractionResourceFormatInner>() { - @Override - public InteractionResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates an interaction or updates an existing interaction within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String interactionName, InteractionResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (interactionName == null) { - throw new IllegalArgumentException("Parameter interactionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, hubName, interactionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates an interaction or updates an existing interaction within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InteractionResourceFormatInner object if successful. - */ - public InteractionResourceFormatInner beginCreateOrUpdate(String resourceGroupName, String hubName, String interactionName, InteractionResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, interactionName, parameters).toBlocking().single().body(); - } - - /** - * Creates an interaction or updates an existing interaction within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String interactionName, InteractionResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, interactionName, parameters), serviceCallback); - } - - /** - * Creates an interaction or updates an existing interaction within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InteractionResourceFormatInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String interactionName, InteractionResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, interactionName, parameters).map(new Func1, InteractionResourceFormatInner>() { - @Override - public InteractionResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates an interaction or updates an existing interaction within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InteractionResourceFormatInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String interactionName, InteractionResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (interactionName == null) { - throw new IllegalArgumentException("Parameter interactionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, hubName, interactionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets information about the specified interaction. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InteractionResourceFormatInner object if successful. - */ - public InteractionResourceFormatInner get(String resourceGroupName, String hubName, String interactionName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, interactionName).toBlocking().single().body(); - } - - /** - * Gets information about the specified interaction. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String interactionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, interactionName), serviceCallback); - } - - /** - * Gets information about the specified interaction. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InteractionResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String interactionName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, interactionName).map(new Func1, InteractionResourceFormatInner>() { - @Override - public InteractionResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified interaction. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InteractionResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String interactionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (interactionName == null) { - throw new IllegalArgumentException("Parameter interactionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String localeCode = null; - return service.get(resourceGroupName, hubName, interactionName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets information about the specified interaction. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param localeCode Locale of interaction to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InteractionResourceFormatInner object if successful. - */ - public InteractionResourceFormatInner get(String resourceGroupName, String hubName, String interactionName, String localeCode) { - return getWithServiceResponseAsync(resourceGroupName, hubName, interactionName, localeCode).toBlocking().single().body(); - } - - /** - * Gets information about the specified interaction. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param localeCode Locale of interaction to retrieve, default is en-us. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String interactionName, String localeCode, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, interactionName, localeCode), serviceCallback); - } - - /** - * Gets information about the specified interaction. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param localeCode Locale of interaction to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InteractionResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String interactionName, String localeCode) { - return getWithServiceResponseAsync(resourceGroupName, hubName, interactionName, localeCode).map(new Func1, InteractionResourceFormatInner>() { - @Override - public InteractionResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified interaction. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param localeCode Locale of interaction to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InteractionResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String interactionName, String localeCode) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (interactionName == null) { - throw new IllegalArgumentException("Parameter interactionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, interactionName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InteractionResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InteractionResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InteractionResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InteractionResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String localeCode = null; - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param localeCode Locale of interaction to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InteractionResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName, final String localeCode) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName, localeCode).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param localeCode Locale of interaction to retrieve, default is en-us. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final String localeCode, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName, localeCode), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param localeCode Locale of interaction to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InteractionResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName, final String localeCode) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName, localeCode) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all interactions in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param localeCode Locale of interaction to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InteractionResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName, final String localeCode) { - return listByHubSinglePageAsync(resourceGroupName, hubName, localeCode) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all interactions in the hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - ServiceResponse> * @param localeCode Locale of interaction to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InteractionResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName, final String localeCode) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Suggests relationships to create relationship links. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SuggestRelationshipLinksResponseInner object if successful. - */ - public SuggestRelationshipLinksResponseInner suggestRelationshipLinks(String resourceGroupName, String hubName, String interactionName) { - return suggestRelationshipLinksWithServiceResponseAsync(resourceGroupName, hubName, interactionName).toBlocking().single().body(); - } - - /** - * Suggests relationships to create relationship links. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture suggestRelationshipLinksAsync(String resourceGroupName, String hubName, String interactionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(suggestRelationshipLinksWithServiceResponseAsync(resourceGroupName, hubName, interactionName), serviceCallback); - } - - /** - * Suggests relationships to create relationship links. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SuggestRelationshipLinksResponseInner object - */ - public Observable suggestRelationshipLinksAsync(String resourceGroupName, String hubName, String interactionName) { - return suggestRelationshipLinksWithServiceResponseAsync(resourceGroupName, hubName, interactionName).map(new Func1, SuggestRelationshipLinksResponseInner>() { - @Override - public SuggestRelationshipLinksResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Suggests relationships to create relationship links. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param interactionName The name of the interaction. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SuggestRelationshipLinksResponseInner object - */ - public Observable> suggestRelationshipLinksWithServiceResponseAsync(String resourceGroupName, String hubName, String interactionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (interactionName == null) { - throw new IllegalArgumentException("Parameter interactionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.suggestRelationshipLinks(resourceGroupName, hubName, interactionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = suggestRelationshipLinksDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse suggestRelationshipLinksDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all interactions in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InteractionResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all interactions in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all interactions in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InteractionResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all interactions in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InteractionResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all interactions in the hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InteractionResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiDefinitionInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiDefinitionInner.java deleted file mode 100644 index c34c92db30c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiDefinitionInner.java +++ /dev/null @@ -1,471 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.management.customerinsights.EntityTypes; -import java.util.Map; -import com.microsoft.azure.management.customerinsights.CalculationWindowTypes; -import com.microsoft.azure.management.customerinsights.KpiFunctions; -import java.util.List; -import com.microsoft.azure.management.customerinsights.KpiGroupByMetadata; -import com.microsoft.azure.management.customerinsights.KpiParticipantProfilesMetadata; -import com.microsoft.azure.management.customerinsights.ProvisioningStates; -import com.microsoft.azure.management.customerinsights.KpiThresholds; -import com.microsoft.azure.management.customerinsights.KpiAlias; -import com.microsoft.azure.management.customerinsights.KpiExtract; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines the KPI Threshold limits. - */ -public class KpiDefinitionInner { - /** - * The mapping entity type. Possible values include: 'None', 'Profile', - * 'Interaction', 'Relationship'. - */ - @JsonProperty(value = "entityType", required = true) - private EntityTypes entityType; - - /** - * The mapping entity name. - */ - @JsonProperty(value = "entityTypeName", required = true) - private String entityTypeName; - - /** - * The hub name. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * The KPI name. - */ - @JsonProperty(value = "kpiName", access = JsonProperty.Access.WRITE_ONLY) - private String kpiName; - - /** - * Localized display name for the KPI. - */ - @JsonProperty(value = "displayName") - private Map displayName; - - /** - * Localized description for the KPI. - */ - @JsonProperty(value = "description") - private Map description; - - /** - * The calculation window. Possible values include: 'Lifetime', 'Hour', - * 'Day', 'Week', 'Month'. - */ - @JsonProperty(value = "calculationWindow", required = true) - private CalculationWindowTypes calculationWindow; - - /** - * Name of calculation window field. - */ - @JsonProperty(value = "calculationWindowFieldName") - private String calculationWindowFieldName; - - /** - * The computation function for the KPI. Possible values include: 'Sum', - * 'Avg', 'Min', 'Max', 'Last', 'Count', 'None', 'CountDistinct'. - */ - @JsonProperty(value = "function", required = true) - private KpiFunctions function; - - /** - * The computation expression for the KPI. - */ - @JsonProperty(value = "expression", required = true) - private String expression; - - /** - * The unit of measurement for the KPI. - */ - @JsonProperty(value = "unit") - private String unit; - - /** - * The filter expression for the KPI. - */ - @JsonProperty(value = "filter") - private String filter; - - /** - * the group by properties for the KPI. - */ - @JsonProperty(value = "groupBy") - private List groupBy; - - /** - * The KPI GroupByMetadata. - */ - @JsonProperty(value = "groupByMetadata", access = JsonProperty.Access.WRITE_ONLY) - private List groupByMetadata; - - /** - * The participant profiles. - */ - @JsonProperty(value = "participantProfilesMetadata", access = JsonProperty.Access.WRITE_ONLY) - private List participantProfilesMetadata; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * The KPI thresholds. - */ - @JsonProperty(value = "thresHolds") - private KpiThresholds thresHolds; - - /** - * The aliases. - */ - @JsonProperty(value = "aliases") - private List aliases; - - /** - * The KPI extracts. - */ - @JsonProperty(value = "extracts") - private List extracts; - - /** - * Get the entityType value. - * - * @return the entityType value - */ - public EntityTypes entityType() { - return this.entityType; - } - - /** - * Set the entityType value. - * - * @param entityType the entityType value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withEntityType(EntityTypes entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the entityTypeName value. - * - * @return the entityTypeName value - */ - public String entityTypeName() { - return this.entityTypeName; - } - - /** - * Set the entityTypeName value. - * - * @param entityTypeName the entityTypeName value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withEntityTypeName(String entityTypeName) { - this.entityTypeName = entityTypeName; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the kpiName value. - * - * @return the kpiName value - */ - public String kpiName() { - return this.kpiName; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the calculationWindow value. - * - * @return the calculationWindow value - */ - public CalculationWindowTypes calculationWindow() { - return this.calculationWindow; - } - - /** - * Set the calculationWindow value. - * - * @param calculationWindow the calculationWindow value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withCalculationWindow(CalculationWindowTypes calculationWindow) { - this.calculationWindow = calculationWindow; - return this; - } - - /** - * Get the calculationWindowFieldName value. - * - * @return the calculationWindowFieldName value - */ - public String calculationWindowFieldName() { - return this.calculationWindowFieldName; - } - - /** - * Set the calculationWindowFieldName value. - * - * @param calculationWindowFieldName the calculationWindowFieldName value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withCalculationWindowFieldName(String calculationWindowFieldName) { - this.calculationWindowFieldName = calculationWindowFieldName; - return this; - } - - /** - * Get the function value. - * - * @return the function value - */ - public KpiFunctions function() { - return this.function; - } - - /** - * Set the function value. - * - * @param function the function value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withFunction(KpiFunctions function) { - this.function = function; - return this; - } - - /** - * Get the expression value. - * - * @return the expression value - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression value. - * - * @param expression the expression value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withExpression(String expression) { - this.expression = expression; - return this; - } - - /** - * Get the unit value. - * - * @return the unit value - */ - public String unit() { - return this.unit; - } - - /** - * Set the unit value. - * - * @param unit the unit value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withUnit(String unit) { - this.unit = unit; - return this; - } - - /** - * Get the filter value. - * - * @return the filter value - */ - public String filter() { - return this.filter; - } - - /** - * Set the filter value. - * - * @param filter the filter value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withFilter(String filter) { - this.filter = filter; - return this; - } - - /** - * Get the groupBy value. - * - * @return the groupBy value - */ - public List groupBy() { - return this.groupBy; - } - - /** - * Set the groupBy value. - * - * @param groupBy the groupBy value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withGroupBy(List groupBy) { - this.groupBy = groupBy; - return this; - } - - /** - * Get the groupByMetadata value. - * - * @return the groupByMetadata value - */ - public List groupByMetadata() { - return this.groupByMetadata; - } - - /** - * Get the participantProfilesMetadata value. - * - * @return the participantProfilesMetadata value - */ - public List participantProfilesMetadata() { - return this.participantProfilesMetadata; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the thresHolds value. - * - * @return the thresHolds value - */ - public KpiThresholds thresHolds() { - return this.thresHolds; - } - - /** - * Set the thresHolds value. - * - * @param thresHolds the thresHolds value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withThresHolds(KpiThresholds thresHolds) { - this.thresHolds = thresHolds; - return this; - } - - /** - * Get the aliases value. - * - * @return the aliases value - */ - public List aliases() { - return this.aliases; - } - - /** - * Set the aliases value. - * - * @param aliases the aliases value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withAliases(List aliases) { - this.aliases = aliases; - return this; - } - - /** - * Get the extracts value. - * - * @return the extracts value - */ - public List extracts() { - return this.extracts; - } - - /** - * Set the extracts value. - * - * @param extracts the extracts value to set - * @return the KpiDefinitionInner object itself. - */ - public KpiDefinitionInner withExtracts(List extracts) { - this.extracts = extracts; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiResourceFormatInner.java deleted file mode 100644 index a9f2e17f3a4..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiResourceFormatInner.java +++ /dev/null @@ -1,474 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.management.customerinsights.EntityTypes; -import java.util.Map; -import com.microsoft.azure.management.customerinsights.CalculationWindowTypes; -import com.microsoft.azure.management.customerinsights.KpiFunctions; -import java.util.List; -import com.microsoft.azure.management.customerinsights.KpiGroupByMetadata; -import com.microsoft.azure.management.customerinsights.KpiParticipantProfilesMetadata; -import com.microsoft.azure.management.customerinsights.ProvisioningStates; -import com.microsoft.azure.management.customerinsights.KpiThresholds; -import com.microsoft.azure.management.customerinsights.KpiAlias; -import com.microsoft.azure.management.customerinsights.KpiExtract; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The KPI resource format. - */ -@JsonFlatten -public class KpiResourceFormatInner extends ProxyResource { - /** - * The mapping entity type. Possible values include: 'None', 'Profile', - * 'Interaction', 'Relationship'. - */ - @JsonProperty(value = "properties.entityType", required = true) - private EntityTypes entityType; - - /** - * The mapping entity name. - */ - @JsonProperty(value = "properties.entityTypeName", required = true) - private String entityTypeName; - - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * The KPI name. - */ - @JsonProperty(value = "properties.kpiName", access = JsonProperty.Access.WRITE_ONLY) - private String kpiName; - - /** - * Localized display name for the KPI. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * Localized description for the KPI. - */ - @JsonProperty(value = "properties.description") - private Map description; - - /** - * The calculation window. Possible values include: 'Lifetime', 'Hour', - * 'Day', 'Week', 'Month'. - */ - @JsonProperty(value = "properties.calculationWindow", required = true) - private CalculationWindowTypes calculationWindow; - - /** - * Name of calculation window field. - */ - @JsonProperty(value = "properties.calculationWindowFieldName") - private String calculationWindowFieldName; - - /** - * The computation function for the KPI. Possible values include: 'Sum', - * 'Avg', 'Min', 'Max', 'Last', 'Count', 'None', 'CountDistinct'. - */ - @JsonProperty(value = "properties.function", required = true) - private KpiFunctions function; - - /** - * The computation expression for the KPI. - */ - @JsonProperty(value = "properties.expression", required = true) - private String expression; - - /** - * The unit of measurement for the KPI. - */ - @JsonProperty(value = "properties.unit") - private String unit; - - /** - * The filter expression for the KPI. - */ - @JsonProperty(value = "properties.filter") - private String filter; - - /** - * the group by properties for the KPI. - */ - @JsonProperty(value = "properties.groupBy") - private List groupBy; - - /** - * The KPI GroupByMetadata. - */ - @JsonProperty(value = "properties.groupByMetadata", access = JsonProperty.Access.WRITE_ONLY) - private List groupByMetadata; - - /** - * The participant profiles. - */ - @JsonProperty(value = "properties.participantProfilesMetadata", access = JsonProperty.Access.WRITE_ONLY) - private List participantProfilesMetadata; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * The KPI thresholds. - */ - @JsonProperty(value = "properties.thresHolds") - private KpiThresholds thresHolds; - - /** - * The aliases. - */ - @JsonProperty(value = "properties.aliases") - private List aliases; - - /** - * The KPI extracts. - */ - @JsonProperty(value = "properties.extracts") - private List extracts; - - /** - * Get the entityType value. - * - * @return the entityType value - */ - public EntityTypes entityType() { - return this.entityType; - } - - /** - * Set the entityType value. - * - * @param entityType the entityType value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withEntityType(EntityTypes entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the entityTypeName value. - * - * @return the entityTypeName value - */ - public String entityTypeName() { - return this.entityTypeName; - } - - /** - * Set the entityTypeName value. - * - * @param entityTypeName the entityTypeName value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withEntityTypeName(String entityTypeName) { - this.entityTypeName = entityTypeName; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the kpiName value. - * - * @return the kpiName value - */ - public String kpiName() { - return this.kpiName; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the calculationWindow value. - * - * @return the calculationWindow value - */ - public CalculationWindowTypes calculationWindow() { - return this.calculationWindow; - } - - /** - * Set the calculationWindow value. - * - * @param calculationWindow the calculationWindow value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withCalculationWindow(CalculationWindowTypes calculationWindow) { - this.calculationWindow = calculationWindow; - return this; - } - - /** - * Get the calculationWindowFieldName value. - * - * @return the calculationWindowFieldName value - */ - public String calculationWindowFieldName() { - return this.calculationWindowFieldName; - } - - /** - * Set the calculationWindowFieldName value. - * - * @param calculationWindowFieldName the calculationWindowFieldName value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withCalculationWindowFieldName(String calculationWindowFieldName) { - this.calculationWindowFieldName = calculationWindowFieldName; - return this; - } - - /** - * Get the function value. - * - * @return the function value - */ - public KpiFunctions function() { - return this.function; - } - - /** - * Set the function value. - * - * @param function the function value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withFunction(KpiFunctions function) { - this.function = function; - return this; - } - - /** - * Get the expression value. - * - * @return the expression value - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression value. - * - * @param expression the expression value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withExpression(String expression) { - this.expression = expression; - return this; - } - - /** - * Get the unit value. - * - * @return the unit value - */ - public String unit() { - return this.unit; - } - - /** - * Set the unit value. - * - * @param unit the unit value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withUnit(String unit) { - this.unit = unit; - return this; - } - - /** - * Get the filter value. - * - * @return the filter value - */ - public String filter() { - return this.filter; - } - - /** - * Set the filter value. - * - * @param filter the filter value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withFilter(String filter) { - this.filter = filter; - return this; - } - - /** - * Get the groupBy value. - * - * @return the groupBy value - */ - public List groupBy() { - return this.groupBy; - } - - /** - * Set the groupBy value. - * - * @param groupBy the groupBy value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withGroupBy(List groupBy) { - this.groupBy = groupBy; - return this; - } - - /** - * Get the groupByMetadata value. - * - * @return the groupByMetadata value - */ - public List groupByMetadata() { - return this.groupByMetadata; - } - - /** - * Get the participantProfilesMetadata value. - * - * @return the participantProfilesMetadata value - */ - public List participantProfilesMetadata() { - return this.participantProfilesMetadata; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the thresHolds value. - * - * @return the thresHolds value - */ - public KpiThresholds thresHolds() { - return this.thresHolds; - } - - /** - * Set the thresHolds value. - * - * @param thresHolds the thresHolds value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withThresHolds(KpiThresholds thresHolds) { - this.thresHolds = thresHolds; - return this; - } - - /** - * Get the aliases value. - * - * @return the aliases value - */ - public List aliases() { - return this.aliases; - } - - /** - * Set the aliases value. - * - * @param aliases the aliases value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withAliases(List aliases) { - this.aliases = aliases; - return this; - } - - /** - * Get the extracts value. - * - * @return the extracts value - */ - public List extracts() { - return this.extracts; - } - - /** - * Set the extracts value. - * - * @param extracts the extracts value to set - * @return the KpiResourceFormatInner object itself. - */ - public KpiResourceFormatInner withExtracts(List extracts) { - this.extracts = extracts; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpisInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpisInner.java deleted file mode 100644 index b9407567fee..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpisInner.java +++ /dev/null @@ -1,872 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Kpis. - */ -public class KpisInner { - /** The Retrofit service to perform REST calls. */ - private KpisService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of KpisInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public KpisInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(KpisService.class); - this.client = client; - } - - /** - * The interface defining all the services for Kpis to be - * used by Retrofit to perform actually REST calls. - */ - interface KpisService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Kpis createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("kpiName") String kpiName, @Path("subscriptionId") String subscriptionId, @Body KpiResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Kpis beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("kpiName") String kpiName, @Path("subscriptionId") String subscriptionId, @Body KpiResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Kpis get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("kpiName") String kpiName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Kpis delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("kpiName") String kpiName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Kpis beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("kpiName") String kpiName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Kpis reprocess" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}/reprocess") - Observable> reprocess(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("kpiName") String kpiName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Kpis listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Kpis listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a KPI or updates an existing KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param parameters Parameters supplied to the create/update KPI operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the KpiResourceFormatInner object if successful. - */ - public KpiResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String kpiName, KpiResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, kpiName, parameters).toBlocking().last().body(); - } - - /** - * Creates a KPI or updates an existing KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param parameters Parameters supplied to the create/update KPI operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String kpiName, KpiResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, kpiName, parameters), serviceCallback); - } - - /** - * Creates a KPI or updates an existing KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param parameters Parameters supplied to the create/update KPI operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String kpiName, KpiResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, kpiName, parameters).map(new Func1, KpiResourceFormatInner>() { - @Override - public KpiResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a KPI or updates an existing KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param parameters Parameters supplied to the create/update KPI operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String kpiName, KpiResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (kpiName == null) { - throw new IllegalArgumentException("Parameter kpiName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, hubName, kpiName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates a KPI or updates an existing KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param parameters Parameters supplied to the create/update KPI operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the KpiResourceFormatInner object if successful. - */ - public KpiResourceFormatInner beginCreateOrUpdate(String resourceGroupName, String hubName, String kpiName, KpiResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, kpiName, parameters).toBlocking().single().body(); - } - - /** - * Creates a KPI or updates an existing KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param parameters Parameters supplied to the create/update KPI operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String kpiName, KpiResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, kpiName, parameters), serviceCallback); - } - - /** - * Creates a KPI or updates an existing KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param parameters Parameters supplied to the create/update KPI operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the KpiResourceFormatInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String kpiName, KpiResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, kpiName, parameters).map(new Func1, KpiResourceFormatInner>() { - @Override - public KpiResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a KPI or updates an existing KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param parameters Parameters supplied to the create/update KPI operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the KpiResourceFormatInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String kpiName, KpiResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (kpiName == null) { - throw new IllegalArgumentException("Parameter kpiName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, hubName, kpiName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the KpiResourceFormatInner object if successful. - */ - public KpiResourceFormatInner get(String resourceGroupName, String hubName, String kpiName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, kpiName).toBlocking().single().body(); - } - - /** - * Gets a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String kpiName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, kpiName), serviceCallback); - } - - /** - * Gets a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the KpiResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String kpiName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, kpiName).map(new Func1, KpiResourceFormatInner>() { - @Override - public KpiResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the KpiResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String kpiName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (kpiName == null) { - throw new IllegalArgumentException("Parameter kpiName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, kpiName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String kpiName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, kpiName).toBlocking().last().body(); - } - - /** - * Deletes a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String kpiName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, kpiName), serviceCallback); - } - - /** - * Deletes a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String kpiName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, kpiName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String kpiName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (kpiName == null) { - throw new IllegalArgumentException("Parameter kpiName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, hubName, kpiName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String hubName, String kpiName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, kpiName).toBlocking().single().body(); - } - - /** - * Deletes a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String hubName, String kpiName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, kpiName), serviceCallback); - } - - /** - * Deletes a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String hubName, String kpiName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, kpiName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a KPI in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String hubName, String kpiName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (kpiName == null) { - throw new IllegalArgumentException("Parameter kpiName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, hubName, kpiName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Reprocesses the Kpi values of the specified KPI. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void reprocess(String resourceGroupName, String hubName, String kpiName) { - reprocessWithServiceResponseAsync(resourceGroupName, hubName, kpiName).toBlocking().single().body(); - } - - /** - * Reprocesses the Kpi values of the specified KPI. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture reprocessAsync(String resourceGroupName, String hubName, String kpiName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reprocessWithServiceResponseAsync(resourceGroupName, hubName, kpiName), serviceCallback); - } - - /** - * Reprocesses the Kpi values of the specified KPI. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable reprocessAsync(String resourceGroupName, String hubName, String kpiName) { - return reprocessWithServiceResponseAsync(resourceGroupName, hubName, kpiName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Reprocesses the Kpi values of the specified KPI. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param kpiName The name of the KPI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> reprocessWithServiceResponseAsync(String resourceGroupName, String hubName, String kpiName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (kpiName == null) { - throw new IllegalArgumentException("Parameter kpiName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.reprocess(resourceGroupName, hubName, kpiName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = reprocessDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse reprocessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the KPIs in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<KpiResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the KPIs in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the KPIs in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<KpiResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the KPIs in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<KpiResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the KPIs in the specified hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<KpiResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the KPIs in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<KpiResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the KPIs in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the KPIs in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<KpiResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the KPIs in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<KpiResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the KPIs in the specified hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<KpiResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/LinkResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/LinkResourceFormatInner.java deleted file mode 100644 index e008c5c1d7d..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/LinkResourceFormatInner.java +++ /dev/null @@ -1,339 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.management.customerinsights.EntityType; -import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.customerinsights.TypePropertiesMapping; -import com.microsoft.azure.management.customerinsights.ParticipantPropertyReference; -import com.microsoft.azure.management.customerinsights.ProvisioningStates; -import com.microsoft.azure.management.customerinsights.InstanceOperationType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The link resource format. - */ -@JsonFlatten -public class LinkResourceFormatInner extends ProxyResource { - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * The link name. - */ - @JsonProperty(value = "properties.linkName", access = JsonProperty.Access.WRITE_ONLY) - private String linkName; - - /** - * Type of source entity. Possible values include: 'None', 'Profile', - * 'Interaction', 'Relationship'. - */ - @JsonProperty(value = "properties.sourceEntityType", required = true) - private EntityType sourceEntityType; - - /** - * Type of target entity. Possible values include: 'None', 'Profile', - * 'Interaction', 'Relationship'. - */ - @JsonProperty(value = "properties.targetEntityType", required = true) - private EntityType targetEntityType; - - /** - * Name of the source Entity Type. - */ - @JsonProperty(value = "properties.sourceEntityTypeName", required = true) - private String sourceEntityTypeName; - - /** - * Name of the target Entity Type. - */ - @JsonProperty(value = "properties.targetEntityTypeName", required = true) - private String targetEntityTypeName; - - /** - * Localized display name for the Link. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * Localized descriptions for the Link. - */ - @JsonProperty(value = "properties.description") - private Map description; - - /** - * The set of properties mappings between the source and target Types. - */ - @JsonProperty(value = "properties.mappings") - private List mappings; - - /** - * The properties that represent the participating profile. - */ - @JsonProperty(value = "properties.participantPropertyReferences", required = true) - private List participantPropertyReferences; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * Indicating whether the link is reference only link. This flag is ingored - * if the Mappings are defined. If the mappings are not defined and it is - * set to true, links processing will not create or update profiles. - */ - @JsonProperty(value = "properties.referenceOnly") - private Boolean referenceOnly; - - /** - * Determines whether this link is supposed to create or delete instances - * if Link is NOT Reference Only. Possible values include: 'Upsert', - * 'Delete'. - */ - @JsonProperty(value = "properties.operationType") - private InstanceOperationType operationType; - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the linkName value. - * - * @return the linkName value - */ - public String linkName() { - return this.linkName; - } - - /** - * Get the sourceEntityType value. - * - * @return the sourceEntityType value - */ - public EntityType sourceEntityType() { - return this.sourceEntityType; - } - - /** - * Set the sourceEntityType value. - * - * @param sourceEntityType the sourceEntityType value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withSourceEntityType(EntityType sourceEntityType) { - this.sourceEntityType = sourceEntityType; - return this; - } - - /** - * Get the targetEntityType value. - * - * @return the targetEntityType value - */ - public EntityType targetEntityType() { - return this.targetEntityType; - } - - /** - * Set the targetEntityType value. - * - * @param targetEntityType the targetEntityType value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withTargetEntityType(EntityType targetEntityType) { - this.targetEntityType = targetEntityType; - return this; - } - - /** - * Get the sourceEntityTypeName value. - * - * @return the sourceEntityTypeName value - */ - public String sourceEntityTypeName() { - return this.sourceEntityTypeName; - } - - /** - * Set the sourceEntityTypeName value. - * - * @param sourceEntityTypeName the sourceEntityTypeName value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withSourceEntityTypeName(String sourceEntityTypeName) { - this.sourceEntityTypeName = sourceEntityTypeName; - return this; - } - - /** - * Get the targetEntityTypeName value. - * - * @return the targetEntityTypeName value - */ - public String targetEntityTypeName() { - return this.targetEntityTypeName; - } - - /** - * Set the targetEntityTypeName value. - * - * @param targetEntityTypeName the targetEntityTypeName value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withTargetEntityTypeName(String targetEntityTypeName) { - this.targetEntityTypeName = targetEntityTypeName; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the mappings value. - * - * @return the mappings value - */ - public List mappings() { - return this.mappings; - } - - /** - * Set the mappings value. - * - * @param mappings the mappings value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withMappings(List mappings) { - this.mappings = mappings; - return this; - } - - /** - * Get the participantPropertyReferences value. - * - * @return the participantPropertyReferences value - */ - public List participantPropertyReferences() { - return this.participantPropertyReferences; - } - - /** - * Set the participantPropertyReferences value. - * - * @param participantPropertyReferences the participantPropertyReferences value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withParticipantPropertyReferences(List participantPropertyReferences) { - this.participantPropertyReferences = participantPropertyReferences; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the referenceOnly value. - * - * @return the referenceOnly value - */ - public Boolean referenceOnly() { - return this.referenceOnly; - } - - /** - * Set the referenceOnly value. - * - * @param referenceOnly the referenceOnly value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withReferenceOnly(Boolean referenceOnly) { - this.referenceOnly = referenceOnly; - return this; - } - - /** - * Get the operationType value. - * - * @return the operationType value - */ - public InstanceOperationType operationType() { - return this.operationType; - } - - /** - * Set the operationType value. - * - * @param operationType the operationType value to set - * @return the LinkResourceFormatInner object itself. - */ - public LinkResourceFormatInner withOperationType(InstanceOperationType operationType) { - this.operationType = operationType; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/LinksInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/LinksInner.java deleted file mode 100644 index f13cc36ac96..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/LinksInner.java +++ /dev/null @@ -1,696 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Links. - */ -public class LinksInner { - /** The Retrofit service to perform REST calls. */ - private LinksService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of LinksInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public LinksInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(LinksService.class); - this.client = client; - } - - /** - * The interface defining all the services for Links to be - * used by Retrofit to perform actually REST calls. - */ - interface LinksService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Links createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links/{linkName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("linkName") String linkName, @Path("subscriptionId") String subscriptionId, @Body LinkResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Links beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links/{linkName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("linkName") String linkName, @Path("subscriptionId") String subscriptionId, @Body LinkResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Links get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links/{linkName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("linkName") String linkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Links delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links/{linkName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("linkName") String linkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Links listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Links listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a link or updates an existing link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param parameters Parameters supplied to the CreateOrUpdate Link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LinkResourceFormatInner object if successful. - */ - public LinkResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String linkName, LinkResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, linkName, parameters).toBlocking().last().body(); - } - - /** - * Creates a link or updates an existing link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param parameters Parameters supplied to the CreateOrUpdate Link operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String linkName, LinkResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, linkName, parameters), serviceCallback); - } - - /** - * Creates a link or updates an existing link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param parameters Parameters supplied to the CreateOrUpdate Link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String linkName, LinkResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, linkName, parameters).map(new Func1, LinkResourceFormatInner>() { - @Override - public LinkResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a link or updates an existing link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param parameters Parameters supplied to the CreateOrUpdate Link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String linkName, LinkResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (linkName == null) { - throw new IllegalArgumentException("Parameter linkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, hubName, linkName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates a link or updates an existing link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param parameters Parameters supplied to the CreateOrUpdate Link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LinkResourceFormatInner object if successful. - */ - public LinkResourceFormatInner beginCreateOrUpdate(String resourceGroupName, String hubName, String linkName, LinkResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, linkName, parameters).toBlocking().single().body(); - } - - /** - * Creates a link or updates an existing link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param parameters Parameters supplied to the CreateOrUpdate Link operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String linkName, LinkResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, linkName, parameters), serviceCallback); - } - - /** - * Creates a link or updates an existing link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param parameters Parameters supplied to the CreateOrUpdate Link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LinkResourceFormatInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String linkName, LinkResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, linkName, parameters).map(new Func1, LinkResourceFormatInner>() { - @Override - public LinkResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a link or updates an existing link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param parameters Parameters supplied to the CreateOrUpdate Link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LinkResourceFormatInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String linkName, LinkResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (linkName == null) { - throw new IllegalArgumentException("Parameter linkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, hubName, linkName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LinkResourceFormatInner object if successful. - */ - public LinkResourceFormatInner get(String resourceGroupName, String hubName, String linkName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, linkName).toBlocking().single().body(); - } - - /** - * Gets a link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String linkName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, linkName), serviceCallback); - } - - /** - * Gets a link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LinkResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String linkName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, linkName).map(new Func1, LinkResourceFormatInner>() { - @Override - public LinkResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LinkResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String linkName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (linkName == null) { - throw new IllegalArgumentException("Parameter linkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, linkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String linkName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, linkName).toBlocking().single().body(); - } - - /** - * Deletes a link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String linkName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, linkName), serviceCallback); - } - - /** - * Deletes a link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String linkName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, linkName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a link in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param linkName The name of the link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String linkName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (linkName == null) { - throw new IllegalArgumentException("Parameter linkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, hubName, linkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the links in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LinkResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the links in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the links in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LinkResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the links in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LinkResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the links in the specified hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LinkResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the links in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LinkResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the links in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the links in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LinkResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the links in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LinkResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the links in the specified hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LinkResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/PageImpl.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/PageImpl.java deleted file mode 100644 index 28940208872..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ProfileResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ProfileResourceFormatInner.java deleted file mode 100644 index 78dd02c2a4a..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ProfileResourceFormatInner.java +++ /dev/null @@ -1,467 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.customerinsights.EntityTypes; -import com.microsoft.azure.management.customerinsights.PropertyDefinition; -import org.joda.time.DateTime; -import com.microsoft.azure.management.customerinsights.ProvisioningStates; -import com.microsoft.azure.management.customerinsights.StrongId; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The profile resource format. - */ -@JsonFlatten -public class ProfileResourceFormatInner extends ProxyResource { - /** - * The attributes for the Type. - */ - @JsonProperty(value = "properties.attributes") - private Map> attributes; - - /** - * Localized descriptions for the property. - */ - @JsonProperty(value = "properties.description") - private Map description; - - /** - * Localized display names for the property. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * Any custom localized attributes for the Type. - */ - @JsonProperty(value = "properties.localizedAttributes") - private Map> localizedAttributes; - - /** - * Small Image associated with the Property or EntityType. - */ - @JsonProperty(value = "properties.smallImage") - private String smallImage; - - /** - * Medium Image associated with the Property or EntityType. - */ - @JsonProperty(value = "properties.mediumImage") - private String mediumImage; - - /** - * Large Image associated with the Property or EntityType. - */ - @JsonProperty(value = "properties.largeImage") - private String largeImage; - - /** - * The api entity set name. This becomes the odata entity set name for the - * entity Type being refered in this object. - */ - @JsonProperty(value = "properties.apiEntitySetName") - private String apiEntitySetName; - - /** - * Type of entity. Possible values include: 'None', 'Profile', - * 'Interaction', 'Relationship'. - */ - @JsonProperty(value = "properties.entityType") - private EntityTypes entityType; - - /** - * The properties of the Profile. - */ - @JsonProperty(value = "properties.fields") - private List fields; - - /** - * The instance count. - */ - @JsonProperty(value = "properties.instancesCount") - private Integer instancesCount; - - /** - * The last changed time for the type definition. - */ - @JsonProperty(value = "properties.lastChangedUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastChangedUtc; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * The schema org link. This helps ACI identify and suggest semantic - * models. - */ - @JsonProperty(value = "properties.schemaItemTypeLink") - private String schemaItemTypeLink; - - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * The timestamp property name. Represents the time when the interaction or - * profile update happened. - */ - @JsonProperty(value = "properties.timestampFieldName") - private String timestampFieldName; - - /** - * The name of the entity. - */ - @JsonProperty(value = "properties.typeName") - private String typeName; - - /** - * The strong IDs. - */ - @JsonProperty(value = "properties.strongIds") - private List strongIds; - - /** - * Get the attributes value. - * - * @return the attributes value - */ - public Map> attributes() { - return this.attributes; - } - - /** - * Set the attributes value. - * - * @param attributes the attributes value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withAttributes(Map> attributes) { - this.attributes = attributes; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the localizedAttributes value. - * - * @return the localizedAttributes value - */ - public Map> localizedAttributes() { - return this.localizedAttributes; - } - - /** - * Set the localizedAttributes value. - * - * @param localizedAttributes the localizedAttributes value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withLocalizedAttributes(Map> localizedAttributes) { - this.localizedAttributes = localizedAttributes; - return this; - } - - /** - * Get the smallImage value. - * - * @return the smallImage value - */ - public String smallImage() { - return this.smallImage; - } - - /** - * Set the smallImage value. - * - * @param smallImage the smallImage value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withSmallImage(String smallImage) { - this.smallImage = smallImage; - return this; - } - - /** - * Get the mediumImage value. - * - * @return the mediumImage value - */ - public String mediumImage() { - return this.mediumImage; - } - - /** - * Set the mediumImage value. - * - * @param mediumImage the mediumImage value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withMediumImage(String mediumImage) { - this.mediumImage = mediumImage; - return this; - } - - /** - * Get the largeImage value. - * - * @return the largeImage value - */ - public String largeImage() { - return this.largeImage; - } - - /** - * Set the largeImage value. - * - * @param largeImage the largeImage value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withLargeImage(String largeImage) { - this.largeImage = largeImage; - return this; - } - - /** - * Get the apiEntitySetName value. - * - * @return the apiEntitySetName value - */ - public String apiEntitySetName() { - return this.apiEntitySetName; - } - - /** - * Set the apiEntitySetName value. - * - * @param apiEntitySetName the apiEntitySetName value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withApiEntitySetName(String apiEntitySetName) { - this.apiEntitySetName = apiEntitySetName; - return this; - } - - /** - * Get the entityType value. - * - * @return the entityType value - */ - public EntityTypes entityType() { - return this.entityType; - } - - /** - * Set the entityType value. - * - * @param entityType the entityType value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withEntityType(EntityTypes entityType) { - this.entityType = entityType; - return this; - } - - /** - * Get the fields value. - * - * @return the fields value - */ - public List fields() { - return this.fields; - } - - /** - * Set the fields value. - * - * @param fields the fields value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withFields(List fields) { - this.fields = fields; - return this; - } - - /** - * Get the instancesCount value. - * - * @return the instancesCount value - */ - public Integer instancesCount() { - return this.instancesCount; - } - - /** - * Set the instancesCount value. - * - * @param instancesCount the instancesCount value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withInstancesCount(Integer instancesCount) { - this.instancesCount = instancesCount; - return this; - } - - /** - * Get the lastChangedUtc value. - * - * @return the lastChangedUtc value - */ - public DateTime lastChangedUtc() { - return this.lastChangedUtc; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the schemaItemTypeLink value. - * - * @return the schemaItemTypeLink value - */ - public String schemaItemTypeLink() { - return this.schemaItemTypeLink; - } - - /** - * Set the schemaItemTypeLink value. - * - * @param schemaItemTypeLink the schemaItemTypeLink value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withSchemaItemTypeLink(String schemaItemTypeLink) { - this.schemaItemTypeLink = schemaItemTypeLink; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the timestampFieldName value. - * - * @return the timestampFieldName value - */ - public String timestampFieldName() { - return this.timestampFieldName; - } - - /** - * Set the timestampFieldName value. - * - * @param timestampFieldName the timestampFieldName value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withTimestampFieldName(String timestampFieldName) { - this.timestampFieldName = timestampFieldName; - return this; - } - - /** - * Get the typeName value. - * - * @return the typeName value - */ - public String typeName() { - return this.typeName; - } - - /** - * Set the typeName value. - * - * @param typeName the typeName value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - - /** - * Get the strongIds value. - * - * @return the strongIds value - */ - public List strongIds() { - return this.strongIds; - } - - /** - * Set the strongIds value. - * - * @param strongIds the strongIds value to set - * @return the ProfileResourceFormatInner object itself. - */ - public ProfileResourceFormatInner withStrongIds(List strongIds) { - this.strongIds = strongIds; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ProfilesInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ProfilesInner.java deleted file mode 100644 index 42f5771aac7..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ProfilesInner.java +++ /dev/null @@ -1,1256 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Profiles. - */ -public class ProfilesInner { - /** The Retrofit service to perform REST calls. */ - private ProfilesService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of ProfilesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ProfilesInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(ProfilesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Profiles to be - * used by Retrofit to perform actually REST calls. - */ - interface ProfilesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Profiles createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/profiles/{profileName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Body ProfileResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Profiles beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/profiles/{profileName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Body ProfileResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Profiles get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/profiles/{profileName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Query("locale-code") String localeCode, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Profiles delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/profiles/{profileName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Query("locale-code") String localeCode, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Profiles beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/profiles/{profileName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Query("locale-code") String localeCode, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Profiles listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/profiles") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("locale-code") String localeCode, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Profiles getEnrichingKpis" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/profiles/{profileName}/getEnrichingKpis") - Observable> getEnrichingKpis(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Profiles listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a profile within a Hub, or updates an existing profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param parameters Parameters supplied to the create/delete Profile type operation - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ProfileResourceFormatInner object if successful. - */ - public ProfileResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String profileName, ProfileResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, profileName, parameters).toBlocking().last().body(); - } - - /** - * Creates a profile within a Hub, or updates an existing profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param parameters Parameters supplied to the create/delete Profile type operation - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String profileName, ProfileResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, profileName, parameters), serviceCallback); - } - - /** - * Creates a profile within a Hub, or updates an existing profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param parameters Parameters supplied to the create/delete Profile type operation - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String profileName, ProfileResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, profileName, parameters).map(new Func1, ProfileResourceFormatInner>() { - @Override - public ProfileResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a profile within a Hub, or updates an existing profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param parameters Parameters supplied to the create/delete Profile type operation - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName, ProfileResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, hubName, profileName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates a profile within a Hub, or updates an existing profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param parameters Parameters supplied to the create/delete Profile type operation - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ProfileResourceFormatInner object if successful. - */ - public ProfileResourceFormatInner beginCreateOrUpdate(String resourceGroupName, String hubName, String profileName, ProfileResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, profileName, parameters).toBlocking().single().body(); - } - - /** - * Creates a profile within a Hub, or updates an existing profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param parameters Parameters supplied to the create/delete Profile type operation - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String profileName, ProfileResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, profileName, parameters), serviceCallback); - } - - /** - * Creates a profile within a Hub, or updates an existing profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param parameters Parameters supplied to the create/delete Profile type operation - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProfileResourceFormatInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String profileName, ProfileResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, profileName, parameters).map(new Func1, ProfileResourceFormatInner>() { - @Override - public ProfileResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a profile within a Hub, or updates an existing profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param parameters Parameters supplied to the create/delete Profile type operation - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProfileResourceFormatInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName, ProfileResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, hubName, profileName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets information about the specified profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ProfileResourceFormatInner object if successful. - */ - public ProfileResourceFormatInner get(String resourceGroupName, String hubName, String profileName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, profileName).toBlocking().single().body(); - } - - /** - * Gets information about the specified profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String profileName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, profileName), serviceCallback); - } - - /** - * Gets information about the specified profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProfileResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String profileName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, profileName).map(new Func1, ProfileResourceFormatInner>() { - @Override - public ProfileResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProfileResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String localeCode = null; - return service.get(resourceGroupName, hubName, profileName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets information about the specified profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ProfileResourceFormatInner object if successful. - */ - public ProfileResourceFormatInner get(String resourceGroupName, String hubName, String profileName, String localeCode) { - return getWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode).toBlocking().single().body(); - } - - /** - * Gets information about the specified profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String profileName, String localeCode, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode), serviceCallback); - } - - /** - * Gets information about the specified profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProfileResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String profileName, String localeCode) { - return getWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode).map(new Func1, ProfileResourceFormatInner>() { - @Override - public ProfileResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified profile. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ProfileResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName, String localeCode) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, profileName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String profileName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, profileName).toBlocking().last().body(); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String profileName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, profileName), serviceCallback); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String profileName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, profileName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String localeCode = null; - Observable> observable = service.delete(resourceGroupName, hubName, profileName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String profileName, String localeCode) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode).toBlocking().last().body(); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String profileName, String localeCode, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode), serviceCallback); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String profileName, String localeCode) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName, String localeCode) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, hubName, profileName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String hubName, String profileName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, profileName).toBlocking().single().body(); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String hubName, String profileName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, profileName), serviceCallback); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String hubName, String profileName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, profileName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String localeCode = null; - return service.beginDelete(resourceGroupName, hubName, profileName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String hubName, String profileName, String localeCode) { - beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode).toBlocking().single().body(); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String hubName, String profileName, String localeCode, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode), serviceCallback); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String hubName, String profileName, String localeCode) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, profileName, localeCode).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a profile within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName, String localeCode) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, hubName, profileName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProfileResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProfileResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProfileResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProfileResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String localeCode = null; - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProfileResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName, final String localeCode) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName, localeCode).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final String localeCode, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName, localeCode), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProfileResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName, final String localeCode) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName, localeCode) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all profile in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProfileResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName, final String localeCode) { - return listByHubSinglePageAsync(resourceGroupName, hubName, localeCode) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all profile in the hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - ServiceResponse> * @param localeCode Locale of profile to retrieve, default is en-us. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProfileResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName, final String localeCode) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), localeCode, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the KPIs that enrich the profile Type identified by the supplied name. Enrichment happens through participants of the Interaction on an Interaction KPI and through Relationships for Profile KPIs. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<KpiDefinitionInner> object if successful. - */ - public List getEnrichingKpis(String resourceGroupName, String hubName, String profileName) { - return getEnrichingKpisWithServiceResponseAsync(resourceGroupName, hubName, profileName).toBlocking().single().body(); - } - - /** - * Gets the KPIs that enrich the profile Type identified by the supplied name. Enrichment happens through participants of the Interaction on an Interaction KPI and through Relationships for Profile KPIs. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> getEnrichingKpisAsync(String resourceGroupName, String hubName, String profileName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(getEnrichingKpisWithServiceResponseAsync(resourceGroupName, hubName, profileName), serviceCallback); - } - - /** - * Gets the KPIs that enrich the profile Type identified by the supplied name. Enrichment happens through participants of the Interaction on an Interaction KPI and through Relationships for Profile KPIs. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<KpiDefinitionInner> object - */ - public Observable> getEnrichingKpisAsync(String resourceGroupName, String hubName, String profileName) { - return getEnrichingKpisWithServiceResponseAsync(resourceGroupName, hubName, profileName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the KPIs that enrich the profile Type identified by the supplied name. Enrichment happens through participants of the Interaction on an Interaction KPI and through Relationships for Profile KPIs. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param profileName The name of the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<KpiDefinitionInner> object - */ - public Observable>> getEnrichingKpisWithServiceResponseAsync(String resourceGroupName, String hubName, String profileName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (profileName == null) { - throw new IllegalArgumentException("Parameter profileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEnrichingKpis(resourceGroupName, hubName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> clientResponse = getEnrichingKpisDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getEnrichingKpisDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all profile in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ProfileResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all profile in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all profile in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProfileResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all profile in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ProfileResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all profile in the hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ProfileResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipLinkResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipLinkResourceFormatInner.java deleted file mode 100644 index 05166eddc6a..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipLinkResourceFormatInner.java +++ /dev/null @@ -1,268 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.customerinsights.RelationshipLinkFieldMapping; -import com.microsoft.azure.management.customerinsights.ParticipantProfilePropertyReference; -import com.microsoft.azure.management.customerinsights.ProvisioningStates; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The relationship link resource format. - */ -@JsonFlatten -public class RelationshipLinkResourceFormatInner extends ProxyResource { - /** - * Localized display name for the Relationship Link. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * Localized descriptions for the Relationship Link. - */ - @JsonProperty(value = "properties.description") - private Map description; - - /** - * The InteractionType associated with the Relationship Link. - */ - @JsonProperty(value = "properties.interactionType", required = true) - private String interactionType; - - /** - * The name of the Relationship Link. - */ - @JsonProperty(value = "properties.linkName", access = JsonProperty.Access.WRITE_ONLY) - private String linkName; - - /** - * The mappings between Interaction and Relationship fields. - */ - @JsonProperty(value = "properties.mappings") - private List mappings; - - /** - * The property references for the Profile of the Relationship. - */ - @JsonProperty(value = "properties.profilePropertyReferences", required = true) - private List profilePropertyReferences; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * The property references for the Related Profile of the Relationship. - */ - @JsonProperty(value = "properties.relatedProfilePropertyReferences", required = true) - private List relatedProfilePropertyReferences; - - /** - * The Relationship associated with the Link. - */ - @JsonProperty(value = "properties.relationshipName", required = true) - private String relationshipName; - - /** - * The relationship guid id. - */ - @JsonProperty(value = "properties.relationshipGuidId", access = JsonProperty.Access.WRITE_ONLY) - private String relationshipGuidId; - - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the RelationshipLinkResourceFormatInner object itself. - */ - public RelationshipLinkResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the RelationshipLinkResourceFormatInner object itself. - */ - public RelationshipLinkResourceFormatInner withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the interactionType value. - * - * @return the interactionType value - */ - public String interactionType() { - return this.interactionType; - } - - /** - * Set the interactionType value. - * - * @param interactionType the interactionType value to set - * @return the RelationshipLinkResourceFormatInner object itself. - */ - public RelationshipLinkResourceFormatInner withInteractionType(String interactionType) { - this.interactionType = interactionType; - return this; - } - - /** - * Get the linkName value. - * - * @return the linkName value - */ - public String linkName() { - return this.linkName; - } - - /** - * Get the mappings value. - * - * @return the mappings value - */ - public List mappings() { - return this.mappings; - } - - /** - * Set the mappings value. - * - * @param mappings the mappings value to set - * @return the RelationshipLinkResourceFormatInner object itself. - */ - public RelationshipLinkResourceFormatInner withMappings(List mappings) { - this.mappings = mappings; - return this; - } - - /** - * Get the profilePropertyReferences value. - * - * @return the profilePropertyReferences value - */ - public List profilePropertyReferences() { - return this.profilePropertyReferences; - } - - /** - * Set the profilePropertyReferences value. - * - * @param profilePropertyReferences the profilePropertyReferences value to set - * @return the RelationshipLinkResourceFormatInner object itself. - */ - public RelationshipLinkResourceFormatInner withProfilePropertyReferences(List profilePropertyReferences) { - this.profilePropertyReferences = profilePropertyReferences; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the relatedProfilePropertyReferences value. - * - * @return the relatedProfilePropertyReferences value - */ - public List relatedProfilePropertyReferences() { - return this.relatedProfilePropertyReferences; - } - - /** - * Set the relatedProfilePropertyReferences value. - * - * @param relatedProfilePropertyReferences the relatedProfilePropertyReferences value to set - * @return the RelationshipLinkResourceFormatInner object itself. - */ - public RelationshipLinkResourceFormatInner withRelatedProfilePropertyReferences(List relatedProfilePropertyReferences) { - this.relatedProfilePropertyReferences = relatedProfilePropertyReferences; - return this; - } - - /** - * Get the relationshipName value. - * - * @return the relationshipName value - */ - public String relationshipName() { - return this.relationshipName; - } - - /** - * Set the relationshipName value. - * - * @param relationshipName the relationshipName value to set - * @return the RelationshipLinkResourceFormatInner object itself. - */ - public RelationshipLinkResourceFormatInner withRelationshipName(String relationshipName) { - this.relationshipName = relationshipName; - return this; - } - - /** - * Get the relationshipGuidId value. - * - * @return the relationshipGuidId value - */ - public String relationshipGuidId() { - return this.relationshipGuidId; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipLinksInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipLinksInner.java deleted file mode 100644 index d022bd2f3e0..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipLinksInner.java +++ /dev/null @@ -1,775 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in RelationshipLinks. - */ -public class RelationshipLinksInner { - /** The Retrofit service to perform REST calls. */ - private RelationshipLinksService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of RelationshipLinksInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public RelationshipLinksInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(RelationshipLinksService.class); - this.client = client; - } - - /** - * The interface defining all the services for RelationshipLinks to be - * used by Retrofit to perform actually REST calls. - */ - interface RelationshipLinksService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RelationshipLinks createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipLinkName") String relationshipLinkName, @Path("subscriptionId") String subscriptionId, @Body RelationshipLinkResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RelationshipLinks beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipLinkName") String relationshipLinkName, @Path("subscriptionId") String subscriptionId, @Body RelationshipLinkResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RelationshipLinks get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipLinkName") String relationshipLinkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RelationshipLinks delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipLinkName") String relationshipLinkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RelationshipLinks beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipLinkName") String relationshipLinkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RelationshipLinks listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationshipLinks") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RelationshipLinks listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a relationship link or updates an existing relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param parameters Parameters supplied to the CreateOrUpdate relationship link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelationshipLinkResourceFormatInner object if successful. - */ - public RelationshipLinkResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String relationshipLinkName, RelationshipLinkResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName, parameters).toBlocking().last().body(); - } - - /** - * Creates a relationship link or updates an existing relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param parameters Parameters supplied to the CreateOrUpdate relationship link operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String relationshipLinkName, RelationshipLinkResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName, parameters), serviceCallback); - } - - /** - * Creates a relationship link or updates an existing relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param parameters Parameters supplied to the CreateOrUpdate relationship link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String relationshipLinkName, RelationshipLinkResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName, parameters).map(new Func1, RelationshipLinkResourceFormatInner>() { - @Override - public RelationshipLinkResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a relationship link or updates an existing relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param parameters Parameters supplied to the CreateOrUpdate relationship link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipLinkName, RelationshipLinkResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipLinkName == null) { - throw new IllegalArgumentException("Parameter relationshipLinkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, hubName, relationshipLinkName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates a relationship link or updates an existing relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param parameters Parameters supplied to the CreateOrUpdate relationship link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelationshipLinkResourceFormatInner object if successful. - */ - public RelationshipLinkResourceFormatInner beginCreateOrUpdate(String resourceGroupName, String hubName, String relationshipLinkName, RelationshipLinkResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName, parameters).toBlocking().single().body(); - } - - /** - * Creates a relationship link or updates an existing relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param parameters Parameters supplied to the CreateOrUpdate relationship link operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String relationshipLinkName, RelationshipLinkResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName, parameters), serviceCallback); - } - - /** - * Creates a relationship link or updates an existing relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param parameters Parameters supplied to the CreateOrUpdate relationship link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelationshipLinkResourceFormatInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String relationshipLinkName, RelationshipLinkResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName, parameters).map(new Func1, RelationshipLinkResourceFormatInner>() { - @Override - public RelationshipLinkResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a relationship link or updates an existing relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param parameters Parameters supplied to the CreateOrUpdate relationship link operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelationshipLinkResourceFormatInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipLinkName, RelationshipLinkResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipLinkName == null) { - throw new IllegalArgumentException("Parameter relationshipLinkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, hubName, relationshipLinkName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets information about the specified relationship Link. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelationshipLinkResourceFormatInner object if successful. - */ - public RelationshipLinkResourceFormatInner get(String resourceGroupName, String hubName, String relationshipLinkName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName).toBlocking().single().body(); - } - - /** - * Gets information about the specified relationship Link. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String relationshipLinkName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName), serviceCallback); - } - - /** - * Gets information about the specified relationship Link. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelationshipLinkResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String relationshipLinkName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName).map(new Func1, RelationshipLinkResourceFormatInner>() { - @Override - public RelationshipLinkResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified relationship Link. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship link. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelationshipLinkResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipLinkName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipLinkName == null) { - throw new IllegalArgumentException("Parameter relationshipLinkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, relationshipLinkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String relationshipLinkName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName).toBlocking().last().body(); - } - - /** - * Deletes a relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String relationshipLinkName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName), serviceCallback); - } - - /** - * Deletes a relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String relationshipLinkName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipLinkName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipLinkName == null) { - throw new IllegalArgumentException("Parameter relationshipLinkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, hubName, relationshipLinkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes a relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String hubName, String relationshipLinkName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName).toBlocking().single().body(); - } - - /** - * Deletes a relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String hubName, String relationshipLinkName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName), serviceCallback); - } - - /** - * Deletes a relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String hubName, String relationshipLinkName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipLinkName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a relationship link within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipLinkName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipLinkName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipLinkName == null) { - throw new IllegalArgumentException("Parameter relationshipLinkName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, hubName, relationshipLinkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all relationship links in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RelationshipLinkResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all relationship links in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all relationship links in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelationshipLinkResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all relationship links in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelationshipLinkResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all relationship links in the hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RelationshipLinkResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all relationship links in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RelationshipLinkResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all relationship links in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all relationship links in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelationshipLinkResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all relationship links in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelationshipLinkResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all relationship links in the hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RelationshipLinkResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipResourceFormatInner.java deleted file mode 100644 index ca63db41a2a..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipResourceFormatInner.java +++ /dev/null @@ -1,298 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.microsoft.azure.management.customerinsights.CardinalityTypes; -import java.util.Map; -import org.joda.time.DateTime; -import java.util.List; -import com.microsoft.azure.management.customerinsights.PropertyDefinition; -import com.microsoft.azure.management.customerinsights.RelationshipTypeMapping; -import com.microsoft.azure.management.customerinsights.ProvisioningStates; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The relationship resource format. - */ -@JsonFlatten -public class RelationshipResourceFormatInner extends ProxyResource { - /** - * The Relationship Cardinality. Possible values include: 'OneToOne', - * 'OneToMany', 'ManyToMany'. - */ - @JsonProperty(value = "properties.cardinality") - private CardinalityTypes cardinality; - - /** - * Localized display name for the Relationship. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * Localized descriptions for the Relationship. - */ - @JsonProperty(value = "properties.description") - private Map description; - - /** - * The expiry date time in UTC. - */ - @JsonProperty(value = "properties.expiryDateTimeUtc") - private DateTime expiryDateTimeUtc; - - /** - * The properties of the Relationship. - */ - @JsonProperty(value = "properties.fields") - private List fields; - - /** - * Optional property to be used to map fields in profile to their strong - * ids in related profile. - */ - @JsonProperty(value = "properties.lookupMappings") - private List lookupMappings; - - /** - * Profile type. - */ - @JsonProperty(value = "properties.profileType", required = true) - private String profileType; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * The Relationship name. - */ - @JsonProperty(value = "properties.relationshipName", access = JsonProperty.Access.WRITE_ONLY) - private String relationshipName; - - /** - * Related profile being referenced. - */ - @JsonProperty(value = "properties.relatedProfileType", required = true) - private String relatedProfileType; - - /** - * The relationship guid id. - */ - @JsonProperty(value = "properties.relationshipGuidId", access = JsonProperty.Access.WRITE_ONLY) - private String relationshipGuidId; - - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * Get the cardinality value. - * - * @return the cardinality value - */ - public CardinalityTypes cardinality() { - return this.cardinality; - } - - /** - * Set the cardinality value. - * - * @param cardinality the cardinality value to set - * @return the RelationshipResourceFormatInner object itself. - */ - public RelationshipResourceFormatInner withCardinality(CardinalityTypes cardinality) { - this.cardinality = cardinality; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the RelationshipResourceFormatInner object itself. - */ - public RelationshipResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the RelationshipResourceFormatInner object itself. - */ - public RelationshipResourceFormatInner withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the expiryDateTimeUtc value. - * - * @return the expiryDateTimeUtc value - */ - public DateTime expiryDateTimeUtc() { - return this.expiryDateTimeUtc; - } - - /** - * Set the expiryDateTimeUtc value. - * - * @param expiryDateTimeUtc the expiryDateTimeUtc value to set - * @return the RelationshipResourceFormatInner object itself. - */ - public RelationshipResourceFormatInner withExpiryDateTimeUtc(DateTime expiryDateTimeUtc) { - this.expiryDateTimeUtc = expiryDateTimeUtc; - return this; - } - - /** - * Get the fields value. - * - * @return the fields value - */ - public List fields() { - return this.fields; - } - - /** - * Set the fields value. - * - * @param fields the fields value to set - * @return the RelationshipResourceFormatInner object itself. - */ - public RelationshipResourceFormatInner withFields(List fields) { - this.fields = fields; - return this; - } - - /** - * Get the lookupMappings value. - * - * @return the lookupMappings value - */ - public List lookupMappings() { - return this.lookupMappings; - } - - /** - * Set the lookupMappings value. - * - * @param lookupMappings the lookupMappings value to set - * @return the RelationshipResourceFormatInner object itself. - */ - public RelationshipResourceFormatInner withLookupMappings(List lookupMappings) { - this.lookupMappings = lookupMappings; - return this; - } - - /** - * Get the profileType value. - * - * @return the profileType value - */ - public String profileType() { - return this.profileType; - } - - /** - * Set the profileType value. - * - * @param profileType the profileType value to set - * @return the RelationshipResourceFormatInner object itself. - */ - public RelationshipResourceFormatInner withProfileType(String profileType) { - this.profileType = profileType; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the relationshipName value. - * - * @return the relationshipName value - */ - public String relationshipName() { - return this.relationshipName; - } - - /** - * Get the relatedProfileType value. - * - * @return the relatedProfileType value - */ - public String relatedProfileType() { - return this.relatedProfileType; - } - - /** - * Set the relatedProfileType value. - * - * @param relatedProfileType the relatedProfileType value to set - * @return the RelationshipResourceFormatInner object itself. - */ - public RelationshipResourceFormatInner withRelatedProfileType(String relatedProfileType) { - this.relatedProfileType = relatedProfileType; - return this; - } - - /** - * Get the relationshipGuidId value. - * - * @return the relationshipGuidId value - */ - public String relationshipGuidId() { - return this.relationshipGuidId; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipsInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipsInner.java deleted file mode 100644 index 5ccb3a58505..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RelationshipsInner.java +++ /dev/null @@ -1,775 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Relationships. - */ -public class RelationshipsInner { - /** The Retrofit service to perform REST calls. */ - private RelationshipsService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of RelationshipsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public RelationshipsInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(RelationshipsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Relationships to be - * used by Retrofit to perform actually REST calls. - */ - interface RelationshipsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Relationships createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipName") String relationshipName, @Path("subscriptionId") String subscriptionId, @Body RelationshipResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Relationships beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipName") String relationshipName, @Path("subscriptionId") String subscriptionId, @Body RelationshipResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Relationships get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipName") String relationshipName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Relationships delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipName") String relationshipName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Relationships beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("relationshipName") String relationshipName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Relationships listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Relationships listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a relationship or updates an existing relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the Relationship. - * @param parameters Parameters supplied to the CreateOrUpdate Relationship operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelationshipResourceFormatInner object if successful. - */ - public RelationshipResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String relationshipName, RelationshipResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipName, parameters).toBlocking().last().body(); - } - - /** - * Creates a relationship or updates an existing relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the Relationship. - * @param parameters Parameters supplied to the CreateOrUpdate Relationship operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String relationshipName, RelationshipResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipName, parameters), serviceCallback); - } - - /** - * Creates a relationship or updates an existing relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the Relationship. - * @param parameters Parameters supplied to the CreateOrUpdate Relationship operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String relationshipName, RelationshipResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipName, parameters).map(new Func1, RelationshipResourceFormatInner>() { - @Override - public RelationshipResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a relationship or updates an existing relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the Relationship. - * @param parameters Parameters supplied to the CreateOrUpdate Relationship operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipName, RelationshipResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipName == null) { - throw new IllegalArgumentException("Parameter relationshipName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, hubName, relationshipName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates a relationship or updates an existing relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the Relationship. - * @param parameters Parameters supplied to the CreateOrUpdate Relationship operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelationshipResourceFormatInner object if successful. - */ - public RelationshipResourceFormatInner beginCreateOrUpdate(String resourceGroupName, String hubName, String relationshipName, RelationshipResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipName, parameters).toBlocking().single().body(); - } - - /** - * Creates a relationship or updates an existing relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the Relationship. - * @param parameters Parameters supplied to the CreateOrUpdate Relationship operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String relationshipName, RelationshipResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipName, parameters), serviceCallback); - } - - /** - * Creates a relationship or updates an existing relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the Relationship. - * @param parameters Parameters supplied to the CreateOrUpdate Relationship operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelationshipResourceFormatInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String relationshipName, RelationshipResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, relationshipName, parameters).map(new Func1, RelationshipResourceFormatInner>() { - @Override - public RelationshipResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a relationship or updates an existing relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the Relationship. - * @param parameters Parameters supplied to the CreateOrUpdate Relationship operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelationshipResourceFormatInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipName, RelationshipResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipName == null) { - throw new IllegalArgumentException("Parameter relationshipName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, hubName, relationshipName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets information about the specified relationship. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelationshipResourceFormatInner object if successful. - */ - public RelationshipResourceFormatInner get(String resourceGroupName, String hubName, String relationshipName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, relationshipName).toBlocking().single().body(); - } - - /** - * Gets information about the specified relationship. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String relationshipName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, relationshipName), serviceCallback); - } - - /** - * Gets information about the specified relationship. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelationshipResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String relationshipName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, relationshipName).map(new Func1, RelationshipResourceFormatInner>() { - @Override - public RelationshipResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified relationship. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelationshipResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipName == null) { - throw new IllegalArgumentException("Parameter relationshipName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, relationshipName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String relationshipName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipName).toBlocking().last().body(); - } - - /** - * Deletes a relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String relationshipName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipName), serviceCallback); - } - - /** - * Deletes a relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String relationshipName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipName == null) { - throw new IllegalArgumentException("Parameter relationshipName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, hubName, relationshipName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes a relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String hubName, String relationshipName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipName).toBlocking().single().body(); - } - - /** - * Deletes a relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String hubName, String relationshipName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipName), serviceCallback); - } - - /** - * Deletes a relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String hubName, String relationshipName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, hubName, relationshipName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a relationship within a hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param relationshipName The name of the relationship. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String hubName, String relationshipName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (relationshipName == null) { - throw new IllegalArgumentException("Parameter relationshipName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, hubName, relationshipName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all relationships in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RelationshipResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all relationships in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all relationships in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelationshipResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all relationships in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelationshipResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all relationships in the hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RelationshipResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all relationships in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RelationshipResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all relationships in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all relationships in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelationshipResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all relationships in the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelationshipResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all relationships in the hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RelationshipResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentResourceFormatInner.java deleted file mode 100644 index d4bf72ea2b9..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentResourceFormatInner.java +++ /dev/null @@ -1,515 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.Map; -import com.microsoft.azure.management.customerinsights.ProvisioningStates; -import com.microsoft.azure.management.customerinsights.RoleTypes; -import java.util.List; -import com.microsoft.azure.management.customerinsights.AssignmentPrincipal; -import com.microsoft.azure.management.customerinsights.ResourceSetDescription; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The Role Assignment resource format. - */ -@JsonFlatten -public class RoleAssignmentResourceFormatInner extends ProxyResource { - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * The name of the metadata object. - */ - @JsonProperty(value = "properties.assignmentName", access = JsonProperty.Access.WRITE_ONLY) - private String assignmentName; - - /** - * Localized display names for the metadata. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * Localized description for the metadata. - */ - @JsonProperty(value = "properties.description") - private Map description; - - /** - * Provisioning state. Possible values include: 'Provisioning', - * 'Succeeded', 'Expiring', 'Deleting', 'HumanIntervention', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStates provisioningState; - - /** - * Type of roles. Possible values include: 'Admin', 'Reader', - * 'ManageAdmin', 'ManageReader', 'DataAdmin', 'DataReader'. - */ - @JsonProperty(value = "properties.role", required = true) - private RoleTypes role; - - /** - * The principals being assigned to. - */ - @JsonProperty(value = "properties.principals", required = true) - private List principals; - - /** - * Profiles set for the assignment. - */ - @JsonProperty(value = "properties.profiles") - private ResourceSetDescription profiles; - - /** - * Interactions set for the assignment. - */ - @JsonProperty(value = "properties.interactions") - private ResourceSetDescription interactions; - - /** - * Links set for the assignment. - */ - @JsonProperty(value = "properties.links") - private ResourceSetDescription links; - - /** - * Kpis set for the assignment. - */ - @JsonProperty(value = "properties.kpis") - private ResourceSetDescription kpis; - - /** - * Sas Policies set for the assignment. - */ - @JsonProperty(value = "properties.sasPolicies") - private ResourceSetDescription sasPolicies; - - /** - * Connectors set for the assignment. - */ - @JsonProperty(value = "properties.connectors") - private ResourceSetDescription connectors; - - /** - * Views set for the assignment. - */ - @JsonProperty(value = "properties.views") - private ResourceSetDescription views; - - /** - * The Role assignments set for the relationship links. - */ - @JsonProperty(value = "properties.relationshipLinks") - private ResourceSetDescription relationshipLinks; - - /** - * The Role assignments set for the relationships. - */ - @JsonProperty(value = "properties.relationships") - private ResourceSetDescription relationships; - - /** - * Widget types set for the assignment. - */ - @JsonProperty(value = "properties.widgetTypes") - private ResourceSetDescription widgetTypes; - - /** - * The Role assignments set for the assignment. - */ - @JsonProperty(value = "properties.roleAssignments") - private ResourceSetDescription roleAssignments; - - /** - * Widget types set for the assignment. - */ - @JsonProperty(value = "properties.conflationPolicies") - private ResourceSetDescription conflationPolicies; - - /** - * The Role assignments set for the assignment. - */ - @JsonProperty(value = "properties.segments") - private ResourceSetDescription segments; - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the assignmentName value. - * - * @return the assignmentName value - */ - public String assignmentName() { - return this.assignmentName; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public Map description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withDescription(Map description) { - this.description = description; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStates provisioningState() { - return this.provisioningState; - } - - /** - * Get the role value. - * - * @return the role value - */ - public RoleTypes role() { - return this.role; - } - - /** - * Set the role value. - * - * @param role the role value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withRole(RoleTypes role) { - this.role = role; - return this; - } - - /** - * Get the principals value. - * - * @return the principals value - */ - public List principals() { - return this.principals; - } - - /** - * Set the principals value. - * - * @param principals the principals value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withPrincipals(List principals) { - this.principals = principals; - return this; - } - - /** - * Get the profiles value. - * - * @return the profiles value - */ - public ResourceSetDescription profiles() { - return this.profiles; - } - - /** - * Set the profiles value. - * - * @param profiles the profiles value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withProfiles(ResourceSetDescription profiles) { - this.profiles = profiles; - return this; - } - - /** - * Get the interactions value. - * - * @return the interactions value - */ - public ResourceSetDescription interactions() { - return this.interactions; - } - - /** - * Set the interactions value. - * - * @param interactions the interactions value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withInteractions(ResourceSetDescription interactions) { - this.interactions = interactions; - return this; - } - - /** - * Get the links value. - * - * @return the links value - */ - public ResourceSetDescription links() { - return this.links; - } - - /** - * Set the links value. - * - * @param links the links value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withLinks(ResourceSetDescription links) { - this.links = links; - return this; - } - - /** - * Get the kpis value. - * - * @return the kpis value - */ - public ResourceSetDescription kpis() { - return this.kpis; - } - - /** - * Set the kpis value. - * - * @param kpis the kpis value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withKpis(ResourceSetDescription kpis) { - this.kpis = kpis; - return this; - } - - /** - * Get the sasPolicies value. - * - * @return the sasPolicies value - */ - public ResourceSetDescription sasPolicies() { - return this.sasPolicies; - } - - /** - * Set the sasPolicies value. - * - * @param sasPolicies the sasPolicies value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withSasPolicies(ResourceSetDescription sasPolicies) { - this.sasPolicies = sasPolicies; - return this; - } - - /** - * Get the connectors value. - * - * @return the connectors value - */ - public ResourceSetDescription connectors() { - return this.connectors; - } - - /** - * Set the connectors value. - * - * @param connectors the connectors value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withConnectors(ResourceSetDescription connectors) { - this.connectors = connectors; - return this; - } - - /** - * Get the views value. - * - * @return the views value - */ - public ResourceSetDescription views() { - return this.views; - } - - /** - * Set the views value. - * - * @param views the views value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withViews(ResourceSetDescription views) { - this.views = views; - return this; - } - - /** - * Get the relationshipLinks value. - * - * @return the relationshipLinks value - */ - public ResourceSetDescription relationshipLinks() { - return this.relationshipLinks; - } - - /** - * Set the relationshipLinks value. - * - * @param relationshipLinks the relationshipLinks value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withRelationshipLinks(ResourceSetDescription relationshipLinks) { - this.relationshipLinks = relationshipLinks; - return this; - } - - /** - * Get the relationships value. - * - * @return the relationships value - */ - public ResourceSetDescription relationships() { - return this.relationships; - } - - /** - * Set the relationships value. - * - * @param relationships the relationships value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withRelationships(ResourceSetDescription relationships) { - this.relationships = relationships; - return this; - } - - /** - * Get the widgetTypes value. - * - * @return the widgetTypes value - */ - public ResourceSetDescription widgetTypes() { - return this.widgetTypes; - } - - /** - * Set the widgetTypes value. - * - * @param widgetTypes the widgetTypes value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withWidgetTypes(ResourceSetDescription widgetTypes) { - this.widgetTypes = widgetTypes; - return this; - } - - /** - * Get the roleAssignments value. - * - * @return the roleAssignments value - */ - public ResourceSetDescription roleAssignments() { - return this.roleAssignments; - } - - /** - * Set the roleAssignments value. - * - * @param roleAssignments the roleAssignments value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withRoleAssignments(ResourceSetDescription roleAssignments) { - this.roleAssignments = roleAssignments; - return this; - } - - /** - * Get the conflationPolicies value. - * - * @return the conflationPolicies value - */ - public ResourceSetDescription conflationPolicies() { - return this.conflationPolicies; - } - - /** - * Set the conflationPolicies value. - * - * @param conflationPolicies the conflationPolicies value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withConflationPolicies(ResourceSetDescription conflationPolicies) { - this.conflationPolicies = conflationPolicies; - return this; - } - - /** - * Get the segments value. - * - * @return the segments value - */ - public ResourceSetDescription segments() { - return this.segments; - } - - /** - * Set the segments value. - * - * @param segments the segments value to set - * @return the RoleAssignmentResourceFormatInner object itself. - */ - public RoleAssignmentResourceFormatInner withSegments(ResourceSetDescription segments) { - this.segments = segments; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentsInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentsInner.java deleted file mode 100644 index 1d4143334f1..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentsInner.java +++ /dev/null @@ -1,697 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in RoleAssignments. - */ -public class RoleAssignmentsInner { - /** The Retrofit service to perform REST calls. */ - private RoleAssignmentsService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of RoleAssignmentsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public RoleAssignmentsInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(RoleAssignmentsService.class); - this.client = client; - } - - /** - * The interface defining all the services for RoleAssignments to be - * used by Retrofit to perform actually REST calls. - */ - interface RoleAssignmentsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RoleAssignments listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roleAssignments") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RoleAssignments createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roleAssignments/{assignmentName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("assignmentName") String assignmentName, @Path("subscriptionId") String subscriptionId, @Body RoleAssignmentResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RoleAssignments beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roleAssignments/{assignmentName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("assignmentName") String assignmentName, @Path("subscriptionId") String subscriptionId, @Body RoleAssignmentResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RoleAssignments get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roleAssignments/{assignmentName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("assignmentName") String assignmentName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RoleAssignments delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roleAssignments/{assignmentName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("assignmentName") String assignmentName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.RoleAssignments listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets all the role assignments for the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RoleAssignmentResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the role assignments for the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the role assignments for the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RoleAssignmentResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the role assignments for the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RoleAssignmentResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the role assignments for the specified hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RoleAssignmentResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates a role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The assignment name - * @param parameters Parameters supplied to the CreateOrUpdate RoleAssignment operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RoleAssignmentResourceFormatInner object if successful. - */ - public RoleAssignmentResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String assignmentName, RoleAssignmentResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, assignmentName, parameters).toBlocking().last().body(); - } - - /** - * Creates or updates a role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The assignment name - * @param parameters Parameters supplied to the CreateOrUpdate RoleAssignment operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String assignmentName, RoleAssignmentResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, assignmentName, parameters), serviceCallback); - } - - /** - * Creates or updates a role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The assignment name - * @param parameters Parameters supplied to the CreateOrUpdate RoleAssignment operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String assignmentName, RoleAssignmentResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, assignmentName, parameters).map(new Func1, RoleAssignmentResourceFormatInner>() { - @Override - public RoleAssignmentResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The assignment name - * @param parameters Parameters supplied to the CreateOrUpdate RoleAssignment operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String assignmentName, RoleAssignmentResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (assignmentName == null) { - throw new IllegalArgumentException("Parameter assignmentName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, hubName, assignmentName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates or updates a role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The assignment name - * @param parameters Parameters supplied to the CreateOrUpdate RoleAssignment operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RoleAssignmentResourceFormatInner object if successful. - */ - public RoleAssignmentResourceFormatInner beginCreateOrUpdate(String resourceGroupName, String hubName, String assignmentName, RoleAssignmentResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, assignmentName, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates a role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The assignment name - * @param parameters Parameters supplied to the CreateOrUpdate RoleAssignment operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String assignmentName, RoleAssignmentResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, assignmentName, parameters), serviceCallback); - } - - /** - * Creates or updates a role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The assignment name - * @param parameters Parameters supplied to the CreateOrUpdate RoleAssignment operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RoleAssignmentResourceFormatInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String hubName, String assignmentName, RoleAssignmentResourceFormatInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, assignmentName, parameters).map(new Func1, RoleAssignmentResourceFormatInner>() { - @Override - public RoleAssignmentResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The assignment name - * @param parameters Parameters supplied to the CreateOrUpdate RoleAssignment operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RoleAssignmentResourceFormatInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String assignmentName, RoleAssignmentResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (assignmentName == null) { - throw new IllegalArgumentException("Parameter assignmentName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, hubName, assignmentName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The name of the role assignment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RoleAssignmentResourceFormatInner object if successful. - */ - public RoleAssignmentResourceFormatInner get(String resourceGroupName, String hubName, String assignmentName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, assignmentName).toBlocking().single().body(); - } - - /** - * Gets the role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The name of the role assignment. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String assignmentName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, assignmentName), serviceCallback); - } - - /** - * Gets the role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The name of the role assignment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RoleAssignmentResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String assignmentName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, assignmentName).map(new Func1, RoleAssignmentResourceFormatInner>() { - @Override - public RoleAssignmentResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The name of the role assignment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RoleAssignmentResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String assignmentName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (assignmentName == null) { - throw new IllegalArgumentException("Parameter assignmentName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, assignmentName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes the role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The name of the role assignment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String assignmentName) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, assignmentName).toBlocking().single().body(); - } - - /** - * Deletes the role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The name of the role assignment. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String assignmentName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, assignmentName), serviceCallback); - } - - /** - * Deletes the role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The name of the role assignment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String assignmentName) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, assignmentName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the role assignment in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param assignmentName The name of the role assignment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String assignmentName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (assignmentName == null) { - throw new IllegalArgumentException("Parameter assignmentName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, hubName, assignmentName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the role assignments for the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RoleAssignmentResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the role assignments for the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the role assignments for the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RoleAssignmentResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the role assignments for the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RoleAssignmentResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the role assignments for the specified hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RoleAssignmentResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleResourceFormatInner.java deleted file mode 100644 index c47cf36fb49..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleResourceFormatInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The role resource format. - */ -@JsonFlatten -public class RoleResourceFormatInner extends ProxyResource { - /** - * The role name. - */ - @JsonProperty(value = "properties.roleName") - private String roleName; - - /** - * The description of the role. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Get the roleName value. - * - * @return the roleName value - */ - public String roleName() { - return this.roleName; - } - - /** - * Set the roleName value. - * - * @param roleName the roleName value to set - * @return the RoleResourceFormatInner object itself. - */ - public RoleResourceFormatInner withRoleName(String roleName) { - this.roleName = roleName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the RoleResourceFormatInner object itself. - */ - public RoleResourceFormatInner withDescription(String description) { - this.description = description; - return this; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RolesInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RolesInner.java deleted file mode 100644 index 2db12e3623e..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RolesInner.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Roles. - */ -public class RolesInner { - /** The Retrofit service to perform REST calls. */ - private RolesService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of RolesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public RolesInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(RolesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Roles to be - * used by Retrofit to perform actually REST calls. - */ - interface RolesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Roles listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roles") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Roles listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets all the roles for the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RoleResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the roles for the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the roles for the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RoleResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the roles for the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RoleResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the roles for the hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RoleResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the roles for the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RoleResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the roles for the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the roles for the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RoleResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the roles for the hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RoleResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the roles for the hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RoleResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/SuggestRelationshipLinksResponseInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/SuggestRelationshipLinksResponseInner.java deleted file mode 100644 index 089230a34ed..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/SuggestRelationshipLinksResponseInner.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.List; -import com.microsoft.azure.management.customerinsights.RelationshipsLookup; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The response of suggest relationship links operation. - */ -public class SuggestRelationshipLinksResponseInner { - /** - * The interaction name. - */ - @JsonProperty(value = "interactionName", access = JsonProperty.Access.WRITE_ONLY) - private String interactionName; - - /** - * Suggested relationships for the type. - */ - @JsonProperty(value = "suggestedRelationships", access = JsonProperty.Access.WRITE_ONLY) - private List suggestedRelationships; - - /** - * Get the interactionName value. - * - * @return the interactionName value - */ - public String interactionName() { - return this.interactionName; - } - - /** - * Get the suggestedRelationships value. - * - * @return the suggestedRelationships value - */ - public List suggestedRelationships() { - return this.suggestedRelationships; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ViewResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ViewResourceFormatInner.java deleted file mode 100644 index ccc077166a6..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ViewResourceFormatInner.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.Map; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The view resource format. - */ -@JsonFlatten -public class ViewResourceFormatInner extends ProxyResource { - /** - * Name of the view. - */ - @JsonProperty(value = "properties.viewName", access = JsonProperty.Access.WRITE_ONLY) - private String viewName; - - /** - * the user ID. - */ - @JsonProperty(value = "properties.userId") - private String userId; - - /** - * the hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * Localized display name for the view. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * View definition. - */ - @JsonProperty(value = "properties.definition", required = true) - private String definition; - - /** - * Date time when view was last modified. - */ - @JsonProperty(value = "properties.changed", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changed; - - /** - * Date time when view was created. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private DateTime created; - - /** - * Get the viewName value. - * - * @return the viewName value - */ - public String viewName() { - return this.viewName; - } - - /** - * Get the userId value. - * - * @return the userId value - */ - public String userId() { - return this.userId; - } - - /** - * Set the userId value. - * - * @param userId the userId value to set - * @return the ViewResourceFormatInner object itself. - */ - public ViewResourceFormatInner withUserId(String userId) { - this.userId = userId; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ViewResourceFormatInner object itself. - */ - public ViewResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the definition value. - * - * @return the definition value - */ - public String definition() { - return this.definition; - } - - /** - * Set the definition value. - * - * @param definition the definition value to set - * @return the ViewResourceFormatInner object itself. - */ - public ViewResourceFormatInner withDefinition(String definition) { - this.definition = definition; - return this; - } - - /** - * Get the changed value. - * - * @return the changed value - */ - public DateTime changed() { - return this.changed; - } - - /** - * Get the created value. - * - * @return the created value - */ - public DateTime created() { - return this.created; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ViewsInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ViewsInner.java deleted file mode 100644 index 7ea1e3f81ab..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/ViewsInner.java +++ /dev/null @@ -1,628 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Views. - */ -public class ViewsInner { - /** The Retrofit service to perform REST calls. */ - private ViewsService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of ViewsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ViewsInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(ViewsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Views to be - * used by Retrofit to perform actually REST calls. - */ - interface ViewsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Views listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("userId") String userId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Views createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("viewName") String viewName, @Path("subscriptionId") String subscriptionId, @Body ViewResourceFormatInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Views get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("viewName") String viewName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("userId") String userId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Views delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("viewName") String viewName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("userId") String userId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.Views listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets all available views for given user in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param userId The user ID. Use * to retreive hub level views. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ViewResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName, final String userId) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName, userId).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all available views for given user in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param userId The user ID. Use * to retreive hub level views. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final String userId, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName, userId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all available views for given user in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param userId The user ID. Use * to retreive hub level views. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ViewResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName, final String userId) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName, userId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all available views for given user in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param userId The user ID. Use * to retreive hub level views. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ViewResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName, final String userId) { - return listByHubSinglePageAsync(resourceGroupName, hubName, userId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all available views for given user in the specified hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - ServiceResponse> * @param userId The user ID. Use * to retreive hub level views. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ViewResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName, final String userId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (userId == null) { - throw new IllegalArgumentException("Parameter userId is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), userId, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates a view or updates an exisiting view in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param parameters Parameters supplied to the CreateOrUpdate View operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ViewResourceFormatInner object if successful. - */ - public ViewResourceFormatInner createOrUpdate(String resourceGroupName, String hubName, String viewName, ViewResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, viewName, parameters).toBlocking().single().body(); - } - - /** - * Creates a view or updates an exisiting view in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param parameters Parameters supplied to the CreateOrUpdate View operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String hubName, String viewName, ViewResourceFormatInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, viewName, parameters), serviceCallback); - } - - /** - * Creates a view or updates an exisiting view in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param parameters Parameters supplied to the CreateOrUpdate View operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ViewResourceFormatInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String hubName, String viewName, ViewResourceFormatInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, hubName, viewName, parameters).map(new Func1, ViewResourceFormatInner>() { - @Override - public ViewResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a view or updates an exisiting view in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param parameters Parameters supplied to the CreateOrUpdate View operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ViewResourceFormatInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String hubName, String viewName, ViewResourceFormatInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (viewName == null) { - throw new IllegalArgumentException("Parameter viewName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, hubName, viewName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a view in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param userId The user ID. Use * to retreive hub level view. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ViewResourceFormatInner object if successful. - */ - public ViewResourceFormatInner get(String resourceGroupName, String hubName, String viewName, String userId) { - return getWithServiceResponseAsync(resourceGroupName, hubName, viewName, userId).toBlocking().single().body(); - } - - /** - * Gets a view in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param userId The user ID. Use * to retreive hub level view. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String viewName, String userId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, viewName, userId), serviceCallback); - } - - /** - * Gets a view in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param userId The user ID. Use * to retreive hub level view. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ViewResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String viewName, String userId) { - return getWithServiceResponseAsync(resourceGroupName, hubName, viewName, userId).map(new Func1, ViewResourceFormatInner>() { - @Override - public ViewResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a view in the hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param userId The user ID. Use * to retreive hub level view. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ViewResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String viewName, String userId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (viewName == null) { - throw new IllegalArgumentException("Parameter viewName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (userId == null) { - throw new IllegalArgumentException("Parameter userId is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, viewName, this.client.subscriptionId(), this.client.apiVersion(), userId, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a view in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param userId The user ID. Use * to retreive hub level view. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String hubName, String viewName, String userId) { - deleteWithServiceResponseAsync(resourceGroupName, hubName, viewName, userId).toBlocking().single().body(); - } - - /** - * Deletes a view in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param userId The user ID. Use * to retreive hub level view. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String hubName, String viewName, String userId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, hubName, viewName, userId), serviceCallback); - } - - /** - * Deletes a view in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param userId The user ID. Use * to retreive hub level view. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String hubName, String viewName, String userId) { - return deleteWithServiceResponseAsync(resourceGroupName, hubName, viewName, userId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a view in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param viewName The name of the view. - * @param userId The user ID. Use * to retreive hub level view. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String hubName, String viewName, String userId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (viewName == null) { - throw new IllegalArgumentException("Parameter viewName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (userId == null) { - throw new IllegalArgumentException("Parameter userId is required and cannot be null."); - } - return service.delete(resourceGroupName, hubName, viewName, this.client.subscriptionId(), this.client.apiVersion(), userId, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all available views for given user in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ViewResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all available views for given user in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all available views for given user in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ViewResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all available views for given user in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ViewResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all available views for given user in the specified hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ViewResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/WidgetTypeResourceFormatInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/WidgetTypeResourceFormatInner.java deleted file mode 100644 index 659aed73429..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/WidgetTypeResourceFormatInner.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import java.util.Map; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.customerinsights.ProxyResource; - -/** - * The WidgetTypeResourceFormat. - */ -@JsonFlatten -public class WidgetTypeResourceFormatInner extends ProxyResource { - /** - * Name of the widget type. - */ - @JsonProperty(value = "properties.widgetTypeName", access = JsonProperty.Access.WRITE_ONLY) - private String widgetTypeName; - - /** - * Definition for widget type. - */ - @JsonProperty(value = "properties.definition", required = true) - private String definition; - - /** - * Description for widget type. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * Localized display name for the widget type. - */ - @JsonProperty(value = "properties.displayName") - private Map displayName; - - /** - * The image URL. - */ - @JsonProperty(value = "properties.imageUrl") - private String imageUrl; - - /** - * The hub name. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * The widget version. - */ - @JsonProperty(value = "properties.widgetVersion") - private String widgetVersion; - - /** - * Date time when widget type was last modified. - */ - @JsonProperty(value = "properties.changed", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changed; - - /** - * Date time when widget type was created. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private DateTime created; - - /** - * Get the widgetTypeName value. - * - * @return the widgetTypeName value - */ - public String widgetTypeName() { - return this.widgetTypeName; - } - - /** - * Get the definition value. - * - * @return the definition value - */ - public String definition() { - return this.definition; - } - - /** - * Set the definition value. - * - * @param definition the definition value to set - * @return the WidgetTypeResourceFormatInner object itself. - */ - public WidgetTypeResourceFormatInner withDefinition(String definition) { - this.definition = definition; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the WidgetTypeResourceFormatInner object itself. - */ - public WidgetTypeResourceFormatInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public Map displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the WidgetTypeResourceFormatInner object itself. - */ - public WidgetTypeResourceFormatInner withDisplayName(Map displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the imageUrl value. - * - * @return the imageUrl value - */ - public String imageUrl() { - return this.imageUrl; - } - - /** - * Set the imageUrl value. - * - * @param imageUrl the imageUrl value to set - * @return the WidgetTypeResourceFormatInner object itself. - */ - public WidgetTypeResourceFormatInner withImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the widgetVersion value. - * - * @return the widgetVersion value - */ - public String widgetVersion() { - return this.widgetVersion; - } - - /** - * Set the widgetVersion value. - * - * @param widgetVersion the widgetVersion value to set - * @return the WidgetTypeResourceFormatInner object itself. - */ - public WidgetTypeResourceFormatInner withWidgetVersion(String widgetVersion) { - this.widgetVersion = widgetVersion; - return this; - } - - /** - * Get the changed value. - * - * @return the changed value - */ - public DateTime changed() { - return this.changed; - } - - /** - * Get the created value. - * - * @return the created value - */ - public DateTime created() { - return this.created; - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/WidgetTypesInner.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/WidgetTypesInner.java deleted file mode 100644 index 282c48b43d3..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/WidgetTypesInner.java +++ /dev/null @@ -1,401 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.customerinsights.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WidgetTypes. - */ -public class WidgetTypesInner { - /** The Retrofit service to perform REST calls. */ - private WidgetTypesService service; - /** The service client containing this operation class. */ - private CustomerInsightsManagementClientImpl client; - - /** - * Initializes an instance of WidgetTypesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WidgetTypesInner(Retrofit retrofit, CustomerInsightsManagementClientImpl client) { - this.service = retrofit.create(WidgetTypesService.class); - this.client = client; - } - - /** - * The interface defining all the services for WidgetTypes to be - * used by Retrofit to perform actually REST calls. - */ - interface WidgetTypesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.WidgetTypes listByHub" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/widgetTypes") - Observable> listByHub(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.WidgetTypes get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/widgetTypes/{widgetTypeName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("widgetTypeName") String widgetTypeName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.customerinsights.WidgetTypes listByHubNext" }) - @GET - Observable> listByHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets all available widget types in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WidgetTypeResourceFormatInner> object if successful. - */ - public PagedList listByHub(final String resourceGroupName, final String hubName) { - ServiceResponse> response = listByHubSinglePageAsync(resourceGroupName, hubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all available widget types in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubAsync(final String resourceGroupName, final String hubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubSinglePageAsync(resourceGroupName, hubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all available widget types in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WidgetTypeResourceFormatInner> object - */ - public Observable> listByHubAsync(final String resourceGroupName, final String hubName) { - return listByHubWithServiceResponseAsync(resourceGroupName, hubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all available widget types in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WidgetTypeResourceFormatInner> object - */ - public Observable>> listByHubWithServiceResponseAsync(final String resourceGroupName, final String hubName) { - return listByHubSinglePageAsync(resourceGroupName, hubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all available widget types in the specified hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param hubName The name of the hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WidgetTypeResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubSinglePageAsync(final String resourceGroupName, final String hubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByHub(resourceGroupName, hubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a widget type in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param widgetTypeName The name of the widget type. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WidgetTypeResourceFormatInner object if successful. - */ - public WidgetTypeResourceFormatInner get(String resourceGroupName, String hubName, String widgetTypeName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, widgetTypeName).toBlocking().single().body(); - } - - /** - * Gets a widget type in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param widgetTypeName The name of the widget type. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String hubName, String widgetTypeName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, widgetTypeName), serviceCallback); - } - - /** - * Gets a widget type in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param widgetTypeName The name of the widget type. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WidgetTypeResourceFormatInner object - */ - public Observable getAsync(String resourceGroupName, String hubName, String widgetTypeName) { - return getWithServiceResponseAsync(resourceGroupName, hubName, widgetTypeName).map(new Func1, WidgetTypeResourceFormatInner>() { - @Override - public WidgetTypeResourceFormatInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a widget type in the specified hub. - * - * @param resourceGroupName The name of the resource group. - * @param hubName The name of the hub. - * @param widgetTypeName The name of the widget type. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WidgetTypeResourceFormatInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String hubName, String widgetTypeName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (hubName == null) { - throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); - } - if (widgetTypeName == null) { - throw new IllegalArgumentException("Parameter widgetTypeName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, hubName, widgetTypeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all available widget types in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WidgetTypeResourceFormatInner> object if successful. - */ - public PagedList listByHubNext(final String nextPageLink) { - ServiceResponse> response = listByHubNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all available widget types in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByHubNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all available widget types in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WidgetTypeResourceFormatInner> object - */ - public Observable> listByHubNextAsync(final String nextPageLink) { - return listByHubNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all available widget types in the specified hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WidgetTypeResourceFormatInner> object - */ - public Observable>> listByHubNextWithServiceResponseAsync(final String nextPageLink) { - return listByHubNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByHubNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all available widget types in the specified hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WidgetTypeResourceFormatInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByHubNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByHubNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByHubNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/package-info.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/package-info.java deleted file mode 100644 index a3862221c62..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for CustomerInsightsManagementClient. - * The Azure Customer Insights management API provides a RESTful set of web services that interact with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship between an end user and the Azure Customer Insights service. - */ -package com.microsoft.azure.management.customerinsights.implementation; diff --git a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/package-info.java b/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/package-info.java deleted file mode 100644 index 9832205112c..00000000000 --- a/azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for CustomerInsightsManagementClient. - * The Azure Customer Insights management API provides a RESTful set of web services that interact with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship between an end user and the Azure Customer Insights service. - */ -package com.microsoft.azure.management.customerinsights; diff --git a/azure-mgmt-devices/pom.xml b/azure-mgmt-devices/pom.xml deleted file mode 100755 index 4068ecf3e6c..00000000000 --- a/azure-mgmt-devices/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-devices - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for Devices Management - This package contains Microsoft Devices Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/AccessRights.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/AccessRights.java deleted file mode 100755 index 1f610df91dc..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/AccessRights.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AccessRights. - */ -public enum AccessRights { - /** Enum value RegistryRead. */ - REGISTRY_READ("RegistryRead"), - - /** Enum value RegistryWrite. */ - REGISTRY_WRITE("RegistryWrite"), - - /** Enum value ServiceConnect. */ - SERVICE_CONNECT("ServiceConnect"), - - /** Enum value DeviceConnect. */ - DEVICE_CONNECT("DeviceConnect"), - - /** Enum value RegistryRead, RegistryWrite. */ - REGISTRY_READ_REGISTRY_WRITE("RegistryRead, RegistryWrite"), - - /** Enum value RegistryRead, ServiceConnect. */ - REGISTRY_READ_SERVICE_CONNECT("RegistryRead, ServiceConnect"), - - /** Enum value RegistryRead, DeviceConnect. */ - REGISTRY_READ_DEVICE_CONNECT("RegistryRead, DeviceConnect"), - - /** Enum value RegistryWrite, ServiceConnect. */ - REGISTRY_WRITE_SERVICE_CONNECT("RegistryWrite, ServiceConnect"), - - /** Enum value RegistryWrite, DeviceConnect. */ - REGISTRY_WRITE_DEVICE_CONNECT("RegistryWrite, DeviceConnect"), - - /** Enum value ServiceConnect, DeviceConnect. */ - SERVICE_CONNECT_DEVICE_CONNECT("ServiceConnect, DeviceConnect"), - - /** Enum value RegistryRead, RegistryWrite, ServiceConnect. */ - REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT("RegistryRead, RegistryWrite, ServiceConnect"), - - /** Enum value RegistryRead, RegistryWrite, DeviceConnect. */ - REGISTRY_READ_REGISTRY_WRITE_DEVICE_CONNECT("RegistryRead, RegistryWrite, DeviceConnect"), - - /** Enum value RegistryRead, ServiceConnect, DeviceConnect. */ - REGISTRY_READ_SERVICE_CONNECT_DEVICE_CONNECT("RegistryRead, ServiceConnect, DeviceConnect"), - - /** Enum value RegistryWrite, ServiceConnect, DeviceConnect. */ - REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT("RegistryWrite, ServiceConnect, DeviceConnect"), - - /** Enum value RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect. */ - REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT("RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect"); - - /** The actual serialized value for a AccessRights instance. */ - private String value; - - AccessRights(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AccessRights instance. - * - * @param value the serialized value to parse. - * @return the parsed AccessRights object, or null if unable to parse. - */ - @JsonCreator - public static AccessRights fromString(String value) { - AccessRights[] items = AccessRights.values(); - for (AccessRights item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/Capabilities.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/Capabilities.java deleted file mode 100755 index 5ebab074518..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/Capabilities.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for Capabilities. - */ -public final class Capabilities { - /** Static value None for Capabilities. */ - public static final Capabilities NONE = new Capabilities("None"); - - /** Static value DeviceManagement for Capabilities. */ - public static final Capabilities DEVICE_MANAGEMENT = new Capabilities("DeviceManagement"); - - private String value; - - /** - * Creates a custom value for Capabilities. - * @param value the custom value - */ - public Capabilities(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof Capabilities)) { - return false; - } - if (obj == this) { - return true; - } - Capabilities rhs = (Capabilities) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/CloudToDeviceProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/CloudToDeviceProperties.java deleted file mode 100755 index e56084a2a6f..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/CloudToDeviceProperties.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The IoT hub cloud-to-device messaging properties. - */ -public class CloudToDeviceProperties { - /** - * The max delivery count for cloud-to-device messages in the device queue. - * See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - */ - @JsonProperty(value = "maxDeliveryCount") - private Integer maxDeliveryCount; - - /** - * The default time to live for cloud-to-device messages in the device - * queue. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - */ - @JsonProperty(value = "defaultTtlAsIso8601") - private Period defaultTtlAsIso8601; - - /** - * The feedback property. - */ - @JsonProperty(value = "feedback") - private FeedbackProperties feedback; - - /** - * Get the maxDeliveryCount value. - * - * @return the maxDeliveryCount value - */ - public Integer maxDeliveryCount() { - return this.maxDeliveryCount; - } - - /** - * Set the maxDeliveryCount value. - * - * @param maxDeliveryCount the maxDeliveryCount value to set - * @return the CloudToDeviceProperties object itself. - */ - public CloudToDeviceProperties withMaxDeliveryCount(Integer maxDeliveryCount) { - this.maxDeliveryCount = maxDeliveryCount; - return this; - } - - /** - * Get the defaultTtlAsIso8601 value. - * - * @return the defaultTtlAsIso8601 value - */ - public Period defaultTtlAsIso8601() { - return this.defaultTtlAsIso8601; - } - - /** - * Set the defaultTtlAsIso8601 value. - * - * @param defaultTtlAsIso8601 the defaultTtlAsIso8601 value to set - * @return the CloudToDeviceProperties object itself. - */ - public CloudToDeviceProperties withDefaultTtlAsIso8601(Period defaultTtlAsIso8601) { - this.defaultTtlAsIso8601 = defaultTtlAsIso8601; - return this; - } - - /** - * Get the feedback value. - * - * @return the feedback value - */ - public FeedbackProperties feedback() { - return this.feedback; - } - - /** - * Set the feedback value. - * - * @param feedback the feedback value to set - * @return the CloudToDeviceProperties object itself. - */ - public CloudToDeviceProperties withFeedback(FeedbackProperties feedback) { - this.feedback = feedback; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/EventHubProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/EventHubProperties.java deleted file mode 100755 index 508fce4fd13..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/EventHubProperties.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the provisioned Event Hub-compatible endpoint used by the - * IoT hub. - */ -public class EventHubProperties { - /** - * The retention time for device-to-cloud messages in days. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - */ - @JsonProperty(value = "retentionTimeInDays") - private Long retentionTimeInDays; - - /** - * The number of paritions for receiving device-to-cloud messages in the - * Event Hub-compatible endpoint. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - */ - @JsonProperty(value = "partitionCount") - private Integer partitionCount; - - /** - * The partition ids in the Event Hub-compatible endpoint. - */ - @JsonProperty(value = "partitionIds", access = JsonProperty.Access.WRITE_ONLY) - private List partitionIds; - - /** - * The Event Hub-compatible name. - */ - @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) - private String path; - - /** - * The Event Hub-compatible endpoint. - */ - @JsonProperty(value = "endpoint", access = JsonProperty.Access.WRITE_ONLY) - private String endpoint; - - /** - * Get the retentionTimeInDays value. - * - * @return the retentionTimeInDays value - */ - public Long retentionTimeInDays() { - return this.retentionTimeInDays; - } - - /** - * Set the retentionTimeInDays value. - * - * @param retentionTimeInDays the retentionTimeInDays value to set - * @return the EventHubProperties object itself. - */ - public EventHubProperties withRetentionTimeInDays(Long retentionTimeInDays) { - this.retentionTimeInDays = retentionTimeInDays; - return this; - } - - /** - * Get the partitionCount value. - * - * @return the partitionCount value - */ - public Integer partitionCount() { - return this.partitionCount; - } - - /** - * Set the partitionCount value. - * - * @param partitionCount the partitionCount value to set - * @return the EventHubProperties object itself. - */ - public EventHubProperties withPartitionCount(Integer partitionCount) { - this.partitionCount = partitionCount; - return this; - } - - /** - * Get the partitionIds value. - * - * @return the partitionIds value - */ - public List partitionIds() { - return this.partitionIds; - } - - /** - * Get the path value. - * - * @return the path value - */ - public String path() { - return this.path; - } - - /** - * Get the endpoint value. - * - * @return the endpoint value - */ - public String endpoint() { - return this.endpoint; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/FallbackRouteProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/FallbackRouteProperties.java deleted file mode 100755 index 59717894cfe..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/FallbackRouteProperties.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties related to the fallback route based on which the IoT hub - * routes messages to the fallback endpoint. - */ -public class FallbackRouteProperties { - /** - * The source to which the routing rule is to be applied to. e.g. - * DeviceMessages. - */ - @JsonProperty(value = "source", required = true) - private String source; - - /** - * The condition which is evaluated in order to apply the fallback route. - * If the condition is not provided it will evaluate to true by default. - * For grammar, See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language. - */ - @JsonProperty(value = "condition") - private String condition; - - /** - * The list of endpoints to which the messages that satisfy the condition - * are routed to. Currently only 1 endpoint is allowed. - */ - @JsonProperty(value = "endpointNames", required = true) - private List endpointNames; - - /** - * Used to specify whether the fallback route is enabled or not. - */ - @JsonProperty(value = "isEnabled", required = true) - private boolean isEnabled; - - /** - * Creates an instance of FallbackRouteProperties class. - */ - public FallbackRouteProperties() { - source = "DeviceMessages"; - } - - /** - * Get the source value. - * - * @return the source value - */ - public String source() { - return this.source; - } - - /** - * Set the source value. - * - * @param source the source value to set - * @return the FallbackRouteProperties object itself. - */ - public FallbackRouteProperties withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the condition value. - * - * @return the condition value - */ - public String condition() { - return this.condition; - } - - /** - * Set the condition value. - * - * @param condition the condition value to set - * @return the FallbackRouteProperties object itself. - */ - public FallbackRouteProperties withCondition(String condition) { - this.condition = condition; - return this; - } - - /** - * Get the endpointNames value. - * - * @return the endpointNames value - */ - public List endpointNames() { - return this.endpointNames; - } - - /** - * Set the endpointNames value. - * - * @param endpointNames the endpointNames value to set - * @return the FallbackRouteProperties object itself. - */ - public FallbackRouteProperties withEndpointNames(List endpointNames) { - this.endpointNames = endpointNames; - return this; - } - - /** - * Get the isEnabled value. - * - * @return the isEnabled value - */ - public boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled value. - * - * @param isEnabled the isEnabled value to set - * @return the FallbackRouteProperties object itself. - */ - public FallbackRouteProperties withIsEnabled(boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/FeedbackProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/FeedbackProperties.java deleted file mode 100755 index e18e26ef77d..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/FeedbackProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the feedback queue for cloud-to-device messages. - */ -public class FeedbackProperties { - /** - * The lock duration for the feedback queue. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - */ - @JsonProperty(value = "lockDurationAsIso8601") - private Period lockDurationAsIso8601; - - /** - * The period of time for which a message is available to consume before it - * is expired by the IoT hub. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - */ - @JsonProperty(value = "ttlAsIso8601") - private Period ttlAsIso8601; - - /** - * The number of times the IoT hub attempts to deliver a message on the - * feedback queue. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - */ - @JsonProperty(value = "maxDeliveryCount") - private Integer maxDeliveryCount; - - /** - * Get the lockDurationAsIso8601 value. - * - * @return the lockDurationAsIso8601 value - */ - public Period lockDurationAsIso8601() { - return this.lockDurationAsIso8601; - } - - /** - * Set the lockDurationAsIso8601 value. - * - * @param lockDurationAsIso8601 the lockDurationAsIso8601 value to set - * @return the FeedbackProperties object itself. - */ - public FeedbackProperties withLockDurationAsIso8601(Period lockDurationAsIso8601) { - this.lockDurationAsIso8601 = lockDurationAsIso8601; - return this; - } - - /** - * Get the ttlAsIso8601 value. - * - * @return the ttlAsIso8601 value - */ - public Period ttlAsIso8601() { - return this.ttlAsIso8601; - } - - /** - * Set the ttlAsIso8601 value. - * - * @param ttlAsIso8601 the ttlAsIso8601 value to set - * @return the FeedbackProperties object itself. - */ - public FeedbackProperties withTtlAsIso8601(Period ttlAsIso8601) { - this.ttlAsIso8601 = ttlAsIso8601; - return this; - } - - /** - * Get the maxDeliveryCount value. - * - * @return the maxDeliveryCount value - */ - public Integer maxDeliveryCount() { - return this.maxDeliveryCount; - } - - /** - * Set the maxDeliveryCount value. - * - * @param maxDeliveryCount the maxDeliveryCount value to set - * @return the FeedbackProperties object itself. - */ - public FeedbackProperties withMaxDeliveryCount(Integer maxDeliveryCount) { - this.maxDeliveryCount = maxDeliveryCount; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubCapacity.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubCapacity.java deleted file mode 100755 index 20d97fbe372..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubCapacity.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * IoT Hub capacity information. - */ -public class IotHubCapacity { - /** - * The minimum number of units. - */ - @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY) - private Long minimum; - - /** - * The maximum number of units. - */ - @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) - private Long maximum; - - /** - * The default number of units. - */ - @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY) - private Long defaultProperty; - - /** - * The type of the scaling enabled. Possible values include: 'Automatic', - * 'Manual', 'None'. - */ - @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) - private IotHubScaleType scaleType; - - /** - * Get the minimum value. - * - * @return the minimum value - */ - public Long minimum() { - return this.minimum; - } - - /** - * Get the maximum value. - * - * @return the maximum value - */ - public Long maximum() { - return this.maximum; - } - - /** - * Get the defaultProperty value. - * - * @return the defaultProperty value - */ - public Long defaultProperty() { - return this.defaultProperty; - } - - /** - * Get the scaleType value. - * - * @return the scaleType value - */ - public IotHubScaleType scaleType() { - return this.scaleType; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubNameUnavailabilityReason.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubNameUnavailabilityReason.java deleted file mode 100755 index 5450fae1b61..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubNameUnavailabilityReason.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for IotHubNameUnavailabilityReason. - */ -public enum IotHubNameUnavailabilityReason { - /** Enum value Invalid. */ - INVALID("Invalid"), - - /** Enum value AlreadyExists. */ - ALREADY_EXISTS("AlreadyExists"); - - /** The actual serialized value for a IotHubNameUnavailabilityReason instance. */ - private String value; - - IotHubNameUnavailabilityReason(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a IotHubNameUnavailabilityReason instance. - * - * @param value the serialized value to parse. - * @return the parsed IotHubNameUnavailabilityReason object, or null if unable to parse. - */ - @JsonCreator - public static IotHubNameUnavailabilityReason fromString(String value) { - IotHubNameUnavailabilityReason[] items = IotHubNameUnavailabilityReason.values(); - for (IotHubNameUnavailabilityReason item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubProperties.java deleted file mode 100755 index f728a033da2..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubProperties.java +++ /dev/null @@ -1,349 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import java.util.List; -import com.microsoft.azure.management.devices.implementation.SharedAccessSignatureAuthorizationRuleInner; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of an IoT hub. - */ -public class IotHubProperties { - /** - * The shared access policies you can use to secure a connection to the IoT - * hub. - */ - @JsonProperty(value = "authorizationPolicies") - private List authorizationPolicies; - - /** - * The IP filter rules. - */ - @JsonProperty(value = "ipFilterRules") - private List ipFilterRules; - - /** - * The provisioning state. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The name of the host. - */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostName; - - /** - * The Event Hub-compatible endpoint properties. The possible keys to this - * dictionary are events and operationsMonitoringEvents. Both of these keys - * have to be present in the dictionary while making create or update calls - * for the IoT hub. - */ - @JsonProperty(value = "eventHubEndpoints") - private Map eventHubEndpoints; - - /** - * The routing property. - */ - @JsonProperty(value = "routing") - private RoutingProperties routing; - - /** - * The list of Azure Storage endpoints where you can upload files. - * Currently you can configure only one Azure Storage account and that MUST - * have its key as $default. Specifying more than one storage account - * causes an error to be thrown. Not specifying a value for this property - * when the enableFileUploadNotifications property is set to True, causes - * an error to be thrown. - */ - @JsonProperty(value = "storageEndpoints") - private Map storageEndpoints; - - /** - * The messaging endpoint properties for the file upload notification - * queue. - */ - @JsonProperty(value = "messagingEndpoints") - private Map messagingEndpoints; - - /** - * If True, file upload notifications are enabled. - */ - @JsonProperty(value = "enableFileUploadNotifications") - private Boolean enableFileUploadNotifications; - - /** - * The cloudToDevice property. - */ - @JsonProperty(value = "cloudToDevice") - private CloudToDeviceProperties cloudToDevice; - - /** - * Comments. - */ - @JsonProperty(value = "comments") - private String comments; - - /** - * The operationsMonitoringProperties property. - */ - @JsonProperty(value = "operationsMonitoringProperties") - private OperationsMonitoringProperties operationsMonitoringProperties; - - /** - * The capabilities and features enabled for the IoT hub. Possible values - * include: 'None', 'DeviceManagement'. - */ - @JsonProperty(value = "features") - private Capabilities features; - - /** - * Get the authorizationPolicies value. - * - * @return the authorizationPolicies value - */ - public List authorizationPolicies() { - return this.authorizationPolicies; - } - - /** - * Set the authorizationPolicies value. - * - * @param authorizationPolicies the authorizationPolicies value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withAuthorizationPolicies(List authorizationPolicies) { - this.authorizationPolicies = authorizationPolicies; - return this; - } - - /** - * Get the ipFilterRules value. - * - * @return the ipFilterRules value - */ - public List ipFilterRules() { - return this.ipFilterRules; - } - - /** - * Set the ipFilterRules value. - * - * @param ipFilterRules the ipFilterRules value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withIpFilterRules(List ipFilterRules) { - this.ipFilterRules = ipFilterRules; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the hostName value. - * - * @return the hostName value - */ - public String hostName() { - return this.hostName; - } - - /** - * Get the eventHubEndpoints value. - * - * @return the eventHubEndpoints value - */ - public Map eventHubEndpoints() { - return this.eventHubEndpoints; - } - - /** - * Set the eventHubEndpoints value. - * - * @param eventHubEndpoints the eventHubEndpoints value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withEventHubEndpoints(Map eventHubEndpoints) { - this.eventHubEndpoints = eventHubEndpoints; - return this; - } - - /** - * Get the routing value. - * - * @return the routing value - */ - public RoutingProperties routing() { - return this.routing; - } - - /** - * Set the routing value. - * - * @param routing the routing value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withRouting(RoutingProperties routing) { - this.routing = routing; - return this; - } - - /** - * Get the storageEndpoints value. - * - * @return the storageEndpoints value - */ - public Map storageEndpoints() { - return this.storageEndpoints; - } - - /** - * Set the storageEndpoints value. - * - * @param storageEndpoints the storageEndpoints value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withStorageEndpoints(Map storageEndpoints) { - this.storageEndpoints = storageEndpoints; - return this; - } - - /** - * Get the messagingEndpoints value. - * - * @return the messagingEndpoints value - */ - public Map messagingEndpoints() { - return this.messagingEndpoints; - } - - /** - * Set the messagingEndpoints value. - * - * @param messagingEndpoints the messagingEndpoints value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withMessagingEndpoints(Map messagingEndpoints) { - this.messagingEndpoints = messagingEndpoints; - return this; - } - - /** - * Get the enableFileUploadNotifications value. - * - * @return the enableFileUploadNotifications value - */ - public Boolean enableFileUploadNotifications() { - return this.enableFileUploadNotifications; - } - - /** - * Set the enableFileUploadNotifications value. - * - * @param enableFileUploadNotifications the enableFileUploadNotifications value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withEnableFileUploadNotifications(Boolean enableFileUploadNotifications) { - this.enableFileUploadNotifications = enableFileUploadNotifications; - return this; - } - - /** - * Get the cloudToDevice value. - * - * @return the cloudToDevice value - */ - public CloudToDeviceProperties cloudToDevice() { - return this.cloudToDevice; - } - - /** - * Set the cloudToDevice value. - * - * @param cloudToDevice the cloudToDevice value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withCloudToDevice(CloudToDeviceProperties cloudToDevice) { - this.cloudToDevice = cloudToDevice; - return this; - } - - /** - * Get the comments value. - * - * @return the comments value - */ - public String comments() { - return this.comments; - } - - /** - * Set the comments value. - * - * @param comments the comments value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withComments(String comments) { - this.comments = comments; - return this; - } - - /** - * Get the operationsMonitoringProperties value. - * - * @return the operationsMonitoringProperties value - */ - public OperationsMonitoringProperties operationsMonitoringProperties() { - return this.operationsMonitoringProperties; - } - - /** - * Set the operationsMonitoringProperties value. - * - * @param operationsMonitoringProperties the operationsMonitoringProperties value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withOperationsMonitoringProperties(OperationsMonitoringProperties operationsMonitoringProperties) { - this.operationsMonitoringProperties = operationsMonitoringProperties; - return this; - } - - /** - * Get the features value. - * - * @return the features value - */ - public Capabilities features() { - return this.features; - } - - /** - * Set the features value. - * - * @param features the features value to set - * @return the IotHubProperties object itself. - */ - public IotHubProperties withFeatures(Capabilities features) { - this.features = features; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubScaleType.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubScaleType.java deleted file mode 100755 index fbda1d7736e..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubScaleType.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for IotHubScaleType. - */ -public enum IotHubScaleType { - /** Enum value Automatic. */ - AUTOMATIC("Automatic"), - - /** Enum value Manual. */ - MANUAL("Manual"), - - /** Enum value None. */ - NONE("None"); - - /** The actual serialized value for a IotHubScaleType instance. */ - private String value; - - IotHubScaleType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a IotHubScaleType instance. - * - * @param value the serialized value to parse. - * @return the parsed IotHubScaleType object, or null if unable to parse. - */ - @JsonCreator - public static IotHubScaleType fromString(String value) { - IotHubScaleType[] items = IotHubScaleType.values(); - for (IotHubScaleType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSku.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSku.java deleted file mode 100755 index 77abd3f80a1..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSku.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for IotHubSku. - */ -public final class IotHubSku { - /** Static value F1 for IotHubSku. */ - public static final IotHubSku F1 = new IotHubSku("F1"); - - /** Static value S1 for IotHubSku. */ - public static final IotHubSku S1 = new IotHubSku("S1"); - - /** Static value S2 for IotHubSku. */ - public static final IotHubSku S2 = new IotHubSku("S2"); - - /** Static value S3 for IotHubSku. */ - public static final IotHubSku S3 = new IotHubSku("S3"); - - private String value; - - /** - * Creates a custom value for IotHubSku. - * @param value the custom value - */ - public IotHubSku(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IotHubSku)) { - return false; - } - if (obj == this) { - return true; - } - IotHubSku rhs = (IotHubSku) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSkuInfo.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSkuInfo.java deleted file mode 100755 index a0d9a1b5179..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSkuInfo.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about the SKU of the IoT hub. - */ -public class IotHubSkuInfo { - /** - * The name of the SKU. Possible values include: 'F1', 'S1', 'S2', 'S3'. - */ - @JsonProperty(value = "name", required = true) - private IotHubSku name; - - /** - * The billing tier for the IoT hub. Possible values include: 'Free', - * 'Standard'. - */ - @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) - private IotHubSkuTier tier; - - /** - * The number of provisioned IoT Hub units. See: - * https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. - */ - @JsonProperty(value = "capacity", required = true) - private long capacity; - - /** - * Get the name value. - * - * @return the name value - */ - public IotHubSku name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the IotHubSkuInfo object itself. - */ - public IotHubSkuInfo withName(IotHubSku name) { - this.name = name; - return this; - } - - /** - * Get the tier value. - * - * @return the tier value - */ - public IotHubSkuTier tier() { - return this.tier; - } - - /** - * Get the capacity value. - * - * @return the capacity value - */ - public long capacity() { - return this.capacity; - } - - /** - * Set the capacity value. - * - * @param capacity the capacity value to set - * @return the IotHubSkuInfo object itself. - */ - public IotHubSkuInfo withCapacity(long capacity) { - this.capacity = capacity; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSkuTier.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSkuTier.java deleted file mode 100755 index 45f803f544e..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IotHubSkuTier.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for IotHubSkuTier. - */ -public enum IotHubSkuTier { - /** Enum value Free. */ - FREE("Free"), - - /** Enum value Standard. */ - STANDARD("Standard"); - - /** The actual serialized value for a IotHubSkuTier instance. */ - private String value; - - IotHubSkuTier(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a IotHubSkuTier instance. - * - * @param value the serialized value to parse. - * @return the parsed IotHubSkuTier object, or null if unable to parse. - */ - @JsonCreator - public static IotHubSkuTier fromString(String value) { - IotHubSkuTier[] items = IotHubSkuTier.values(); - for (IotHubSkuTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IpFilterActionType.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IpFilterActionType.java deleted file mode 100755 index 4665eb0af76..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IpFilterActionType.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for IpFilterActionType. - */ -public enum IpFilterActionType { - /** Enum value Accept. */ - ACCEPT("Accept"), - - /** Enum value Reject. */ - REJECT("Reject"); - - /** The actual serialized value for a IpFilterActionType instance. */ - private String value; - - IpFilterActionType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a IpFilterActionType instance. - * - * @param value the serialized value to parse. - * @return the parsed IpFilterActionType object, or null if unable to parse. - */ - @JsonCreator - public static IpFilterActionType fromString(String value) { - IpFilterActionType[] items = IpFilterActionType.values(); - for (IpFilterActionType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IpFilterRule.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IpFilterRule.java deleted file mode 100755 index f3fc06d3173..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/IpFilterRule.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The IP filter rules for the IoT hub. - */ -public class IpFilterRule { - /** - * The name of the IP filter rule. - */ - @JsonProperty(value = "filterName", required = true) - private String filterName; - - /** - * The desired action for requests captured by this rule. Possible values - * include: 'Accept', 'Reject'. - */ - @JsonProperty(value = "action", required = true) - private IpFilterActionType action; - - /** - * A string that contains the IP address range in CIDR notation for the - * rule. - */ - @JsonProperty(value = "ipMask", required = true) - private String ipMask; - - /** - * Get the filterName value. - * - * @return the filterName value - */ - public String filterName() { - return this.filterName; - } - - /** - * Set the filterName value. - * - * @param filterName the filterName value to set - * @return the IpFilterRule object itself. - */ - public IpFilterRule withFilterName(String filterName) { - this.filterName = filterName; - return this; - } - - /** - * Get the action value. - * - * @return the action value - */ - public IpFilterActionType action() { - return this.action; - } - - /** - * Set the action value. - * - * @param action the action value to set - * @return the IpFilterRule object itself. - */ - public IpFilterRule withAction(IpFilterActionType action) { - this.action = action; - return this; - } - - /** - * Get the ipMask value. - * - * @return the ipMask value - */ - public String ipMask() { - return this.ipMask; - } - - /** - * Set the ipMask value. - * - * @param ipMask the ipMask value to set - * @return the IpFilterRule object itself. - */ - public IpFilterRule withIpMask(String ipMask) { - this.ipMask = ipMask; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/JobStatus.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/JobStatus.java deleted file mode 100755 index 247e2aed392..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/JobStatus.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JobStatus. - */ -public enum JobStatus { - /** Enum value unknown. */ - UNKNOWN("unknown"), - - /** Enum value enqueued. */ - ENQUEUED("enqueued"), - - /** Enum value running. */ - RUNNING("running"), - - /** Enum value completed. */ - COMPLETED("completed"), - - /** Enum value failed. */ - FAILED("failed"), - - /** Enum value cancelled. */ - CANCELLED("cancelled"); - - /** The actual serialized value for a JobStatus instance. */ - private String value; - - JobStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a JobStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed JobStatus object, or null if unable to parse. - */ - @JsonCreator - public static JobStatus fromString(String value) { - JobStatus[] items = JobStatus.values(); - for (JobStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/JobType.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/JobType.java deleted file mode 100755 index 196ddbb06a0..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/JobType.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JobType. - */ -public final class JobType { - /** Static value unknown for JobType. */ - public static final JobType UNKNOWN = new JobType("unknown"); - - /** Static value export for JobType. */ - public static final JobType EXPORT = new JobType("export"); - - /** Static value import for JobType. */ - public static final JobType IMPORT = new JobType("import"); - - /** Static value backup for JobType. */ - public static final JobType BACKUP = new JobType("backup"); - - /** Static value readDeviceProperties for JobType. */ - public static final JobType READ_DEVICE_PROPERTIES = new JobType("readDeviceProperties"); - - /** Static value writeDeviceProperties for JobType. */ - public static final JobType WRITE_DEVICE_PROPERTIES = new JobType("writeDeviceProperties"); - - /** Static value updateDeviceConfiguration for JobType. */ - public static final JobType UPDATE_DEVICE_CONFIGURATION = new JobType("updateDeviceConfiguration"); - - /** Static value rebootDevice for JobType. */ - public static final JobType REBOOT_DEVICE = new JobType("rebootDevice"); - - /** Static value factoryResetDevice for JobType. */ - public static final JobType FACTORY_RESET_DEVICE = new JobType("factoryResetDevice"); - - /** Static value firmwareUpdate for JobType. */ - public static final JobType FIRMWARE_UPDATE = new JobType("firmwareUpdate"); - - private String value; - - /** - * Creates a custom value for JobType. - * @param value the custom value - */ - public JobType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof JobType)) { - return false; - } - if (obj == this) { - return true; - } - JobType rhs = (JobType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/MessagingEndpointProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/MessagingEndpointProperties.java deleted file mode 100755 index 15101060897..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/MessagingEndpointProperties.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the messaging endpoints used by this IoT hub. - */ -public class MessagingEndpointProperties { - /** - * The lock duration. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - */ - @JsonProperty(value = "lockDurationAsIso8601") - private Period lockDurationAsIso8601; - - /** - * The period of time for which a message is available to consume before it - * is expired by the IoT hub. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - */ - @JsonProperty(value = "ttlAsIso8601") - private Period ttlAsIso8601; - - /** - * The number of times the IoT hub attempts to deliver a message. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - */ - @JsonProperty(value = "maxDeliveryCount") - private Integer maxDeliveryCount; - - /** - * Get the lockDurationAsIso8601 value. - * - * @return the lockDurationAsIso8601 value - */ - public Period lockDurationAsIso8601() { - return this.lockDurationAsIso8601; - } - - /** - * Set the lockDurationAsIso8601 value. - * - * @param lockDurationAsIso8601 the lockDurationAsIso8601 value to set - * @return the MessagingEndpointProperties object itself. - */ - public MessagingEndpointProperties withLockDurationAsIso8601(Period lockDurationAsIso8601) { - this.lockDurationAsIso8601 = lockDurationAsIso8601; - return this; - } - - /** - * Get the ttlAsIso8601 value. - * - * @return the ttlAsIso8601 value - */ - public Period ttlAsIso8601() { - return this.ttlAsIso8601; - } - - /** - * Set the ttlAsIso8601 value. - * - * @param ttlAsIso8601 the ttlAsIso8601 value to set - * @return the MessagingEndpointProperties object itself. - */ - public MessagingEndpointProperties withTtlAsIso8601(Period ttlAsIso8601) { - this.ttlAsIso8601 = ttlAsIso8601; - return this; - } - - /** - * Get the maxDeliveryCount value. - * - * @return the maxDeliveryCount value - */ - public Integer maxDeliveryCount() { - return this.maxDeliveryCount; - } - - /** - * Set the maxDeliveryCount value. - * - * @param maxDeliveryCount the maxDeliveryCount value to set - * @return the MessagingEndpointProperties object itself. - */ - public MessagingEndpointProperties withMaxDeliveryCount(Integer maxDeliveryCount) { - this.maxDeliveryCount = maxDeliveryCount; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationInputs.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationInputs.java deleted file mode 100755 index 11a96147dda..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationInputs.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Input values. - */ -public class OperationInputs { - /** - * The name of the IoT hub to check. - */ - @JsonProperty(value = "Name", required = true) - private String name; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the OperationInputs object itself. - */ - public OperationInputs withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationMonitoringLevel.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationMonitoringLevel.java deleted file mode 100755 index d56baa4c4ad..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationMonitoringLevel.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for OperationMonitoringLevel. - */ -public final class OperationMonitoringLevel { - /** Static value None for OperationMonitoringLevel. */ - public static final OperationMonitoringLevel NONE = new OperationMonitoringLevel("None"); - - /** Static value Error for OperationMonitoringLevel. */ - public static final OperationMonitoringLevel ERROR = new OperationMonitoringLevel("Error"); - - /** Static value Information for OperationMonitoringLevel. */ - public static final OperationMonitoringLevel INFORMATION = new OperationMonitoringLevel("Information"); - - /** Static value Error, Information for OperationMonitoringLevel. */ - public static final OperationMonitoringLevel ERROR_INFORMATION = new OperationMonitoringLevel("Error, Information"); - - private String value; - - /** - * Creates a custom value for OperationMonitoringLevel. - * @param value the custom value - */ - public OperationMonitoringLevel(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof OperationMonitoringLevel)) { - return false; - } - if (obj == this) { - return true; - } - OperationMonitoringLevel rhs = (OperationMonitoringLevel) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationsMonitoringProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationsMonitoringProperties.java deleted file mode 100755 index affe1a22719..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/OperationsMonitoringProperties.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The operations monitoring properties for the IoT hub. The possible keys to - * the dictionary are Connections, DeviceTelemetry, C2DCommands, - * DeviceIdentityOperations, FileUploadOperations, Routes, D2CTwinOperations, - * C2DTwinOperations, TwinQueries, JobsOperations, DirectMethods. - */ -public class OperationsMonitoringProperties { - /** - * The events property. - */ - @JsonProperty(value = "events") - private Map events; - - /** - * Get the events value. - * - * @return the events value - */ - public Map events() { - return this.events; - } - - /** - * Set the events value. - * - * @param events the events value to set - * @return the OperationsMonitoringProperties object itself. - */ - public OperationsMonitoringProperties withEvents(Map events) { - this.events = events; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RouteProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RouteProperties.java deleted file mode 100755 index ed4f5034927..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RouteProperties.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of a routing rule that your IoT hub uses to route messages to - * endpoints. - */ -public class RouteProperties { - /** - * The name of the route. The name can only include alphanumeric - * characters, periods, underscores, hyphens, has a maximum length of 64 - * characters, and must be unique. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * The source that the routing rule is to be applied to, such as - * DeviceMessages. Possible values include: 'DeviceMessages', - * 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'. - */ - @JsonProperty(value = "source", required = true) - private RoutingSource source; - - /** - * The condition that is evaluated to apply the routing rule. If no - * condition is provided, it evaluates to true by default. For grammar, - * See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language. - */ - @JsonProperty(value = "condition") - private String condition; - - /** - * The list of endpoints to which messages that satisfy the condition are - * routed. Currently only one endpoint is allowed. - */ - @JsonProperty(value = "endpointNames", required = true) - private List endpointNames; - - /** - * Used to specify whether a route is enabled. - */ - @JsonProperty(value = "isEnabled", required = true) - private boolean isEnabled; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the RouteProperties object itself. - */ - public RouteProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the source value. - * - * @return the source value - */ - public RoutingSource source() { - return this.source; - } - - /** - * Set the source value. - * - * @param source the source value to set - * @return the RouteProperties object itself. - */ - public RouteProperties withSource(RoutingSource source) { - this.source = source; - return this; - } - - /** - * Get the condition value. - * - * @return the condition value - */ - public String condition() { - return this.condition; - } - - /** - * Set the condition value. - * - * @param condition the condition value to set - * @return the RouteProperties object itself. - */ - public RouteProperties withCondition(String condition) { - this.condition = condition; - return this; - } - - /** - * Get the endpointNames value. - * - * @return the endpointNames value - */ - public List endpointNames() { - return this.endpointNames; - } - - /** - * Set the endpointNames value. - * - * @param endpointNames the endpointNames value to set - * @return the RouteProperties object itself. - */ - public RouteProperties withEndpointNames(List endpointNames) { - this.endpointNames = endpointNames; - return this; - } - - /** - * Get the isEnabled value. - * - * @return the isEnabled value - */ - public boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled value. - * - * @param isEnabled the isEnabled value to set - * @return the RouteProperties object itself. - */ - public RouteProperties withIsEnabled(boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingEndpoints.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingEndpoints.java deleted file mode 100755 index 742739931f7..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingEndpoints.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties related to the custom endpoints to which your IoT hub routes - * messages based on the routing rules. A maximum of 10 custom endpoints are - * allowed across all endpoint types for paid hubs and only 1 custom endpoint - * is allowed across all endpoint types for free hubs. - */ -public class RoutingEndpoints { - /** - * The list of Service Bus queue endpoints that IoT hub routes the messages - * to, based on the routing rules. - */ - @JsonProperty(value = "serviceBusQueues") - private List serviceBusQueues; - - /** - * The list of Service Bus topic endpoints that the IoT hub routes the - * messages to, based on the routing rules. - */ - @JsonProperty(value = "serviceBusTopics") - private List serviceBusTopics; - - /** - * The list of Event Hubs endpoints that IoT hub routes messages to, based - * on the routing rules. This list does not include the built-in Event Hubs - * endpoint. - */ - @JsonProperty(value = "eventHubs") - private List eventHubs; - - /** - * Get the serviceBusQueues value. - * - * @return the serviceBusQueues value - */ - public List serviceBusQueues() { - return this.serviceBusQueues; - } - - /** - * Set the serviceBusQueues value. - * - * @param serviceBusQueues the serviceBusQueues value to set - * @return the RoutingEndpoints object itself. - */ - public RoutingEndpoints withServiceBusQueues(List serviceBusQueues) { - this.serviceBusQueues = serviceBusQueues; - return this; - } - - /** - * Get the serviceBusTopics value. - * - * @return the serviceBusTopics value - */ - public List serviceBusTopics() { - return this.serviceBusTopics; - } - - /** - * Set the serviceBusTopics value. - * - * @param serviceBusTopics the serviceBusTopics value to set - * @return the RoutingEndpoints object itself. - */ - public RoutingEndpoints withServiceBusTopics(List serviceBusTopics) { - this.serviceBusTopics = serviceBusTopics; - return this; - } - - /** - * Get the eventHubs value. - * - * @return the eventHubs value - */ - public List eventHubs() { - return this.eventHubs; - } - - /** - * Set the eventHubs value. - * - * @param eventHubs the eventHubs value to set - * @return the RoutingEndpoints object itself. - */ - public RoutingEndpoints withEventHubs(List eventHubs) { - this.eventHubs = eventHubs; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingEventHubProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingEventHubProperties.java deleted file mode 100755 index 3fcf6a207ec..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingEventHubProperties.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties related to an event hub endpoint. - */ -public class RoutingEventHubProperties { - /** - * The connection string of the event hub endpoint. - */ - @JsonProperty(value = "connectionString", required = true) - private String connectionString; - - /** - * The name of the event hub endpoint. The name can only include - * alphanumeric characters, periods, underscores, hyphens and has a maximum - * length of 64 characters. The following names are reserved; events, - * operationsMonitoringEvents, fileNotifications, $default. Endpoint names - * must be unique across endpoint types. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * The subscription identifier of the event hub endpoint. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * The name of the resource group of the event hub endpoint. - */ - @JsonProperty(value = "resourceGroup") - private String resourceGroup; - - /** - * Get the connectionString value. - * - * @return the connectionString value - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Set the connectionString value. - * - * @param connectionString the connectionString value to set - * @return the RoutingEventHubProperties object itself. - */ - public RoutingEventHubProperties withConnectionString(String connectionString) { - this.connectionString = connectionString; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the RoutingEventHubProperties object itself. - */ - public RoutingEventHubProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the RoutingEventHubProperties object itself. - */ - public RoutingEventHubProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup value. - * - * @return the resourceGroup value - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup value. - * - * @param resourceGroup the resourceGroup value to set - * @return the RoutingEventHubProperties object itself. - */ - public RoutingEventHubProperties withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingProperties.java deleted file mode 100755 index 7acf206263c..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingProperties.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The routing related properties of the IoT hub. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. - */ -public class RoutingProperties { - /** - * The endpoints property. - */ - @JsonProperty(value = "endpoints") - private RoutingEndpoints endpoints; - - /** - * The list of user-provided routing rules that the IoT hub uses to route - * messages to built-in and custom endpoints. A maximum of 100 routing - * rules are allowed for paid hubs and a maximum of 5 routing rules are - * allowed for free hubs. - */ - @JsonProperty(value = "routes") - private List routes; - - /** - * The properties of the route that is used as a fall-back route when none - * of the conditions specified in the 'routes' section are met. This is an - * optional parameter. When this property is not set, the messages which do - * not meet any of the conditions specified in the 'routes' section get - * routed to the built-in eventhub endpoint. - */ - @JsonProperty(value = "fallbackRoute") - private FallbackRouteProperties fallbackRoute; - - /** - * Get the endpoints value. - * - * @return the endpoints value - */ - public RoutingEndpoints endpoints() { - return this.endpoints; - } - - /** - * Set the endpoints value. - * - * @param endpoints the endpoints value to set - * @return the RoutingProperties object itself. - */ - public RoutingProperties withEndpoints(RoutingEndpoints endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Get the routes value. - * - * @return the routes value - */ - public List routes() { - return this.routes; - } - - /** - * Set the routes value. - * - * @param routes the routes value to set - * @return the RoutingProperties object itself. - */ - public RoutingProperties withRoutes(List routes) { - this.routes = routes; - return this; - } - - /** - * Get the fallbackRoute value. - * - * @return the fallbackRoute value - */ - public FallbackRouteProperties fallbackRoute() { - return this.fallbackRoute; - } - - /** - * Set the fallbackRoute value. - * - * @param fallbackRoute the fallbackRoute value to set - * @return the RoutingProperties object itself. - */ - public RoutingProperties withFallbackRoute(FallbackRouteProperties fallbackRoute) { - this.fallbackRoute = fallbackRoute; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingServiceBusQueueEndpointProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingServiceBusQueueEndpointProperties.java deleted file mode 100755 index 0f44dc3d09e..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingServiceBusQueueEndpointProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties related to service bus queue endpoint types. - */ -public class RoutingServiceBusQueueEndpointProperties { - /** - * The connection string of the service bus queue endpoint. - */ - @JsonProperty(value = "connectionString", required = true) - private String connectionString; - - /** - * The name of the service bus queue endpoint. The name can only include - * alphanumeric characters, periods, underscores, hyphens and has a maximum - * length of 64 characters. The following names are reserved; events, - * operationsMonitoringEvents, fileNotifications, $default. Endpoint names - * must be unique across endpoint types. The name need not be the same as - * the actual queue name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * The subscription identifier of the service bus queue endpoint. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * The name of the resource group of the service bus queue endpoint. - */ - @JsonProperty(value = "resourceGroup") - private String resourceGroup; - - /** - * Get the connectionString value. - * - * @return the connectionString value - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Set the connectionString value. - * - * @param connectionString the connectionString value to set - * @return the RoutingServiceBusQueueEndpointProperties object itself. - */ - public RoutingServiceBusQueueEndpointProperties withConnectionString(String connectionString) { - this.connectionString = connectionString; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the RoutingServiceBusQueueEndpointProperties object itself. - */ - public RoutingServiceBusQueueEndpointProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the RoutingServiceBusQueueEndpointProperties object itself. - */ - public RoutingServiceBusQueueEndpointProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup value. - * - * @return the resourceGroup value - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup value. - * - * @param resourceGroup the resourceGroup value to set - * @return the RoutingServiceBusQueueEndpointProperties object itself. - */ - public RoutingServiceBusQueueEndpointProperties withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingServiceBusTopicEndpointProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingServiceBusTopicEndpointProperties.java deleted file mode 100755 index 877a10afd3a..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingServiceBusTopicEndpointProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties related to service bus topic endpoint types. - */ -public class RoutingServiceBusTopicEndpointProperties { - /** - * The connection string of the service bus topic endpoint. - */ - @JsonProperty(value = "connectionString", required = true) - private String connectionString; - - /** - * The name of the service bus topic endpoint. The name can only include - * alphanumeric characters, periods, underscores, hyphens and has a maximum - * length of 64 characters. The following names are reserved; events, - * operationsMonitoringEvents, fileNotifications, $default. Endpoint names - * must be unique across endpoint types. The name need not be the same as - * the actual topic name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * The subscription identifier of the service bus topic endpoint. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * The name of the resource group of the service bus topic endpoint. - */ - @JsonProperty(value = "resourceGroup") - private String resourceGroup; - - /** - * Get the connectionString value. - * - * @return the connectionString value - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Set the connectionString value. - * - * @param connectionString the connectionString value to set - * @return the RoutingServiceBusTopicEndpointProperties object itself. - */ - public RoutingServiceBusTopicEndpointProperties withConnectionString(String connectionString) { - this.connectionString = connectionString; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the RoutingServiceBusTopicEndpointProperties object itself. - */ - public RoutingServiceBusTopicEndpointProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the RoutingServiceBusTopicEndpointProperties object itself. - */ - public RoutingServiceBusTopicEndpointProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup value. - * - * @return the resourceGroup value - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup value. - * - * @param resourceGroup the resourceGroup value to set - * @return the RoutingServiceBusTopicEndpointProperties object itself. - */ - public RoutingServiceBusTopicEndpointProperties withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingSource.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingSource.java deleted file mode 100755 index f99f0d2c028..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/RoutingSource.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for RoutingSource. - */ -public final class RoutingSource { - /** Static value DeviceMessages for RoutingSource. */ - public static final RoutingSource DEVICE_MESSAGES = new RoutingSource("DeviceMessages"); - - /** Static value TwinChangeEvents for RoutingSource. */ - public static final RoutingSource TWIN_CHANGE_EVENTS = new RoutingSource("TwinChangeEvents"); - - /** Static value DeviceLifecycleEvents for RoutingSource. */ - public static final RoutingSource DEVICE_LIFECYCLE_EVENTS = new RoutingSource("DeviceLifecycleEvents"); - - /** Static value DeviceJobLifecycleEvents for RoutingSource. */ - public static final RoutingSource DEVICE_JOB_LIFECYCLE_EVENTS = new RoutingSource("DeviceJobLifecycleEvents"); - - private String value; - - /** - * Creates a custom value for RoutingSource. - * @param value the custom value - */ - public RoutingSource(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof RoutingSource)) { - return false; - } - if (obj == this) { - return true; - } - RoutingSource rhs = (RoutingSource) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/StorageEndpointProperties.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/StorageEndpointProperties.java deleted file mode 100755 index 21bfb0c971a..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/StorageEndpointProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the Azure Storage endpoint for file upload. - */ -public class StorageEndpointProperties { - /** - * The period of time for which the the SAS URI generated by IoT Hub for - * file upload is valid. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. - */ - @JsonProperty(value = "sasTtlAsIso8601") - private Period sasTtlAsIso8601; - - /** - * The connection string for the Azure Storage account to which files are - * uploaded. - */ - @JsonProperty(value = "connectionString", required = true) - private String connectionString; - - /** - * The name of the root container where you upload files. The container - * need not exist but should be creatable using the connectionString - * specified. - */ - @JsonProperty(value = "containerName", required = true) - private String containerName; - - /** - * Get the sasTtlAsIso8601 value. - * - * @return the sasTtlAsIso8601 value - */ - public Period sasTtlAsIso8601() { - return this.sasTtlAsIso8601; - } - - /** - * Set the sasTtlAsIso8601 value. - * - * @param sasTtlAsIso8601 the sasTtlAsIso8601 value to set - * @return the StorageEndpointProperties object itself. - */ - public StorageEndpointProperties withSasTtlAsIso8601(Period sasTtlAsIso8601) { - this.sasTtlAsIso8601 = sasTtlAsIso8601; - return this; - } - - /** - * Get the connectionString value. - * - * @return the connectionString value - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Set the connectionString value. - * - * @param connectionString the connectionString value to set - * @return the StorageEndpointProperties object itself. - */ - public StorageEndpointProperties withConnectionString(String connectionString) { - this.connectionString = connectionString; - return this; - } - - /** - * Get the containerName value. - * - * @return the containerName value - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName value. - * - * @param containerName the containerName value to set - * @return the StorageEndpointProperties object itself. - */ - public StorageEndpointProperties withContainerName(String containerName) { - this.containerName = containerName; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/DevicesManager.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/DevicesManager.java deleted file mode 100755 index 93258949140..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/DevicesManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure Devices resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class DevicesManager extends Manager { - /** - * Get a Configurable instance that can be used to create DevicesManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new DevicesManager.ConfigurableImpl(); - } - /** - * Creates an instance of DevicesManager that exposes Devices resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the DevicesManager - */ - public static DevicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new DevicesManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of DevicesManager that exposes Devices resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the DevicesManager - */ - public static DevicesManager authenticate(RestClient restClient, String subscriptionId) { - return new DevicesManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of DevicesManager that exposes Devices management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing Devices management API entry points that work across subscriptions - */ - DevicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public DevicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return DevicesManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private DevicesManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new IotHubClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ErrorDetailsInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ErrorDetailsInner.java deleted file mode 100755 index dd86c13f724..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ErrorDetailsInner.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Error details. - */ -public class ErrorDetailsInner { - /** - * The error code. - */ - @JsonProperty(value = "Code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * The HTTP status code. - */ - @JsonProperty(value = "HttpStatusCode", access = JsonProperty.Access.WRITE_ONLY) - private String httpStatusCode; - - /** - * The error message. - */ - @JsonProperty(value = "Message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * The error details. - */ - @JsonProperty(value = "Details", access = JsonProperty.Access.WRITE_ONLY) - private String details; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the httpStatusCode value. - * - * @return the httpStatusCode value - */ - public String httpStatusCode() { - return this.httpStatusCode; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Get the details value. - * - * @return the details value - */ - public String details() { - return this.details; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ErrorDetailsInnerException.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ErrorDetailsInnerException.java deleted file mode 100755 index 56ef6f44b91..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ErrorDetailsInnerException.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with ErrorDetailsInner information. - */ -public class ErrorDetailsInnerException extends RestException { - /** - * Initializes a new instance of the ErrorDetailsInnerException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorDetailsInnerException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorDetailsInnerException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorDetailsInnerException(final String message, final Response response, final ErrorDetailsInner body) { - super(message, response, body); - } - - @Override - public ErrorDetailsInner body() { - return (ErrorDetailsInner) super.body(); - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/EventHubConsumerGroupInfoInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/EventHubConsumerGroupInfoInner.java deleted file mode 100755 index 83c871d6cb9..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/EventHubConsumerGroupInfoInner.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the EventHubConsumerGroupInfo object. - */ -public class EventHubConsumerGroupInfoInner { - /** - * The tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * The Event Hub-compatible consumer group identifier. - */ - @JsonProperty(value = "id") - private String id; - - /** - * The Event Hub-compatible consumer group name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the EventHubConsumerGroupInfoInner object itself. - */ - public EventHubConsumerGroupInfoInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the EventHubConsumerGroupInfoInner object itself. - */ - public EventHubConsumerGroupInfoInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the EventHubConsumerGroupInfoInner object itself. - */ - public EventHubConsumerGroupInfoInner withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ExportDevicesRequestInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ExportDevicesRequestInner.java deleted file mode 100755 index c4ea9432356..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ExportDevicesRequestInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Use to provide parameters when requesting an export of all devices in the - * IoT hub. - */ -public class ExportDevicesRequestInner { - /** - * The export blob container URI. - */ - @JsonProperty(value = "ExportBlobContainerUri", required = true) - private String exportBlobContainerUri; - - /** - * The value indicating whether keys should be excluded during export. - */ - @JsonProperty(value = "ExcludeKeys", required = true) - private boolean excludeKeys; - - /** - * Get the exportBlobContainerUri value. - * - * @return the exportBlobContainerUri value - */ - public String exportBlobContainerUri() { - return this.exportBlobContainerUri; - } - - /** - * Set the exportBlobContainerUri value. - * - * @param exportBlobContainerUri the exportBlobContainerUri value to set - * @return the ExportDevicesRequestInner object itself. - */ - public ExportDevicesRequestInner withExportBlobContainerUri(String exportBlobContainerUri) { - this.exportBlobContainerUri = exportBlobContainerUri; - return this; - } - - /** - * Get the excludeKeys value. - * - * @return the excludeKeys value - */ - public boolean excludeKeys() { - return this.excludeKeys; - } - - /** - * Set the excludeKeys value. - * - * @param excludeKeys the excludeKeys value to set - * @return the ExportDevicesRequestInner object itself. - */ - public ExportDevicesRequestInner withExcludeKeys(boolean excludeKeys) { - this.excludeKeys = excludeKeys; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ImportDevicesRequestInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ImportDevicesRequestInner.java deleted file mode 100755 index 302f2e6d6c1..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/ImportDevicesRequestInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Use to provide parameters when requesting an import of all devices in the - * hub. - */ -public class ImportDevicesRequestInner { - /** - * The input blob container URI. - */ - @JsonProperty(value = "InputBlobContainerUri", required = true) - private String inputBlobContainerUri; - - /** - * The output blob container URI. - */ - @JsonProperty(value = "OutputBlobContainerUri", required = true) - private String outputBlobContainerUri; - - /** - * Get the inputBlobContainerUri value. - * - * @return the inputBlobContainerUri value - */ - public String inputBlobContainerUri() { - return this.inputBlobContainerUri; - } - - /** - * Set the inputBlobContainerUri value. - * - * @param inputBlobContainerUri the inputBlobContainerUri value to set - * @return the ImportDevicesRequestInner object itself. - */ - public ImportDevicesRequestInner withInputBlobContainerUri(String inputBlobContainerUri) { - this.inputBlobContainerUri = inputBlobContainerUri; - return this; - } - - /** - * Get the outputBlobContainerUri value. - * - * @return the outputBlobContainerUri value - */ - public String outputBlobContainerUri() { - return this.outputBlobContainerUri; - } - - /** - * Set the outputBlobContainerUri value. - * - * @param outputBlobContainerUri the outputBlobContainerUri value to set - * @return the ImportDevicesRequestInner object itself. - */ - public ImportDevicesRequestInner withOutputBlobContainerUri(String outputBlobContainerUri) { - this.outputBlobContainerUri = outputBlobContainerUri; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubClientImpl.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubClientImpl.java deleted file mode 100755 index 706e74f819b..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubClientImpl.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the IotHubClientImpl class. - */ -public class IotHubClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** The subscription identifier. */ - private String subscriptionId; - - /** - * Gets The subscription identifier. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets The subscription identifier. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public IotHubClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** The version of the API. */ - private String apiVersion; - - /** - * Gets The version of the API. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public IotHubClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public IotHubClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public IotHubClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The IotHubResourcesInner object to access its operations. - */ - private IotHubResourcesInner iotHubResources; - - /** - * Gets the IotHubResourcesInner object to access its operations. - * @return the IotHubResourcesInner object. - */ - public IotHubResourcesInner iotHubResources() { - return this.iotHubResources; - } - - /** - * Initializes an instance of IotHubClient client. - * - * @param credentials the management credentials for Azure - */ - public IotHubClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of IotHubClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public IotHubClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of IotHubClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public IotHubClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2017-01-19"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.iotHubResources = new IotHubResourcesInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "IotHubClient", "2017-01-19"); - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubDescriptionInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubDescriptionInner.java deleted file mode 100755 index c9a6d4f317e..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubDescriptionInner.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.azure.management.devices.IotHubProperties; -import com.microsoft.azure.management.devices.IotHubSkuInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; - -/** - * The description of the IoT hub. - */ -public class IotHubDescriptionInner extends Resource { - /** - * The subscription identifier. - */ - @JsonProperty(value = "subscriptionid", required = true) - private String subscriptionid; - - /** - * The name of the resource group that contains the IoT hub. A resource - * group name uniquely identifies the resource group within the - * subscription. - */ - @JsonProperty(value = "resourcegroup", required = true) - private String resourcegroup; - - /** - * The Etag field is *not* required. If it is provided in the response - * body, it must also be provided as a header per the normal ETag - * convention. - */ - @JsonProperty(value = "etag") - private String etag; - - /** - * The properties property. - */ - @JsonProperty(value = "properties") - private IotHubProperties properties; - - /** - * The sku property. - */ - @JsonProperty(value = "sku", required = true) - private IotHubSkuInfo sku; - - /** - * Get the subscriptionid value. - * - * @return the subscriptionid value - */ - public String subscriptionid() { - return this.subscriptionid; - } - - /** - * Set the subscriptionid value. - * - * @param subscriptionid the subscriptionid value to set - * @return the IotHubDescriptionInner object itself. - */ - public IotHubDescriptionInner withSubscriptionid(String subscriptionid) { - this.subscriptionid = subscriptionid; - return this; - } - - /** - * Get the resourcegroup value. - * - * @return the resourcegroup value - */ - public String resourcegroup() { - return this.resourcegroup; - } - - /** - * Set the resourcegroup value. - * - * @param resourcegroup the resourcegroup value to set - * @return the IotHubDescriptionInner object itself. - */ - public IotHubDescriptionInner withResourcegroup(String resourcegroup) { - this.resourcegroup = resourcegroup; - return this; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag value. - * - * @param etag the etag value to set - * @return the IotHubDescriptionInner object itself. - */ - public IotHubDescriptionInner withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public IotHubProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the IotHubDescriptionInner object itself. - */ - public IotHubDescriptionInner withProperties(IotHubProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public IotHubSkuInfo sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the IotHubDescriptionInner object itself. - */ - public IotHubDescriptionInner withSku(IotHubSkuInfo sku) { - this.sku = sku; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubNameAvailabilityInfoInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubNameAvailabilityInfoInner.java deleted file mode 100755 index d3cb2a46b6c..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubNameAvailabilityInfoInner.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.azure.management.devices.IotHubNameUnavailabilityReason; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties indicating whether a given IoT hub name is available. - */ -public class IotHubNameAvailabilityInfoInner { - /** - * The value which indicates whether the provided name is available. - */ - @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean nameAvailable; - - /** - * The reason for unavailability. Possible values include: 'Invalid', - * 'AlreadyExists'. - */ - @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) - private IotHubNameUnavailabilityReason reason; - - /** - * The detailed reason message. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the nameAvailable value. - * - * @return the nameAvailable value - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Get the reason value. - * - * @return the reason value - */ - public IotHubNameUnavailabilityReason reason() { - return this.reason; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the IotHubNameAvailabilityInfoInner object itself. - */ - public IotHubNameAvailabilityInfoInner withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubQuotaMetricInfoInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubQuotaMetricInfoInner.java deleted file mode 100755 index ccf81c7ed7f..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubQuotaMetricInfoInner.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Quota metrics properties. - */ -public class IotHubQuotaMetricInfoInner { - /** - * The name of the quota metric. - */ - @JsonProperty(value = "Name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * The current value for the quota metric. - */ - @JsonProperty(value = "CurrentValue", access = JsonProperty.Access.WRITE_ONLY) - private Long currentValue; - - /** - * The maximum value of the quota metric. - */ - @JsonProperty(value = "MaxValue", access = JsonProperty.Access.WRITE_ONLY) - private Long maxValue; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the currentValue value. - * - * @return the currentValue value - */ - public Long currentValue() { - return this.currentValue; - } - - /** - * Get the maxValue value. - * - * @return the maxValue value - */ - public Long maxValue() { - return this.maxValue; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubResourcesInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubResourcesInner.java deleted file mode 100755 index 4758b1c149b..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubResourcesInner.java +++ /dev/null @@ -1,3187 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.devices.OperationInputs; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in IotHubResources. - */ -public class IotHubResourcesInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private IotHubResourcesService service; - /** The service client containing this operation class. */ - private IotHubClientImpl client; - - /** - * Initializes an instance of IotHubResourcesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public IotHubResourcesInner(Retrofit retrofit, IotHubClientImpl client) { - this.service = retrofit.create(IotHubResourcesService.class); - this.client = client; - } - - /** - * The interface defining all the services for IotHubResources to be - * used by Retrofit to perform actually REST calls. - */ - interface IotHubResourcesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body IotHubDescriptionInner iotHubDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}") - Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body IotHubDescriptionInner iotHubDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listBySubscription" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getStats" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats") - Observable> getStats(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getValidSkus" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus") - Observable> getValidSkus(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listEventHubConsumerGroups" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups") - Observable> listEventHubConsumerGroups(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("eventHubEndpointName") String eventHubEndpointName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getEventHubConsumerGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}") - Observable> getEventHubConsumerGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("eventHubEndpointName") String eventHubEndpointName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources createEventHubConsumerGroup" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}") - Observable> createEventHubConsumerGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("eventHubEndpointName") String eventHubEndpointName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources deleteEventHubConsumerGroup" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}", method = "DELETE", hasBody = true) - Observable> deleteEventHubConsumerGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("eventHubEndpointName") String eventHubEndpointName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listJobs" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs") - Observable> listJobs(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getJob" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}") - Observable> getJob(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("jobId") String jobId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getQuotaMetrics" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics") - Observable> getQuotaMetrics(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources checkNameAvailability" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability") - Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body OperationInputs operationInputs, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys") - Observable> listKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getKeysForKeyName" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys") - Observable> getKeysForKeyName(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("keyName") String keyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources exportDevices" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices") - Observable> exportDevices(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body ExportDevicesRequestInner exportDevicesParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources importDevices" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices") - Observable> importDevices(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body ImportDevicesRequestInner importDevicesParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listBySubscriptionNext" }) - @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getValidSkusNext" }) - @GET - Observable> getValidSkusNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listEventHubConsumerGroupsNext" }) - @GET - Observable> listEventHubConsumerGroupsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listJobsNext" }) - @GET - Observable> listJobsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources getQuotaMetricsNext" }) - @GET - Observable> getQuotaMetricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devices.IotHubResources listKeysNext" }) - @GET - Observable> listKeysNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get the non-security related metadata of an IoT hub. - * Get the non-security related metadata of an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IotHubDescriptionInner object if successful. - */ - public IotHubDescriptionInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); - } - - /** - * Get the non-security related metadata of an IoT hub. - * Get the non-security related metadata of an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); - } - - /** - * Get the non-security related metadata of an IoT hub. - * Get the non-security related metadata of an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IotHubDescriptionInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, IotHubDescriptionInner>() { - @Override - public IotHubDescriptionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get the non-security related metadata of an IoT hub. - * Get the non-security related metadata of an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IotHubDescriptionInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Create or update the metadata of an IoT hub. - * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to create or update. - * @param iotHubDescription The IoT hub metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IotHubDescriptionInner object if successful. - */ - public IotHubDescriptionInner createOrUpdate(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription).toBlocking().last().body(); - } - - /** - * Create or update the metadata of an IoT hub. - * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to create or update. - * @param iotHubDescription The IoT hub metadata and security metadata. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription), serviceCallback); - } - - /** - * Create or update the metadata of an IoT hub. - * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to create or update. - * @param iotHubDescription The IoT hub metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription).map(new Func1, IotHubDescriptionInner>() { - @Override - public IotHubDescriptionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update the metadata of an IoT hub. - * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to create or update. - * @param iotHubDescription The IoT hub metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (iotHubDescription == null) { - throw new IllegalArgumentException("Parameter iotHubDescription is required and cannot be null."); - } - Validator.validate(iotHubDescription); - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), iotHubDescription, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or update the metadata of an IoT hub. - * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to create or update. - * @param iotHubDescription The IoT hub metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IotHubDescriptionInner object if successful. - */ - public IotHubDescriptionInner beginCreateOrUpdate(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription).toBlocking().single().body(); - } - - /** - * Create or update the metadata of an IoT hub. - * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to create or update. - * @param iotHubDescription The IoT hub metadata and security metadata. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription), serviceCallback); - } - - /** - * Create or update the metadata of an IoT hub. - * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to create or update. - * @param iotHubDescription The IoT hub metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IotHubDescriptionInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription).map(new Func1, IotHubDescriptionInner>() { - @Override - public IotHubDescriptionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update the metadata of an IoT hub. - * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to create or update. - * @param iotHubDescription The IoT hub metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IotHubDescriptionInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (iotHubDescription == null) { - throw new IllegalArgumentException("Parameter iotHubDescription is required and cannot be null."); - } - Validator.validate(iotHubDescription); - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), iotHubDescription, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Delete an IoT hub. - * Delete an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the Object object if successful. - */ - public Object delete(String resourceGroupName, String resourceName) { - return deleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); - } - - /** - * Delete an IoT hub. - * Delete an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to delete. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); - } - - /** - * Delete an IoT hub. - * Delete an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete an IoT hub. - * Delete an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete an IoT hub. - * Delete an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the Object object if successful. - */ - public Object beginDelete(String resourceGroupName, String resourceName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); - } - - /** - * Delete an IoT hub. - * Delete an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to delete. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); - } - - /** - * Delete an IoT hub. - * Delete an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable beginDeleteAsync(String resourceGroupName, String resourceName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete an IoT hub. - * Delete an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IotHubDescriptionInner> object if successful. - */ - public PagedList listBySubscription() { - ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubDescriptionInner> object - */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubDescriptionInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync() { - return listBySubscriptionSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IotHubDescriptionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the IoT hubs. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IotHubDescriptionInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the IoT hubs. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the IoT hubs. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubDescriptionInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the IoT hubs. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubDescriptionInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the IoT hubs. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IotHubDescriptionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get the statistics from an IoT hub. - * Get the statistics from an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RegistryStatisticsInner object if successful. - */ - public RegistryStatisticsInner getStats(String resourceGroupName, String resourceName) { - return getStatsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); - } - - /** - * Get the statistics from an IoT hub. - * Get the statistics from an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getStatsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getStatsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); - } - - /** - * Get the statistics from an IoT hub. - * Get the statistics from an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RegistryStatisticsInner object - */ - public Observable getStatsAsync(String resourceGroupName, String resourceName) { - return getStatsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, RegistryStatisticsInner>() { - @Override - public RegistryStatisticsInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get the statistics from an IoT hub. - * Get the statistics from an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RegistryStatisticsInner object - */ - public Observable> getStatsWithServiceResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getStats(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getStatsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getStatsDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IotHubSkuDescriptionInner> object if successful. - */ - public PagedList getValidSkus(final String resourceGroupName, final String resourceName) { - ServiceResponse> response = getValidSkusSinglePageAsync(resourceGroupName, resourceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return getValidSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> getValidSkusAsync(final String resourceGroupName, final String resourceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - getValidSkusSinglePageAsync(resourceGroupName, resourceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getValidSkusNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubSkuDescriptionInner> object - */ - public Observable> getValidSkusAsync(final String resourceGroupName, final String resourceName) { - return getValidSkusWithServiceResponseAsync(resourceGroupName, resourceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubSkuDescriptionInner> object - */ - public Observable>> getValidSkusWithServiceResponseAsync(final String resourceGroupName, final String resourceName) { - return getValidSkusSinglePageAsync(resourceGroupName, resourceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getValidSkusNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the IoT hub. - ServiceResponse> * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IotHubSkuDescriptionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getValidSkusSinglePageAsync(final String resourceGroupName, final String resourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getValidSkus(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getValidSkusDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getValidSkusDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<String> object if successful. - */ - public PagedList listEventHubConsumerGroups(final String resourceGroupName, final String resourceName, final String eventHubEndpointName) { - ServiceResponse> response = listEventHubConsumerGroupsSinglePageAsync(resourceGroupName, resourceName, eventHubEndpointName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listEventHubConsumerGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listEventHubConsumerGroupsAsync(final String resourceGroupName, final String resourceName, final String eventHubEndpointName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listEventHubConsumerGroupsSinglePageAsync(resourceGroupName, resourceName, eventHubEndpointName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listEventHubConsumerGroupsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<String> object - */ - public Observable> listEventHubConsumerGroupsAsync(final String resourceGroupName, final String resourceName, final String eventHubEndpointName) { - return listEventHubConsumerGroupsWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<String> object - */ - public Observable>> listEventHubConsumerGroupsWithServiceResponseAsync(final String resourceGroupName, final String resourceName, final String eventHubEndpointName) { - return listEventHubConsumerGroupsSinglePageAsync(resourceGroupName, resourceName, eventHubEndpointName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listEventHubConsumerGroupsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the IoT hub. - ServiceResponse> * @param resourceName The name of the IoT hub. - ServiceResponse> * @param eventHubEndpointName The name of the Event Hub-compatible endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<String> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listEventHubConsumerGroupsSinglePageAsync(final String resourceGroupName, final String resourceName, final String eventHubEndpointName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (eventHubEndpointName == null) { - throw new IllegalArgumentException("Parameter eventHubEndpointName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listEventHubConsumerGroups(this.client.subscriptionId(), resourceGroupName, resourceName, eventHubEndpointName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listEventHubConsumerGroupsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listEventHubConsumerGroupsDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the EventHubConsumerGroupInfoInner object if successful. - */ - public EventHubConsumerGroupInfoInner getEventHubConsumerGroup(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - return getEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name).toBlocking().single().body(); - } - - /** - * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to retrieve. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name), serviceCallback); - } - - /** - * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EventHubConsumerGroupInfoInner object - */ - public Observable getEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - return getEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name).map(new Func1, EventHubConsumerGroupInfoInner>() { - @Override - public EventHubConsumerGroupInfoInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EventHubConsumerGroupInfoInner object - */ - public Observable> getEventHubConsumerGroupWithServiceResponseAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (eventHubEndpointName == null) { - throw new IllegalArgumentException("Parameter eventHubEndpointName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getEventHubConsumerGroup(this.client.subscriptionId(), resourceGroupName, resourceName, eventHubEndpointName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getEventHubConsumerGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getEventHubConsumerGroupDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to add. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the EventHubConsumerGroupInfoInner object if successful. - */ - public EventHubConsumerGroupInfoInner createEventHubConsumerGroup(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - return createEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name).toBlocking().single().body(); - } - - /** - * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to add. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name), serviceCallback); - } - - /** - * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to add. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EventHubConsumerGroupInfoInner object - */ - public Observable createEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - return createEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name).map(new Func1, EventHubConsumerGroupInfoInner>() { - @Override - public EventHubConsumerGroupInfoInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to add. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EventHubConsumerGroupInfoInner object - */ - public Observable> createEventHubConsumerGroupWithServiceResponseAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (eventHubEndpointName == null) { - throw new IllegalArgumentException("Parameter eventHubEndpointName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.createEventHubConsumerGroup(this.client.subscriptionId(), resourceGroupName, resourceName, eventHubEndpointName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createEventHubConsumerGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createEventHubConsumerGroupDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteEventHubConsumerGroup(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - deleteEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name).toBlocking().single().body(); - } - - /** - * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to delete. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name), serviceCallback); - } - - /** - * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - return deleteEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub. - * @param name The name of the consumer group to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteEventHubConsumerGroupWithServiceResponseAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (eventHubEndpointName == null) { - throw new IllegalArgumentException("Parameter eventHubEndpointName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteEventHubConsumerGroup(this.client.subscriptionId(), resourceGroupName, resourceName, eventHubEndpointName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteEventHubConsumerGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteEventHubConsumerGroupDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobResponseInner> object if successful. - */ - public PagedList listJobs(final String resourceGroupName, final String resourceName) { - ServiceResponse> response = listJobsSinglePageAsync(resourceGroupName, resourceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listJobsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listJobsAsync(final String resourceGroupName, final String resourceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listJobsSinglePageAsync(resourceGroupName, resourceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listJobsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobResponseInner> object - */ - public Observable> listJobsAsync(final String resourceGroupName, final String resourceName) { - return listJobsWithServiceResponseAsync(resourceGroupName, resourceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobResponseInner> object - */ - public Observable>> listJobsWithServiceResponseAsync(final String resourceGroupName, final String resourceName) { - return listJobsSinglePageAsync(resourceGroupName, resourceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listJobsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the IoT hub. - ServiceResponse> * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobResponseInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listJobsSinglePageAsync(final String resourceGroupName, final String resourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listJobs(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listJobsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listJobsDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param jobId The job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobResponseInner object if successful. - */ - public JobResponseInner getJob(String resourceGroupName, String resourceName, String jobId) { - return getJobWithServiceResponseAsync(resourceGroupName, resourceName, jobId).toBlocking().single().body(); - } - - /** - * Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param jobId The job identifier. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getJobAsync(String resourceGroupName, String resourceName, String jobId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getJobWithServiceResponseAsync(resourceGroupName, resourceName, jobId), serviceCallback); - } - - /** - * Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param jobId The job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobResponseInner object - */ - public Observable getJobAsync(String resourceGroupName, String resourceName, String jobId) { - return getJobWithServiceResponseAsync(resourceGroupName, resourceName, jobId).map(new Func1, JobResponseInner>() { - @Override - public JobResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param jobId The job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobResponseInner object - */ - public Observable> getJobWithServiceResponseAsync(String resourceGroupName, String resourceName, String jobId) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (jobId == null) { - throw new IllegalArgumentException("Parameter jobId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getJob(this.client.subscriptionId(), resourceGroupName, resourceName, jobId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getJobDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getJobDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IotHubQuotaMetricInfoInner> object if successful. - */ - public PagedList getQuotaMetrics(final String resourceGroupName, final String resourceName) { - ServiceResponse> response = getQuotaMetricsSinglePageAsync(resourceGroupName, resourceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return getQuotaMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> getQuotaMetricsAsync(final String resourceGroupName, final String resourceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - getQuotaMetricsSinglePageAsync(resourceGroupName, resourceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getQuotaMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubQuotaMetricInfoInner> object - */ - public Observable> getQuotaMetricsAsync(final String resourceGroupName, final String resourceName) { - return getQuotaMetricsWithServiceResponseAsync(resourceGroupName, resourceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubQuotaMetricInfoInner> object - */ - public Observable>> getQuotaMetricsWithServiceResponseAsync(final String resourceGroupName, final String resourceName) { - return getQuotaMetricsSinglePageAsync(resourceGroupName, resourceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getQuotaMetricsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the IoT hub. - ServiceResponse> * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IotHubQuotaMetricInfoInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getQuotaMetricsSinglePageAsync(final String resourceGroupName, final String resourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getQuotaMetrics(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getQuotaMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getQuotaMetricsDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Check if an IoT hub name is available. - * Check if an IoT hub name is available. - * - * @param name The name of the IoT hub to check. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IotHubNameAvailabilityInfoInner object if successful. - */ - public IotHubNameAvailabilityInfoInner checkNameAvailability(String name) { - return checkNameAvailabilityWithServiceResponseAsync(name).toBlocking().single().body(); - } - - /** - * Check if an IoT hub name is available. - * Check if an IoT hub name is available. - * - * @param name The name of the IoT hub to check. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkNameAvailabilityAsync(String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback); - } - - /** - * Check if an IoT hub name is available. - * Check if an IoT hub name is available. - * - * @param name The name of the IoT hub to check. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IotHubNameAvailabilityInfoInner object - */ - public Observable checkNameAvailabilityAsync(String name) { - return checkNameAvailabilityWithServiceResponseAsync(name).map(new Func1, IotHubNameAvailabilityInfoInner>() { - @Override - public IotHubNameAvailabilityInfoInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Check if an IoT hub name is available. - * Check if an IoT hub name is available. - * - * @param name The name of the IoT hub to check. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IotHubNameAvailabilityInfoInner object - */ - public Observable> checkNameAvailabilityWithServiceResponseAsync(String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - OperationInputs operationInputs = new OperationInputs(); - operationInputs.withName(name); - return service.checkNameAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), operationInputs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkNameAvailabilityDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SharedAccessSignatureAuthorizationRuleInner> object if successful. - */ - public PagedList listKeys(final String resourceGroupName, final String resourceName) { - ServiceResponse> response = listKeysSinglePageAsync(resourceGroupName, resourceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listKeysNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listKeysAsync(final String resourceGroupName, final String resourceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listKeysSinglePageAsync(resourceGroupName, resourceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listKeysNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessSignatureAuthorizationRuleInner> object - */ - public Observable> listKeysAsync(final String resourceGroupName, final String resourceName) { - return listKeysWithServiceResponseAsync(resourceGroupName, resourceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessSignatureAuthorizationRuleInner> object - */ - public Observable>> listKeysWithServiceResponseAsync(final String resourceGroupName, final String resourceName) { - return listKeysSinglePageAsync(resourceGroupName, resourceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listKeysNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the IoT hub. - ServiceResponse> * @param resourceName The name of the IoT hub. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SharedAccessSignatureAuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listKeysSinglePageAsync(final String resourceGroupName, final String resourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listKeysDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listKeysDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param keyName The name of the shared access policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SharedAccessSignatureAuthorizationRuleInner object if successful. - */ - public SharedAccessSignatureAuthorizationRuleInner getKeysForKeyName(String resourceGroupName, String resourceName, String keyName) { - return getKeysForKeyNameWithServiceResponseAsync(resourceGroupName, resourceName, keyName).toBlocking().single().body(); - } - - /** - * Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param keyName The name of the shared access policy. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getKeysForKeyNameAsync(String resourceGroupName, String resourceName, String keyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getKeysForKeyNameWithServiceResponseAsync(resourceGroupName, resourceName, keyName), serviceCallback); - } - - /** - * Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param keyName The name of the shared access policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessSignatureAuthorizationRuleInner object - */ - public Observable getKeysForKeyNameAsync(String resourceGroupName, String resourceName, String keyName) { - return getKeysForKeyNameWithServiceResponseAsync(resourceGroupName, resourceName, keyName).map(new Func1, SharedAccessSignatureAuthorizationRuleInner>() { - @Override - public SharedAccessSignatureAuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param keyName The name of the shared access policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessSignatureAuthorizationRuleInner object - */ - public Observable> getKeysForKeyNameWithServiceResponseAsync(String resourceGroupName, String resourceName, String keyName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (keyName == null) { - throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getKeysForKeyName(this.client.subscriptionId(), resourceGroupName, resourceName, keyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getKeysForKeyNameDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getKeysForKeyNameDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param exportDevicesParameters The parameters that specify the export devices operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobResponseInner object if successful. - */ - public JobResponseInner exportDevices(String resourceGroupName, String resourceName, ExportDevicesRequestInner exportDevicesParameters) { - return exportDevicesWithServiceResponseAsync(resourceGroupName, resourceName, exportDevicesParameters).toBlocking().single().body(); - } - - /** - * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param exportDevicesParameters The parameters that specify the export devices operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture exportDevicesAsync(String resourceGroupName, String resourceName, ExportDevicesRequestInner exportDevicesParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(exportDevicesWithServiceResponseAsync(resourceGroupName, resourceName, exportDevicesParameters), serviceCallback); - } - - /** - * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param exportDevicesParameters The parameters that specify the export devices operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobResponseInner object - */ - public Observable exportDevicesAsync(String resourceGroupName, String resourceName, ExportDevicesRequestInner exportDevicesParameters) { - return exportDevicesWithServiceResponseAsync(resourceGroupName, resourceName, exportDevicesParameters).map(new Func1, JobResponseInner>() { - @Override - public JobResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param exportDevicesParameters The parameters that specify the export devices operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobResponseInner object - */ - public Observable> exportDevicesWithServiceResponseAsync(String resourceGroupName, String resourceName, ExportDevicesRequestInner exportDevicesParameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (exportDevicesParameters == null) { - throw new IllegalArgumentException("Parameter exportDevicesParameters is required and cannot be null."); - } - Validator.validate(exportDevicesParameters); - return service.exportDevices(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), exportDevicesParameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = exportDevicesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse exportDevicesDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param importDevicesParameters The parameters that specify the import devices operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobResponseInner object if successful. - */ - public JobResponseInner importDevices(String resourceGroupName, String resourceName, ImportDevicesRequestInner importDevicesParameters) { - return importDevicesWithServiceResponseAsync(resourceGroupName, resourceName, importDevicesParameters).toBlocking().single().body(); - } - - /** - * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param importDevicesParameters The parameters that specify the import devices operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture importDevicesAsync(String resourceGroupName, String resourceName, ImportDevicesRequestInner importDevicesParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(importDevicesWithServiceResponseAsync(resourceGroupName, resourceName, importDevicesParameters), serviceCallback); - } - - /** - * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param importDevicesParameters The parameters that specify the import devices operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobResponseInner object - */ - public Observable importDevicesAsync(String resourceGroupName, String resourceName, ImportDevicesRequestInner importDevicesParameters) { - return importDevicesWithServiceResponseAsync(resourceGroupName, resourceName, importDevicesParameters).map(new Func1, JobResponseInner>() { - @Override - public JobResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - * - * @param resourceGroupName The name of the resource group that contains the IoT hub. - * @param resourceName The name of the IoT hub. - * @param importDevicesParameters The parameters that specify the import devices operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobResponseInner object - */ - public Observable> importDevicesWithServiceResponseAsync(String resourceGroupName, String resourceName, ImportDevicesRequestInner importDevicesParameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (resourceName == null) { - throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (importDevicesParameters == null) { - throw new IllegalArgumentException("Parameter importDevicesParameters is required and cannot be null."); - } - Validator.validate(importDevicesParameters); - return service.importDevices(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), importDevicesParameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = importDevicesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse importDevicesDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IotHubDescriptionInner> object if successful. - */ - public PagedList listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubDescriptionInner> object - */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubDescriptionInner> object - */ - public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all the IoT hubs in a subscription. - * Get all the IoT hubs in a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IotHubDescriptionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IotHubDescriptionInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubDescriptionInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubDescriptionInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all the IoT hubs in a resource group. - * Get all the IoT hubs in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IotHubDescriptionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IotHubSkuDescriptionInner> object if successful. - */ - public PagedList getValidSkusNext(final String nextPageLink) { - ServiceResponse> response = getValidSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return getValidSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> getValidSkusNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - getValidSkusNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getValidSkusNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubSkuDescriptionInner> object - */ - public Observable> getValidSkusNextAsync(final String nextPageLink) { - return getValidSkusNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubSkuDescriptionInner> object - */ - public Observable>> getValidSkusNextWithServiceResponseAsync(final String nextPageLink) { - return getValidSkusNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getValidSkusNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the list of valid SKUs for an IoT hub. - * Get the list of valid SKUs for an IoT hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IotHubSkuDescriptionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getValidSkusNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.getValidSkusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getValidSkusNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getValidSkusNextDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<String> object if successful. - */ - public PagedList listEventHubConsumerGroupsNext(final String nextPageLink) { - ServiceResponse> response = listEventHubConsumerGroupsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listEventHubConsumerGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listEventHubConsumerGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listEventHubConsumerGroupsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listEventHubConsumerGroupsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<String> object - */ - public Observable> listEventHubConsumerGroupsNextAsync(final String nextPageLink) { - return listEventHubConsumerGroupsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<String> object - */ - public Observable>> listEventHubConsumerGroupsNextWithServiceResponseAsync(final String nextPageLink) { - return listEventHubConsumerGroupsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listEventHubConsumerGroupsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<String> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listEventHubConsumerGroupsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listEventHubConsumerGroupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listEventHubConsumerGroupsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listEventHubConsumerGroupsNextDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobResponseInner> object if successful. - */ - public PagedList listJobsNext(final String nextPageLink) { - ServiceResponse> response = listJobsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listJobsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listJobsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listJobsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listJobsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobResponseInner> object - */ - public Observable> listJobsNextAsync(final String nextPageLink) { - return listJobsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobResponseInner> object - */ - public Observable>> listJobsNextWithServiceResponseAsync(final String nextPageLink) { - return listJobsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listJobsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobResponseInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listJobsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listJobsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listJobsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listJobsNextDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IotHubQuotaMetricInfoInner> object if successful. - */ - public PagedList getQuotaMetricsNext(final String nextPageLink) { - ServiceResponse> response = getQuotaMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return getQuotaMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> getQuotaMetricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - getQuotaMetricsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getQuotaMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubQuotaMetricInfoInner> object - */ - public Observable> getQuotaMetricsNextAsync(final String nextPageLink) { - return getQuotaMetricsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IotHubQuotaMetricInfoInner> object - */ - public Observable>> getQuotaMetricsNextWithServiceResponseAsync(final String nextPageLink) { - return getQuotaMetricsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getQuotaMetricsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the quota metrics for an IoT hub. - * Get the quota metrics for an IoT hub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IotHubQuotaMetricInfoInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getQuotaMetricsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.getQuotaMetricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getQuotaMetricsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getQuotaMetricsNextDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorDetailsInnerException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SharedAccessSignatureAuthorizationRuleInner> object if successful. - */ - public PagedList listKeysNext(final String nextPageLink) { - ServiceResponse> response = listKeysNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listKeysNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listKeysNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listKeysNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listKeysNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessSignatureAuthorizationRuleInner> object - */ - public Observable> listKeysNextAsync(final String nextPageLink) { - return listKeysNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessSignatureAuthorizationRuleInner> object - */ - public Observable>> listKeysNextWithServiceResponseAsync(final String nextPageLink) { - return listKeysNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listKeysNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SharedAccessSignatureAuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listKeysNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listKeysNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listKeysNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listKeysNextDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorDetailsInnerException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorDetailsInnerException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubSkuDescriptionInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubSkuDescriptionInner.java deleted file mode 100755 index 434cdc63d74..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/IotHubSkuDescriptionInner.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.azure.management.devices.IotHubSkuInfo; -import com.microsoft.azure.management.devices.IotHubCapacity; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * SKU properties. - */ -public class IotHubSkuDescriptionInner { - /** - * The type of the resource. - */ - @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) - private String resourceType; - - /** - * The sku property. - */ - @JsonProperty(value = "sku", required = true) - private IotHubSkuInfo sku; - - /** - * The capacity property. - */ - @JsonProperty(value = "capacity", required = true) - private IotHubCapacity capacity; - - /** - * Get the resourceType value. - * - * @return the resourceType value - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public IotHubSkuInfo sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the IotHubSkuDescriptionInner object itself. - */ - public IotHubSkuDescriptionInner withSku(IotHubSkuInfo sku) { - this.sku = sku; - return this; - } - - /** - * Get the capacity value. - * - * @return the capacity value - */ - public IotHubCapacity capacity() { - return this.capacity; - } - - /** - * Set the capacity value. - * - * @param capacity the capacity value to set - * @return the IotHubSkuDescriptionInner object itself. - */ - public IotHubSkuDescriptionInner withCapacity(IotHubCapacity capacity) { - this.capacity = capacity; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/JobResponseInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/JobResponseInner.java deleted file mode 100755 index 4f7ee743062..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/JobResponseInner.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.rest.DateTimeRfc1123; -import org.joda.time.DateTime; -import com.microsoft.azure.management.devices.JobType; -import com.microsoft.azure.management.devices.JobStatus; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the Job Response object. - */ -public class JobResponseInner { - /** - * The job identifier. - */ - @JsonProperty(value = "jobId", access = JsonProperty.Access.WRITE_ONLY) - private String jobId; - - /** - * The start time of the job. - */ - @JsonProperty(value = "startTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTimeRfc1123 startTimeUtc; - - /** - * The time the job stopped processing. - */ - @JsonProperty(value = "endTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTimeRfc1123 endTimeUtc; - - /** - * The type of the job. Possible values include: 'unknown', 'export', - * 'import', 'backup', 'readDeviceProperties', 'writeDeviceProperties', - * 'updateDeviceConfiguration', 'rebootDevice', 'factoryResetDevice', - * 'firmwareUpdate'. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private JobType type; - - /** - * The status of the job. Possible values include: 'unknown', 'enqueued', - * 'running', 'completed', 'failed', 'cancelled'. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private JobStatus status; - - /** - * If status == failed, this string containing the reason for the failure. - */ - @JsonProperty(value = "failureReason", access = JsonProperty.Access.WRITE_ONLY) - private String failureReason; - - /** - * The status message for the job. - */ - @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) - private String statusMessage; - - /** - * The job identifier of the parent job, if any. - */ - @JsonProperty(value = "parentJobId", access = JsonProperty.Access.WRITE_ONLY) - private String parentJobId; - - /** - * Get the jobId value. - * - * @return the jobId value - */ - public String jobId() { - return this.jobId; - } - - /** - * Get the startTimeUtc value. - * - * @return the startTimeUtc value - */ - public DateTime startTimeUtc() { - if (this.startTimeUtc == null) { - return null; - } - return this.startTimeUtc.dateTime(); - } - - /** - * Get the endTimeUtc value. - * - * @return the endTimeUtc value - */ - public DateTime endTimeUtc() { - if (this.endTimeUtc == null) { - return null; - } - return this.endTimeUtc.dateTime(); - } - - /** - * Get the type value. - * - * @return the type value - */ - public JobType type() { - return this.type; - } - - /** - * Get the status value. - * - * @return the status value - */ - public JobStatus status() { - return this.status; - } - - /** - * Get the failureReason value. - * - * @return the failureReason value - */ - public String failureReason() { - return this.failureReason; - } - - /** - * Get the statusMessage value. - * - * @return the statusMessage value - */ - public String statusMessage() { - return this.statusMessage; - } - - /** - * Get the parentJobId value. - * - * @return the parentJobId value - */ - public String parentJobId() { - return this.parentJobId; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/PageImpl.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/PageImpl.java deleted file mode 100755 index b04580beb46..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/PageImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/RegistryStatisticsInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/RegistryStatisticsInner.java deleted file mode 100755 index 365805e24a1..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/RegistryStatisticsInner.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Identity registry statistics. - */ -public class RegistryStatisticsInner { - /** - * The total count of devices in the identity registry. - */ - @JsonProperty(value = "totalDeviceCount", access = JsonProperty.Access.WRITE_ONLY) - private Long totalDeviceCount; - - /** - * The count of enabled devices in the identity registry. - */ - @JsonProperty(value = "enabledDeviceCount", access = JsonProperty.Access.WRITE_ONLY) - private Long enabledDeviceCount; - - /** - * The count of disabled devices in the identity registry. - */ - @JsonProperty(value = "disabledDeviceCount", access = JsonProperty.Access.WRITE_ONLY) - private Long disabledDeviceCount; - - /** - * Get the totalDeviceCount value. - * - * @return the totalDeviceCount value - */ - public Long totalDeviceCount() { - return this.totalDeviceCount; - } - - /** - * Get the enabledDeviceCount value. - * - * @return the enabledDeviceCount value - */ - public Long enabledDeviceCount() { - return this.enabledDeviceCount; - } - - /** - * Get the disabledDeviceCount value. - * - * @return the disabledDeviceCount value - */ - public Long disabledDeviceCount() { - return this.disabledDeviceCount; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/SharedAccessSignatureAuthorizationRuleInner.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/SharedAccessSignatureAuthorizationRuleInner.java deleted file mode 100755 index 391aba1a6e1..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/SharedAccessSignatureAuthorizationRuleInner.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -package com.microsoft.azure.management.devices.implementation; - -import com.microsoft.azure.management.devices.AccessRights; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of an IoT hub shared access policy. - */ -public class SharedAccessSignatureAuthorizationRuleInner { - /** - * The name of the shared access policy. - */ - @JsonProperty(value = "keyName", required = true) - private String keyName; - - /** - * The primary key. - */ - @JsonProperty(value = "primaryKey") - private String primaryKey; - - /** - * The secondary key. - */ - @JsonProperty(value = "secondaryKey") - private String secondaryKey; - - /** - * The permissions assigned to the shared access policy. Possible values - * include: 'RegistryRead', 'RegistryWrite', 'ServiceConnect', - * 'DeviceConnect', 'RegistryRead, RegistryWrite', 'RegistryRead, - * ServiceConnect', 'RegistryRead, DeviceConnect', 'RegistryWrite, - * ServiceConnect', 'RegistryWrite, DeviceConnect', 'ServiceConnect, - * DeviceConnect', 'RegistryRead, RegistryWrite, ServiceConnect', - * 'RegistryRead, RegistryWrite, DeviceConnect', 'RegistryRead, - * ServiceConnect, DeviceConnect', 'RegistryWrite, ServiceConnect, - * DeviceConnect', 'RegistryRead, RegistryWrite, ServiceConnect, - * DeviceConnect'. - */ - @JsonProperty(value = "rights", required = true) - private AccessRights rights; - - /** - * Get the keyName value. - * - * @return the keyName value - */ - public String keyName() { - return this.keyName; - } - - /** - * Set the keyName value. - * - * @param keyName the keyName value to set - * @return the SharedAccessSignatureAuthorizationRuleInner object itself. - */ - public SharedAccessSignatureAuthorizationRuleInner withKeyName(String keyName) { - this.keyName = keyName; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the SharedAccessSignatureAuthorizationRuleInner object itself. - */ - public SharedAccessSignatureAuthorizationRuleInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the SharedAccessSignatureAuthorizationRuleInner object itself. - */ - public SharedAccessSignatureAuthorizationRuleInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Get the rights value. - * - * @return the rights value - */ - public AccessRights rights() { - return this.rights; - } - - /** - * Set the rights value. - * - * @param rights the rights value to set - * @return the SharedAccessSignatureAuthorizationRuleInner object itself. - */ - public SharedAccessSignatureAuthorizationRuleInner withRights(AccessRights rights) { - this.rights = rights; - return this; - } - -} diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/package-info.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/package-info.java deleted file mode 100755 index 9e872585d47..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/implementation/package-info.java +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -/** - * This package contains the implementation classes for IotHubClient. - * Use this API to manage the IoT hubs in your Azure subscription. - */ -package com.microsoft.azure.management.devices.implementation; diff --git a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/package-info.java b/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/package-info.java deleted file mode 100755 index 71746b4ea2f..00000000000 --- a/azure-mgmt-devices/src/main/java/com/microsoft/azure/management/devices/package-info.java +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -/** - * This package contains the classes for IotHubClient. - * Use this API to manage the IoT hubs in your Azure subscription. - */ -package com.microsoft.azure.management.devices; diff --git a/azure-mgmt-devtestlab/pom.xml b/azure-mgmt-devtestlab/pom.xml deleted file mode 100644 index c2ed709ecce..00000000000 --- a/azure-mgmt-devtestlab/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-devtestlab - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for DevTestLab Management - This package contains Microsoft DevTestLab Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ApplyArtifactsRequest.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ApplyArtifactsRequest.java deleted file mode 100644 index af00e28b52a..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ApplyArtifactsRequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.implementation.ArtifactInstallPropertiesInner; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Request body for applying artifacts to a virtual machine. - */ -public class ApplyArtifactsRequest { - /** - * The list of artifacts to apply. - */ - @JsonProperty(value = "artifacts") - private List artifacts; - - /** - * Get the artifacts value. - * - * @return the artifacts value - */ - public List artifacts() { - return this.artifacts; - } - - /** - * Set the artifacts value. - * - * @param artifacts the artifacts value to set - * @return the ApplyArtifactsRequest object itself. - */ - public ApplyArtifactsRequest withArtifacts(List artifacts) { - this.artifacts = artifacts; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArmTemplateParameterProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArmTemplateParameterProperties.java deleted file mode 100644 index 1221e0b6a8d..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArmTemplateParameterProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an Azure Resource Manager template parameter. - */ -public class ArmTemplateParameterProperties { - /** - * The name of the template parameter. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The value of the template parameter. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ArmTemplateParameterProperties object itself. - */ - public ArmTemplateParameterProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the ArmTemplateParameterProperties object itself. - */ - public ArmTemplateParameterProperties withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactDeploymentStatusProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactDeploymentStatusProperties.java deleted file mode 100644 index 8bce9211c91..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactDeploymentStatusProperties.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an artifact deployment. - */ -public class ArtifactDeploymentStatusProperties { - /** - * The deployment status of the artifact. - */ - @JsonProperty(value = "deploymentStatus") - private String deploymentStatus; - - /** - * The total count of the artifacts that were successfully applied. - */ - @JsonProperty(value = "artifactsApplied") - private Integer artifactsApplied; - - /** - * The total count of the artifacts that were tentatively applied. - */ - @JsonProperty(value = "totalArtifacts") - private Integer totalArtifacts; - - /** - * Get the deploymentStatus value. - * - * @return the deploymentStatus value - */ - public String deploymentStatus() { - return this.deploymentStatus; - } - - /** - * Set the deploymentStatus value. - * - * @param deploymentStatus the deploymentStatus value to set - * @return the ArtifactDeploymentStatusProperties object itself. - */ - public ArtifactDeploymentStatusProperties withDeploymentStatus(String deploymentStatus) { - this.deploymentStatus = deploymentStatus; - return this; - } - - /** - * Get the artifactsApplied value. - * - * @return the artifactsApplied value - */ - public Integer artifactsApplied() { - return this.artifactsApplied; - } - - /** - * Set the artifactsApplied value. - * - * @param artifactsApplied the artifactsApplied value to set - * @return the ArtifactDeploymentStatusProperties object itself. - */ - public ArtifactDeploymentStatusProperties withArtifactsApplied(Integer artifactsApplied) { - this.artifactsApplied = artifactsApplied; - return this; - } - - /** - * Get the totalArtifacts value. - * - * @return the totalArtifacts value - */ - public Integer totalArtifacts() { - return this.totalArtifacts; - } - - /** - * Set the totalArtifacts value. - * - * @param totalArtifacts the totalArtifacts value to set - * @return the ArtifactDeploymentStatusProperties object itself. - */ - public ArtifactDeploymentStatusProperties withTotalArtifacts(Integer totalArtifacts) { - this.totalArtifacts = totalArtifacts; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactDeploymentStatusPropertiesFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactDeploymentStatusPropertiesFragment.java deleted file mode 100644 index 05f6a6da423..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactDeploymentStatusPropertiesFragment.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an artifact deployment. - */ -public class ArtifactDeploymentStatusPropertiesFragment { - /** - * The deployment status of the artifact. - */ - @JsonProperty(value = "deploymentStatus") - private String deploymentStatus; - - /** - * The total count of the artifacts that were successfully applied. - */ - @JsonProperty(value = "artifactsApplied") - private Integer artifactsApplied; - - /** - * The total count of the artifacts that were tentatively applied. - */ - @JsonProperty(value = "totalArtifacts") - private Integer totalArtifacts; - - /** - * Get the deploymentStatus value. - * - * @return the deploymentStatus value - */ - public String deploymentStatus() { - return this.deploymentStatus; - } - - /** - * Set the deploymentStatus value. - * - * @param deploymentStatus the deploymentStatus value to set - * @return the ArtifactDeploymentStatusPropertiesFragment object itself. - */ - public ArtifactDeploymentStatusPropertiesFragment withDeploymentStatus(String deploymentStatus) { - this.deploymentStatus = deploymentStatus; - return this; - } - - /** - * Get the artifactsApplied value. - * - * @return the artifactsApplied value - */ - public Integer artifactsApplied() { - return this.artifactsApplied; - } - - /** - * Set the artifactsApplied value. - * - * @param artifactsApplied the artifactsApplied value to set - * @return the ArtifactDeploymentStatusPropertiesFragment object itself. - */ - public ArtifactDeploymentStatusPropertiesFragment withArtifactsApplied(Integer artifactsApplied) { - this.artifactsApplied = artifactsApplied; - return this; - } - - /** - * Get the totalArtifacts value. - * - * @return the totalArtifacts value - */ - public Integer totalArtifacts() { - return this.totalArtifacts; - } - - /** - * Set the totalArtifacts value. - * - * @param totalArtifacts the totalArtifacts value to set - * @return the ArtifactDeploymentStatusPropertiesFragment object itself. - */ - public ArtifactDeploymentStatusPropertiesFragment withTotalArtifacts(Integer totalArtifacts) { - this.totalArtifacts = totalArtifacts; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactInstallPropertiesFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactInstallPropertiesFragment.java deleted file mode 100644 index 539b818038c..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactInstallPropertiesFragment.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an artifact. - */ -public class ArtifactInstallPropertiesFragment { - /** - * The artifact's identifier. - */ - @JsonProperty(value = "artifactId") - private String artifactId; - - /** - * The parameters of the artifact. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * The status of the artifact. - */ - @JsonProperty(value = "status") - private String status; - - /** - * The status message from the deployment. - */ - @JsonProperty(value = "deploymentStatusMessage") - private String deploymentStatusMessage; - - /** - * The status message from the virtual machine extension. - */ - @JsonProperty(value = "vmExtensionStatusMessage") - private String vmExtensionStatusMessage; - - /** - * The time that the artifact starts to install on the virtual machine. - */ - @JsonProperty(value = "installTime") - private DateTime installTime; - - /** - * Get the artifactId value. - * - * @return the artifactId value - */ - public String artifactId() { - return this.artifactId; - } - - /** - * Set the artifactId value. - * - * @param artifactId the artifactId value to set - * @return the ArtifactInstallPropertiesFragment object itself. - */ - public ArtifactInstallPropertiesFragment withArtifactId(String artifactId) { - this.artifactId = artifactId; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the ArtifactInstallPropertiesFragment object itself. - */ - public ArtifactInstallPropertiesFragment withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public String status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the ArtifactInstallPropertiesFragment object itself. - */ - public ArtifactInstallPropertiesFragment withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the deploymentStatusMessage value. - * - * @return the deploymentStatusMessage value - */ - public String deploymentStatusMessage() { - return this.deploymentStatusMessage; - } - - /** - * Set the deploymentStatusMessage value. - * - * @param deploymentStatusMessage the deploymentStatusMessage value to set - * @return the ArtifactInstallPropertiesFragment object itself. - */ - public ArtifactInstallPropertiesFragment withDeploymentStatusMessage(String deploymentStatusMessage) { - this.deploymentStatusMessage = deploymentStatusMessage; - return this; - } - - /** - * Get the vmExtensionStatusMessage value. - * - * @return the vmExtensionStatusMessage value - */ - public String vmExtensionStatusMessage() { - return this.vmExtensionStatusMessage; - } - - /** - * Set the vmExtensionStatusMessage value. - * - * @param vmExtensionStatusMessage the vmExtensionStatusMessage value to set - * @return the ArtifactInstallPropertiesFragment object itself. - */ - public ArtifactInstallPropertiesFragment withVmExtensionStatusMessage(String vmExtensionStatusMessage) { - this.vmExtensionStatusMessage = vmExtensionStatusMessage; - return this; - } - - /** - * Get the installTime value. - * - * @return the installTime value - */ - public DateTime installTime() { - return this.installTime; - } - - /** - * Set the installTime value. - * - * @param installTime the installTime value to set - * @return the ArtifactInstallPropertiesFragment object itself. - */ - public ArtifactInstallPropertiesFragment withInstallTime(DateTime installTime) { - this.installTime = installTime; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactParameterProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactParameterProperties.java deleted file mode 100644 index a834b6d5526..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactParameterProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an artifact parameter. - */ -public class ArtifactParameterProperties { - /** - * The name of the artifact parameter. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The value of the artifact parameter. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ArtifactParameterProperties object itself. - */ - public ArtifactParameterProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the ArtifactParameterProperties object itself. - */ - public ArtifactParameterProperties withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactParameterPropertiesFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactParameterPropertiesFragment.java deleted file mode 100644 index d8c0128bbb2..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ArtifactParameterPropertiesFragment.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an artifact parameter. - */ -public class ArtifactParameterPropertiesFragment { - /** - * The name of the artifact parameter. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The value of the artifact parameter. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ArtifactParameterPropertiesFragment object itself. - */ - public ArtifactParameterPropertiesFragment withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the ArtifactParameterPropertiesFragment object itself. - */ - public ArtifactParameterPropertiesFragment withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/AttachDiskProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/AttachDiskProperties.java deleted file mode 100644 index 1bedf67c75a..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/AttachDiskProperties.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of the disk to attach. - */ -public class AttachDiskProperties { - /** - * The resource ID of the Lab virtual machine to which the disk is - * attached. - */ - @JsonProperty(value = "leasedByLabVmId") - private String leasedByLabVmId; - - /** - * Get the leasedByLabVmId value. - * - * @return the leasedByLabVmId value - */ - public String leasedByLabVmId() { - return this.leasedByLabVmId; - } - - /** - * Set the leasedByLabVmId value. - * - * @param leasedByLabVmId the leasedByLabVmId value to set - * @return the AttachDiskProperties object itself. - */ - public AttachDiskProperties withLeasedByLabVmId(String leasedByLabVmId) { - this.leasedByLabVmId = leasedByLabVmId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/AttachNewDataDiskOptions.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/AttachNewDataDiskOptions.java deleted file mode 100644 index 3d2322b9311..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/AttachNewDataDiskOptions.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties to attach new disk to the Virtual Machine. - */ -public class AttachNewDataDiskOptions { - /** - * Size of the disk to be attached in GibiBytes. - */ - @JsonProperty(value = "diskSizeGiB") - private Integer diskSizeGiB; - - /** - * The name of the disk to be attached. - */ - @JsonProperty(value = "diskName") - private String diskName; - - /** - * The storage type for the disk (i.e. Standard, Premium). Possible values - * include: 'Standard', 'Premium'. - */ - @JsonProperty(value = "diskType") - private StorageType diskType; - - /** - * Get the diskSizeGiB value. - * - * @return the diskSizeGiB value - */ - public Integer diskSizeGiB() { - return this.diskSizeGiB; - } - - /** - * Set the diskSizeGiB value. - * - * @param diskSizeGiB the diskSizeGiB value to set - * @return the AttachNewDataDiskOptions object itself. - */ - public AttachNewDataDiskOptions withDiskSizeGiB(Integer diskSizeGiB) { - this.diskSizeGiB = diskSizeGiB; - return this; - } - - /** - * Get the diskName value. - * - * @return the diskName value - */ - public String diskName() { - return this.diskName; - } - - /** - * Set the diskName value. - * - * @param diskName the diskName value to set - * @return the AttachNewDataDiskOptions object itself. - */ - public AttachNewDataDiskOptions withDiskName(String diskName) { - this.diskName = diskName; - return this; - } - - /** - * Get the diskType value. - * - * @return the diskType value - */ - public StorageType diskType() { - return this.diskType; - } - - /** - * Set the diskType value. - * - * @param diskType the diskType value to set - * @return the AttachNewDataDiskOptions object itself. - */ - public AttachNewDataDiskOptions withDiskType(StorageType diskType) { - this.diskType = diskType; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/BulkCreationParameters.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/BulkCreationParameters.java deleted file mode 100644 index 09a07fa8772..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/BulkCreationParameters.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters for creating multiple virtual machines as a single action. - */ -public class BulkCreationParameters { - /** - * The number of virtual machine instances to create. - */ - @JsonProperty(value = "instanceCount") - private Integer instanceCount; - - /** - * Get the instanceCount value. - * - * @return the instanceCount value - */ - public Integer instanceCount() { - return this.instanceCount; - } - - /** - * Set the instanceCount value. - * - * @param instanceCount the instanceCount value to set - * @return the BulkCreationParameters object itself. - */ - public BulkCreationParameters withInstanceCount(Integer instanceCount) { - this.instanceCount = instanceCount; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeDataDisk.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeDataDisk.java deleted file mode 100644 index 516c5847be6..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeDataDisk.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A data disks attached to a virtual machine. - */ -public class ComputeDataDisk { - /** - * Gets data disk name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * When backed by a blob, the URI of underlying blob. - */ - @JsonProperty(value = "diskUri") - private String diskUri; - - /** - * When backed by managed disk, this is the ID of the compute disk - * resource. - */ - @JsonProperty(value = "managedDiskId") - private String managedDiskId; - - /** - * Gets data disk size in GiB. - */ - @JsonProperty(value = "diskSizeGiB") - private Integer diskSizeGiB; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ComputeDataDisk object itself. - */ - public ComputeDataDisk withName(String name) { - this.name = name; - return this; - } - - /** - * Get the diskUri value. - * - * @return the diskUri value - */ - public String diskUri() { - return this.diskUri; - } - - /** - * Set the diskUri value. - * - * @param diskUri the diskUri value to set - * @return the ComputeDataDisk object itself. - */ - public ComputeDataDisk withDiskUri(String diskUri) { - this.diskUri = diskUri; - return this; - } - - /** - * Get the managedDiskId value. - * - * @return the managedDiskId value - */ - public String managedDiskId() { - return this.managedDiskId; - } - - /** - * Set the managedDiskId value. - * - * @param managedDiskId the managedDiskId value to set - * @return the ComputeDataDisk object itself. - */ - public ComputeDataDisk withManagedDiskId(String managedDiskId) { - this.managedDiskId = managedDiskId; - return this; - } - - /** - * Get the diskSizeGiB value. - * - * @return the diskSizeGiB value - */ - public Integer diskSizeGiB() { - return this.diskSizeGiB; - } - - /** - * Set the diskSizeGiB value. - * - * @param diskSizeGiB the diskSizeGiB value to set - * @return the ComputeDataDisk object itself. - */ - public ComputeDataDisk withDiskSizeGiB(Integer diskSizeGiB) { - this.diskSizeGiB = diskSizeGiB; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeDataDiskFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeDataDiskFragment.java deleted file mode 100644 index fe55a5f2577..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeDataDiskFragment.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A data disks attached to a virtual machine. - */ -public class ComputeDataDiskFragment { - /** - * Gets data disk name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * When backed by a blob, the URI of underlying blob. - */ - @JsonProperty(value = "diskUri") - private String diskUri; - - /** - * When backed by managed disk, this is the ID of the compute disk - * resource. - */ - @JsonProperty(value = "managedDiskId") - private String managedDiskId; - - /** - * Gets data disk size in GiB. - */ - @JsonProperty(value = "diskSizeGiB") - private Integer diskSizeGiB; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ComputeDataDiskFragment object itself. - */ - public ComputeDataDiskFragment withName(String name) { - this.name = name; - return this; - } - - /** - * Get the diskUri value. - * - * @return the diskUri value - */ - public String diskUri() { - return this.diskUri; - } - - /** - * Set the diskUri value. - * - * @param diskUri the diskUri value to set - * @return the ComputeDataDiskFragment object itself. - */ - public ComputeDataDiskFragment withDiskUri(String diskUri) { - this.diskUri = diskUri; - return this; - } - - /** - * Get the managedDiskId value. - * - * @return the managedDiskId value - */ - public String managedDiskId() { - return this.managedDiskId; - } - - /** - * Set the managedDiskId value. - * - * @param managedDiskId the managedDiskId value to set - * @return the ComputeDataDiskFragment object itself. - */ - public ComputeDataDiskFragment withManagedDiskId(String managedDiskId) { - this.managedDiskId = managedDiskId; - return this; - } - - /** - * Get the diskSizeGiB value. - * - * @return the diskSizeGiB value - */ - public Integer diskSizeGiB() { - return this.diskSizeGiB; - } - - /** - * Set the diskSizeGiB value. - * - * @param diskSizeGiB the diskSizeGiB value to set - * @return the ComputeDataDiskFragment object itself. - */ - public ComputeDataDiskFragment withDiskSizeGiB(Integer diskSizeGiB) { - this.diskSizeGiB = diskSizeGiB; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmInstanceViewStatus.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmInstanceViewStatus.java deleted file mode 100644 index b425c58bbed..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmInstanceViewStatus.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Status information about a virtual machine. - */ -public class ComputeVmInstanceViewStatus { - /** - * Gets the status Code. - */ - @JsonProperty(value = "code") - private String code; - - /** - * Gets the short localizable label for the status. - */ - @JsonProperty(value = "displayStatus") - private String displayStatus; - - /** - * Gets the message associated with the status. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ComputeVmInstanceViewStatus object itself. - */ - public ComputeVmInstanceViewStatus withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the displayStatus value. - * - * @return the displayStatus value - */ - public String displayStatus() { - return this.displayStatus; - } - - /** - * Set the displayStatus value. - * - * @param displayStatus the displayStatus value to set - * @return the ComputeVmInstanceViewStatus object itself. - */ - public ComputeVmInstanceViewStatus withDisplayStatus(String displayStatus) { - this.displayStatus = displayStatus; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ComputeVmInstanceViewStatus object itself. - */ - public ComputeVmInstanceViewStatus withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmInstanceViewStatusFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmInstanceViewStatusFragment.java deleted file mode 100644 index d83a25e9cef..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmInstanceViewStatusFragment.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Status information about a virtual machine. - */ -public class ComputeVmInstanceViewStatusFragment { - /** - * Gets the status Code. - */ - @JsonProperty(value = "code") - private String code; - - /** - * Gets the short localizable label for the status. - */ - @JsonProperty(value = "displayStatus") - private String displayStatus; - - /** - * Gets the message associated with the status. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ComputeVmInstanceViewStatusFragment object itself. - */ - public ComputeVmInstanceViewStatusFragment withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the displayStatus value. - * - * @return the displayStatus value - */ - public String displayStatus() { - return this.displayStatus; - } - - /** - * Set the displayStatus value. - * - * @param displayStatus the displayStatus value to set - * @return the ComputeVmInstanceViewStatusFragment object itself. - */ - public ComputeVmInstanceViewStatusFragment withDisplayStatus(String displayStatus) { - this.displayStatus = displayStatus; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ComputeVmInstanceViewStatusFragment object itself. - */ - public ComputeVmInstanceViewStatusFragment withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmProperties.java deleted file mode 100644 index 9dcafc06b71..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmProperties.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a virtual machine returned by the Microsoft.Compute API. - */ -public class ComputeVmProperties { - /** - * Gets the statuses of the virtual machine. - */ - @JsonProperty(value = "statuses") - private List statuses; - - /** - * Gets the OS type of the virtual machine. - */ - @JsonProperty(value = "osType") - private String osType; - - /** - * Gets the size of the virtual machine. - */ - @JsonProperty(value = "vmSize") - private String vmSize; - - /** - * Gets the network interface ID of the virtual machine. - */ - @JsonProperty(value = "networkInterfaceId") - private String networkInterfaceId; - - /** - * Gets OS disk blob uri for the virtual machine. - */ - @JsonProperty(value = "osDiskId") - private String osDiskId; - - /** - * Gets data disks blob uri for the virtual machine. - */ - @JsonProperty(value = "dataDiskIds") - private List dataDiskIds; - - /** - * Gets all data disks attached to the virtual machine. - */ - @JsonProperty(value = "dataDisks") - private List dataDisks; - - /** - * Get the statuses value. - * - * @return the statuses value - */ - public List statuses() { - return this.statuses; - } - - /** - * Set the statuses value. - * - * @param statuses the statuses value to set - * @return the ComputeVmProperties object itself. - */ - public ComputeVmProperties withStatuses(List statuses) { - this.statuses = statuses; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the ComputeVmProperties object itself. - */ - public ComputeVmProperties withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the vmSize value. - * - * @return the vmSize value - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize value. - * - * @param vmSize the vmSize value to set - * @return the ComputeVmProperties object itself. - */ - public ComputeVmProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the networkInterfaceId value. - * - * @return the networkInterfaceId value - */ - public String networkInterfaceId() { - return this.networkInterfaceId; - } - - /** - * Set the networkInterfaceId value. - * - * @param networkInterfaceId the networkInterfaceId value to set - * @return the ComputeVmProperties object itself. - */ - public ComputeVmProperties withNetworkInterfaceId(String networkInterfaceId) { - this.networkInterfaceId = networkInterfaceId; - return this; - } - - /** - * Get the osDiskId value. - * - * @return the osDiskId value - */ - public String osDiskId() { - return this.osDiskId; - } - - /** - * Set the osDiskId value. - * - * @param osDiskId the osDiskId value to set - * @return the ComputeVmProperties object itself. - */ - public ComputeVmProperties withOsDiskId(String osDiskId) { - this.osDiskId = osDiskId; - return this; - } - - /** - * Get the dataDiskIds value. - * - * @return the dataDiskIds value - */ - public List dataDiskIds() { - return this.dataDiskIds; - } - - /** - * Set the dataDiskIds value. - * - * @param dataDiskIds the dataDiskIds value to set - * @return the ComputeVmProperties object itself. - */ - public ComputeVmProperties withDataDiskIds(List dataDiskIds) { - this.dataDiskIds = dataDiskIds; - return this; - } - - /** - * Get the dataDisks value. - * - * @return the dataDisks value - */ - public List dataDisks() { - return this.dataDisks; - } - - /** - * Set the dataDisks value. - * - * @param dataDisks the dataDisks value to set - * @return the ComputeVmProperties object itself. - */ - public ComputeVmProperties withDataDisks(List dataDisks) { - this.dataDisks = dataDisks; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmPropertiesFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmPropertiesFragment.java deleted file mode 100644 index adf162e7663..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ComputeVmPropertiesFragment.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a virtual machine returned by the Microsoft.Compute API. - */ -public class ComputeVmPropertiesFragment { - /** - * Gets the statuses of the virtual machine. - */ - @JsonProperty(value = "statuses") - private List statuses; - - /** - * Gets the OS type of the virtual machine. - */ - @JsonProperty(value = "osType") - private String osType; - - /** - * Gets the size of the virtual machine. - */ - @JsonProperty(value = "vmSize") - private String vmSize; - - /** - * Gets the network interface ID of the virtual machine. - */ - @JsonProperty(value = "networkInterfaceId") - private String networkInterfaceId; - - /** - * Gets OS disk blob uri for the virtual machine. - */ - @JsonProperty(value = "osDiskId") - private String osDiskId; - - /** - * Gets data disks blob uri for the virtual machine. - */ - @JsonProperty(value = "dataDiskIds") - private List dataDiskIds; - - /** - * Gets all data disks attached to the virtual machine. - */ - @JsonProperty(value = "dataDisks") - private List dataDisks; - - /** - * Get the statuses value. - * - * @return the statuses value - */ - public List statuses() { - return this.statuses; - } - - /** - * Set the statuses value. - * - * @param statuses the statuses value to set - * @return the ComputeVmPropertiesFragment object itself. - */ - public ComputeVmPropertiesFragment withStatuses(List statuses) { - this.statuses = statuses; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the ComputeVmPropertiesFragment object itself. - */ - public ComputeVmPropertiesFragment withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the vmSize value. - * - * @return the vmSize value - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize value. - * - * @param vmSize the vmSize value to set - * @return the ComputeVmPropertiesFragment object itself. - */ - public ComputeVmPropertiesFragment withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the networkInterfaceId value. - * - * @return the networkInterfaceId value - */ - public String networkInterfaceId() { - return this.networkInterfaceId; - } - - /** - * Set the networkInterfaceId value. - * - * @param networkInterfaceId the networkInterfaceId value to set - * @return the ComputeVmPropertiesFragment object itself. - */ - public ComputeVmPropertiesFragment withNetworkInterfaceId(String networkInterfaceId) { - this.networkInterfaceId = networkInterfaceId; - return this; - } - - /** - * Get the osDiskId value. - * - * @return the osDiskId value - */ - public String osDiskId() { - return this.osDiskId; - } - - /** - * Set the osDiskId value. - * - * @param osDiskId the osDiskId value to set - * @return the ComputeVmPropertiesFragment object itself. - */ - public ComputeVmPropertiesFragment withOsDiskId(String osDiskId) { - this.osDiskId = osDiskId; - return this; - } - - /** - * Get the dataDiskIds value. - * - * @return the dataDiskIds value - */ - public List dataDiskIds() { - return this.dataDiskIds; - } - - /** - * Set the dataDiskIds value. - * - * @param dataDiskIds the dataDiskIds value to set - * @return the ComputeVmPropertiesFragment object itself. - */ - public ComputeVmPropertiesFragment withDataDiskIds(List dataDiskIds) { - this.dataDiskIds = dataDiskIds; - return this; - } - - /** - * Get the dataDisks value. - * - * @return the dataDisks value - */ - public List dataDisks() { - return this.dataDisks; - } - - /** - * Set the dataDisks value. - * - * @param dataDisks the dataDisks value to set - * @return the ComputeVmPropertiesFragment object itself. - */ - public ComputeVmPropertiesFragment withDataDisks(List dataDisks) { - this.dataDisks = dataDisks; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostThresholdProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostThresholdProperties.java deleted file mode 100644 index b1db8250824..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostThresholdProperties.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a cost threshold item. - */ -public class CostThresholdProperties { - /** - * The ID of the cost threshold item. - */ - @JsonProperty(value = "thresholdId") - private String thresholdId; - - /** - * The value of the percentage cost threshold. - */ - @JsonProperty(value = "percentageThreshold") - private PercentageCostThresholdProperties percentageThreshold; - - /** - * Indicates whether this threshold will be displayed on cost charts. - * Possible values include: 'Enabled', 'Disabled'. - */ - @JsonProperty(value = "displayOnChart") - private CostThresholdStatus displayOnChart; - - /** - * Indicates whether notifications will be sent when this threshold is - * exceeded. Possible values include: 'Enabled', 'Disabled'. - */ - @JsonProperty(value = "sendNotificationWhenExceeded") - private CostThresholdStatus sendNotificationWhenExceeded; - - /** - * Indicates the datetime when notifications were last sent for this - * threshold. - */ - @JsonProperty(value = "NotificationSent") - private String notificationSent; - - /** - * Get the thresholdId value. - * - * @return the thresholdId value - */ - public String thresholdId() { - return this.thresholdId; - } - - /** - * Set the thresholdId value. - * - * @param thresholdId the thresholdId value to set - * @return the CostThresholdProperties object itself. - */ - public CostThresholdProperties withThresholdId(String thresholdId) { - this.thresholdId = thresholdId; - return this; - } - - /** - * Get the percentageThreshold value. - * - * @return the percentageThreshold value - */ - public PercentageCostThresholdProperties percentageThreshold() { - return this.percentageThreshold; - } - - /** - * Set the percentageThreshold value. - * - * @param percentageThreshold the percentageThreshold value to set - * @return the CostThresholdProperties object itself. - */ - public CostThresholdProperties withPercentageThreshold(PercentageCostThresholdProperties percentageThreshold) { - this.percentageThreshold = percentageThreshold; - return this; - } - - /** - * Get the displayOnChart value. - * - * @return the displayOnChart value - */ - public CostThresholdStatus displayOnChart() { - return this.displayOnChart; - } - - /** - * Set the displayOnChart value. - * - * @param displayOnChart the displayOnChart value to set - * @return the CostThresholdProperties object itself. - */ - public CostThresholdProperties withDisplayOnChart(CostThresholdStatus displayOnChart) { - this.displayOnChart = displayOnChart; - return this; - } - - /** - * Get the sendNotificationWhenExceeded value. - * - * @return the sendNotificationWhenExceeded value - */ - public CostThresholdStatus sendNotificationWhenExceeded() { - return this.sendNotificationWhenExceeded; - } - - /** - * Set the sendNotificationWhenExceeded value. - * - * @param sendNotificationWhenExceeded the sendNotificationWhenExceeded value to set - * @return the CostThresholdProperties object itself. - */ - public CostThresholdProperties withSendNotificationWhenExceeded(CostThresholdStatus sendNotificationWhenExceeded) { - this.sendNotificationWhenExceeded = sendNotificationWhenExceeded; - return this; - } - - /** - * Get the notificationSent value. - * - * @return the notificationSent value - */ - public String notificationSent() { - return this.notificationSent; - } - - /** - * Set the notificationSent value. - * - * @param notificationSent the notificationSent value to set - * @return the CostThresholdProperties object itself. - */ - public CostThresholdProperties withNotificationSent(String notificationSent) { - this.notificationSent = notificationSent; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostThresholdStatus.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostThresholdStatus.java deleted file mode 100644 index 437fbfe1ff4..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostThresholdStatus.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for CostThresholdStatus. - */ -public final class CostThresholdStatus { - /** Static value Enabled for CostThresholdStatus. */ - public static final CostThresholdStatus ENABLED = new CostThresholdStatus("Enabled"); - - /** Static value Disabled for CostThresholdStatus. */ - public static final CostThresholdStatus DISABLED = new CostThresholdStatus("Disabled"); - - private String value; - - /** - * Creates a custom value for CostThresholdStatus. - * @param value the custom value - */ - public CostThresholdStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof CostThresholdStatus)) { - return false; - } - if (obj == this) { - return true; - } - CostThresholdStatus rhs = (CostThresholdStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostType.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostType.java deleted file mode 100644 index af1a7a40bc2..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CostType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for CostType. - */ -public final class CostType { - /** Static value Unavailable for CostType. */ - public static final CostType UNAVAILABLE = new CostType("Unavailable"); - - /** Static value Reported for CostType. */ - public static final CostType REPORTED = new CostType("Reported"); - - /** Static value Projected for CostType. */ - public static final CostType PROJECTED = new CostType("Projected"); - - private String value; - - /** - * Creates a custom value for CostType. - * @param value the custom value - */ - public CostType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof CostType)) { - return false; - } - if (obj == this) { - return true; - } - CostType rhs = (CostType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImageOsType.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImageOsType.java deleted file mode 100644 index 1a48c8516f3..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImageOsType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for CustomImageOsType. - */ -public final class CustomImageOsType { - /** Static value Windows for CustomImageOsType. */ - public static final CustomImageOsType WINDOWS = new CustomImageOsType("Windows"); - - /** Static value Linux for CustomImageOsType. */ - public static final CustomImageOsType LINUX = new CustomImageOsType("Linux"); - - /** Static value None for CustomImageOsType. */ - public static final CustomImageOsType NONE = new CustomImageOsType("None"); - - private String value; - - /** - * Creates a custom value for CustomImageOsType. - * @param value the custom value - */ - public CustomImageOsType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof CustomImageOsType)) { - return false; - } - if (obj == this) { - return true; - } - CustomImageOsType rhs = (CustomImageOsType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImagePropertiesCustom.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImagePropertiesCustom.java deleted file mode 100644 index ccd6df49c09..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImagePropertiesCustom.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties for creating a custom image from a VHD. - */ -public class CustomImagePropertiesCustom { - /** - * The image name. - */ - @JsonProperty(value = "imageName") - private String imageName; - - /** - * Indicates whether sysprep has been run on the VHD. - */ - @JsonProperty(value = "sysPrep") - private Boolean sysPrep; - - /** - * The OS type of the custom image (i.e. Windows, Linux). Possible values - * include: 'Windows', 'Linux', 'None'. - */ - @JsonProperty(value = "osType", required = true) - private CustomImageOsType osType; - - /** - * Get the imageName value. - * - * @return the imageName value - */ - public String imageName() { - return this.imageName; - } - - /** - * Set the imageName value. - * - * @param imageName the imageName value to set - * @return the CustomImagePropertiesCustom object itself. - */ - public CustomImagePropertiesCustom withImageName(String imageName) { - this.imageName = imageName; - return this; - } - - /** - * Get the sysPrep value. - * - * @return the sysPrep value - */ - public Boolean sysPrep() { - return this.sysPrep; - } - - /** - * Set the sysPrep value. - * - * @param sysPrep the sysPrep value to set - * @return the CustomImagePropertiesCustom object itself. - */ - public CustomImagePropertiesCustom withSysPrep(Boolean sysPrep) { - this.sysPrep = sysPrep; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public CustomImageOsType osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the CustomImagePropertiesCustom object itself. - */ - public CustomImagePropertiesCustom withOsType(CustomImageOsType osType) { - this.osType = osType; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImagePropertiesFromVm.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImagePropertiesFromVm.java deleted file mode 100644 index 545b5fa8245..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/CustomImagePropertiesFromVm.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties for creating a custom image from a virtual machine. - */ -public class CustomImagePropertiesFromVm { - /** - * The source vm identifier. - */ - @JsonProperty(value = "sourceVmId") - private String sourceVmId; - - /** - * The Windows OS information of the VM. - */ - @JsonProperty(value = "windowsOsInfo") - private WindowsOsInfo windowsOsInfo; - - /** - * The Linux OS information of the VM. - */ - @JsonProperty(value = "linuxOsInfo") - private LinuxOsInfo linuxOsInfo; - - /** - * Get the sourceVmId value. - * - * @return the sourceVmId value - */ - public String sourceVmId() { - return this.sourceVmId; - } - - /** - * Set the sourceVmId value. - * - * @param sourceVmId the sourceVmId value to set - * @return the CustomImagePropertiesFromVm object itself. - */ - public CustomImagePropertiesFromVm withSourceVmId(String sourceVmId) { - this.sourceVmId = sourceVmId; - return this; - } - - /** - * Get the windowsOsInfo value. - * - * @return the windowsOsInfo value - */ - public WindowsOsInfo windowsOsInfo() { - return this.windowsOsInfo; - } - - /** - * Set the windowsOsInfo value. - * - * @param windowsOsInfo the windowsOsInfo value to set - * @return the CustomImagePropertiesFromVm object itself. - */ - public CustomImagePropertiesFromVm withWindowsOsInfo(WindowsOsInfo windowsOsInfo) { - this.windowsOsInfo = windowsOsInfo; - return this; - } - - /** - * Get the linuxOsInfo value. - * - * @return the linuxOsInfo value - */ - public LinuxOsInfo linuxOsInfo() { - return this.linuxOsInfo; - } - - /** - * Set the linuxOsInfo value. - * - * @param linuxOsInfo the linuxOsInfo value to set - * @return the CustomImagePropertiesFromVm object itself. - */ - public CustomImagePropertiesFromVm withLinuxOsInfo(LinuxOsInfo linuxOsInfo) { - this.linuxOsInfo = linuxOsInfo; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DayDetails.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DayDetails.java deleted file mode 100644 index 3d3dc715de3..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DayDetails.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a daily schedule. - */ -public class DayDetails { - /** - * The time of day the schedule will occur. - */ - @JsonProperty(value = "time") - private String time; - - /** - * Get the time value. - * - * @return the time value - */ - public String time() { - return this.time; - } - - /** - * Set the time value. - * - * @param time the time value to set - * @return the DayDetails object itself. - */ - public DayDetails withTime(String time) { - this.time = time; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DayDetailsFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DayDetailsFragment.java deleted file mode 100644 index b272f1cc0d4..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DayDetailsFragment.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a daily schedule. - */ -public class DayDetailsFragment { - /** - * The time of day the schedule will occur. - */ - @JsonProperty(value = "time") - private String time; - - /** - * Get the time value. - * - * @return the time value - */ - public String time() { - return this.time; - } - - /** - * Set the time value. - * - * @param time the time value to set - * @return the DayDetailsFragment object itself. - */ - public DayDetailsFragment withTime(String time) { - this.time = time; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DetachDataDiskProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DetachDataDiskProperties.java deleted file mode 100644 index 2967ee60cb7..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DetachDataDiskProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Request body for detaching data disk from a virtual machine. - */ -public class DetachDataDiskProperties { - /** - * Specifies the disk resource ID to detach from virtual machine. - */ - @JsonProperty(value = "existingLabDiskId") - private String existingLabDiskId; - - /** - * Get the existingLabDiskId value. - * - * @return the existingLabDiskId value - */ - public String existingLabDiskId() { - return this.existingLabDiskId; - } - - /** - * Set the existingLabDiskId value. - * - * @param existingLabDiskId the existingLabDiskId value to set - * @return the DetachDataDiskProperties object itself. - */ - public DetachDataDiskProperties withExistingLabDiskId(String existingLabDiskId) { - this.existingLabDiskId = existingLabDiskId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DetachDiskProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DetachDiskProperties.java deleted file mode 100644 index fd39edb755c..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/DetachDiskProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of the disk to detach. - */ -public class DetachDiskProperties { - /** - * The resource ID of the Lab VM to which the disk is attached. - */ - @JsonProperty(value = "leasedByLabVmId") - private String leasedByLabVmId; - - /** - * Get the leasedByLabVmId value. - * - * @return the leasedByLabVmId value - */ - public String leasedByLabVmId() { - return this.leasedByLabVmId; - } - - /** - * Set the leasedByLabVmId value. - * - * @param leasedByLabVmId the leasedByLabVmId value to set - * @return the DetachDiskProperties object itself. - */ - public DetachDiskProperties withLeasedByLabVmId(String leasedByLabVmId) { - this.leasedByLabVmId = leasedByLabVmId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EnableStatus.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EnableStatus.java deleted file mode 100644 index f0236914f11..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EnableStatus.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for EnableStatus. - */ -public final class EnableStatus { - /** Static value Enabled for EnableStatus. */ - public static final EnableStatus ENABLED = new EnableStatus("Enabled"); - - /** Static value Disabled for EnableStatus. */ - public static final EnableStatus DISABLED = new EnableStatus("Disabled"); - - private String value; - - /** - * Creates a custom value for EnableStatus. - * @param value the custom value - */ - public EnableStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof EnableStatus)) { - return false; - } - if (obj == this) { - return true; - } - EnableStatus rhs = (EnableStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EnvironmentDeploymentProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EnvironmentDeploymentProperties.java deleted file mode 100644 index 62c8aa0f3a0..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EnvironmentDeploymentProperties.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an environment deployment. - */ -public class EnvironmentDeploymentProperties { - /** - * The Azure Resource Manager template's identifier. - */ - @JsonProperty(value = "armTemplateId") - private String armTemplateId; - - /** - * The parameters of the Azure Resource Manager template. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * Get the armTemplateId value. - * - * @return the armTemplateId value - */ - public String armTemplateId() { - return this.armTemplateId; - } - - /** - * Set the armTemplateId value. - * - * @param armTemplateId the armTemplateId value to set - * @return the EnvironmentDeploymentProperties object itself. - */ - public EnvironmentDeploymentProperties withArmTemplateId(String armTemplateId) { - this.armTemplateId = armTemplateId; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the EnvironmentDeploymentProperties object itself. - */ - public EnvironmentDeploymentProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EvaluatePoliciesRequest.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EvaluatePoliciesRequest.java deleted file mode 100644 index 095cc62c53e..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EvaluatePoliciesRequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.implementation.EvaluatePoliciesPropertiesInner; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Request body for evaluating a policy set. - */ -public class EvaluatePoliciesRequest { - /** - * Policies to evaluate. - */ - @JsonProperty(value = "policies") - private List policies; - - /** - * Get the policies value. - * - * @return the policies value - */ - public List policies() { - return this.policies; - } - - /** - * Set the policies value. - * - * @param policies the policies value to set - * @return the EvaluatePoliciesRequest object itself. - */ - public EvaluatePoliciesRequest withPolicies(List policies) { - this.policies = policies; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Event.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Event.java deleted file mode 100644 index 1a2a5391f21..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Event.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * An event to be notified for. - */ -public class Event { - /** - * The event type for which this notification is enabled (i.e. - * AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost'. - */ - @JsonProperty(value = "eventName") - private NotificationChannelEventType eventName; - - /** - * Get the eventName value. - * - * @return the eventName value - */ - public NotificationChannelEventType eventName() { - return this.eventName; - } - - /** - * Set the eventName value. - * - * @param eventName the eventName value to set - * @return the Event object itself. - */ - public Event withEventName(NotificationChannelEventType eventName) { - this.eventName = eventName; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EventFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EventFragment.java deleted file mode 100644 index da4a4813a23..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/EventFragment.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * An event to be notified for. - */ -public class EventFragment { - /** - * The event type for which this notification is enabled (i.e. - * AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost'. - */ - @JsonProperty(value = "eventName") - private NotificationChannelEventType eventName; - - /** - * Get the eventName value. - * - * @return the eventName value - */ - public NotificationChannelEventType eventName() { - return this.eventName; - } - - /** - * Set the eventName value. - * - * @param eventName the eventName value to set - * @return the EventFragment object itself. - */ - public EventFragment withEventName(NotificationChannelEventType eventName) { - this.eventName = eventName; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ExternalSubnet.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ExternalSubnet.java deleted file mode 100644 index 93f8443162f..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ExternalSubnet.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Subnet information as returned by the Microsoft.Network API. - */ -public class ExternalSubnet { - /** - * Gets or sets the identifier. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Gets or sets the name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the ExternalSubnet object itself. - */ - public ExternalSubnet withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ExternalSubnet object itself. - */ - public ExternalSubnet withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ExternalSubnetFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ExternalSubnetFragment.java deleted file mode 100644 index 8d3dd28e390..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ExternalSubnetFragment.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Subnet information as returned by the Microsoft.Network API. - */ -public class ExternalSubnetFragment { - /** - * Gets or sets the identifier. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Gets or sets the name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the ExternalSubnetFragment object itself. - */ - public ExternalSubnetFragment withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ExternalSubnetFragment object itself. - */ - public ExternalSubnetFragment withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/FileUploadOptions.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/FileUploadOptions.java deleted file mode 100644 index 79e93d933c5..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/FileUploadOptions.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for FileUploadOptions. - */ -public final class FileUploadOptions { - /** Static value UploadFilesAndGenerateSasTokens for FileUploadOptions. */ - public static final FileUploadOptions UPLOAD_FILES_AND_GENERATE_SAS_TOKENS = new FileUploadOptions("UploadFilesAndGenerateSasTokens"); - - /** Static value None for FileUploadOptions. */ - public static final FileUploadOptions NONE = new FileUploadOptions("None"); - - private String value; - - /** - * Creates a custom value for FileUploadOptions. - * @param value the custom value - */ - public FileUploadOptions(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof FileUploadOptions)) { - return false; - } - if (obj == this) { - return true; - } - FileUploadOptions rhs = (FileUploadOptions) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/FormulaPropertiesFromVm.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/FormulaPropertiesFromVm.java deleted file mode 100644 index a7fdff5e2e3..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/FormulaPropertiesFromVm.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about a VM from which a formula is to be created. - */ -public class FormulaPropertiesFromVm { - /** - * The identifier of the VM from which a formula is to be created. - */ - @JsonProperty(value = "labVmId") - private String labVmId; - - /** - * Get the labVmId value. - * - * @return the labVmId value - */ - public String labVmId() { - return this.labVmId; - } - - /** - * Set the labVmId value. - * - * @param labVmId the labVmId value to set - * @return the FormulaPropertiesFromVm object itself. - */ - public FormulaPropertiesFromVm withLabVmId(String labVmId) { - this.labVmId = labVmId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GalleryImageReference.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GalleryImageReference.java deleted file mode 100644 index 5adc91a7f2a..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GalleryImageReference.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The reference information for an Azure Marketplace image. - */ -public class GalleryImageReference { - /** - * The offer of the gallery image. - */ - @JsonProperty(value = "offer") - private String offer; - - /** - * The publisher of the gallery image. - */ - @JsonProperty(value = "publisher") - private String publisher; - - /** - * The SKU of the gallery image. - */ - @JsonProperty(value = "sku") - private String sku; - - /** - * The OS type of the gallery image. - */ - @JsonProperty(value = "osType") - private String osType; - - /** - * The version of the gallery image. - */ - @JsonProperty(value = "version") - private String version; - - /** - * Get the offer value. - * - * @return the offer value - */ - public String offer() { - return this.offer; - } - - /** - * Set the offer value. - * - * @param offer the offer value to set - * @return the GalleryImageReference object itself. - */ - public GalleryImageReference withOffer(String offer) { - this.offer = offer; - return this; - } - - /** - * Get the publisher value. - * - * @return the publisher value - */ - public String publisher() { - return this.publisher; - } - - /** - * Set the publisher value. - * - * @param publisher the publisher value to set - * @return the GalleryImageReference object itself. - */ - public GalleryImageReference withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public String sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the GalleryImageReference object itself. - */ - public GalleryImageReference withSku(String sku) { - this.sku = sku; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the GalleryImageReference object itself. - */ - public GalleryImageReference withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the version value. - * - * @return the version value - */ - public String version() { - return this.version; - } - - /** - * Set the version value. - * - * @param version the version value to set - * @return the GalleryImageReference object itself. - */ - public GalleryImageReference withVersion(String version) { - this.version = version; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GalleryImageReferenceFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GalleryImageReferenceFragment.java deleted file mode 100644 index a3bc0d34bd4..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GalleryImageReferenceFragment.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The reference information for an Azure Marketplace image. - */ -public class GalleryImageReferenceFragment { - /** - * The offer of the gallery image. - */ - @JsonProperty(value = "offer") - private String offer; - - /** - * The publisher of the gallery image. - */ - @JsonProperty(value = "publisher") - private String publisher; - - /** - * The SKU of the gallery image. - */ - @JsonProperty(value = "sku") - private String sku; - - /** - * The OS type of the gallery image. - */ - @JsonProperty(value = "osType") - private String osType; - - /** - * The version of the gallery image. - */ - @JsonProperty(value = "version") - private String version; - - /** - * Get the offer value. - * - * @return the offer value - */ - public String offer() { - return this.offer; - } - - /** - * Set the offer value. - * - * @param offer the offer value to set - * @return the GalleryImageReferenceFragment object itself. - */ - public GalleryImageReferenceFragment withOffer(String offer) { - this.offer = offer; - return this; - } - - /** - * Get the publisher value. - * - * @return the publisher value - */ - public String publisher() { - return this.publisher; - } - - /** - * Set the publisher value. - * - * @param publisher the publisher value to set - * @return the GalleryImageReferenceFragment object itself. - */ - public GalleryImageReferenceFragment withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public String sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the GalleryImageReferenceFragment object itself. - */ - public GalleryImageReferenceFragment withSku(String sku) { - this.sku = sku; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the GalleryImageReferenceFragment object itself. - */ - public GalleryImageReferenceFragment withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the version value. - * - * @return the version value - */ - public String version() { - return this.version; - } - - /** - * Set the version value. - * - * @param version the version value to set - * @return the GalleryImageReferenceFragment object itself. - */ - public GalleryImageReferenceFragment withVersion(String version) { - this.version = version; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GenerateUploadUriParameter.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GenerateUploadUriParameter.java deleted file mode 100644 index 066f9136112..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/GenerateUploadUriParameter.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties for generating an upload URI. - */ -public class GenerateUploadUriParameter { - /** - * The blob name of the upload URI. - */ - @JsonProperty(value = "blobName") - private String blobName; - - /** - * Get the blobName value. - * - * @return the blobName value - */ - public String blobName() { - return this.blobName; - } - - /** - * Set the blobName value. - * - * @param blobName the blobName value to set - * @return the GenerateUploadUriParameter object itself. - */ - public GenerateUploadUriParameter withBlobName(String blobName) { - this.blobName = blobName; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HostCachingOptions.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HostCachingOptions.java deleted file mode 100644 index 7684ff4a6a5..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HostCachingOptions.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for HostCachingOptions. - */ -public final class HostCachingOptions { - /** Static value None for HostCachingOptions. */ - public static final HostCachingOptions NONE = new HostCachingOptions("None"); - - /** Static value ReadOnly for HostCachingOptions. */ - public static final HostCachingOptions READ_ONLY = new HostCachingOptions("ReadOnly"); - - /** Static value ReadWrite for HostCachingOptions. */ - public static final HostCachingOptions READ_WRITE = new HostCachingOptions("ReadWrite"); - - private String value; - - /** - * Creates a custom value for HostCachingOptions. - * @param value the custom value - */ - public HostCachingOptions(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof HostCachingOptions)) { - return false; - } - if (obj == this) { - return true; - } - HostCachingOptions rhs = (HostCachingOptions) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HourDetails.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HourDetails.java deleted file mode 100644 index 7ef10dccc1c..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HourDetails.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an hourly schedule. - */ -public class HourDetails { - /** - * Minutes of the hour the schedule will run. - */ - @JsonProperty(value = "minute") - private Integer minute; - - /** - * Get the minute value. - * - * @return the minute value - */ - public Integer minute() { - return this.minute; - } - - /** - * Set the minute value. - * - * @param minute the minute value to set - * @return the HourDetails object itself. - */ - public HourDetails withMinute(Integer minute) { - this.minute = minute; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HourDetailsFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HourDetailsFragment.java deleted file mode 100644 index 5eda59b0d54..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/HourDetailsFragment.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an hourly schedule. - */ -public class HourDetailsFragment { - /** - * Minutes of the hour the schedule will run. - */ - @JsonProperty(value = "minute") - private Integer minute; - - /** - * Get the minute value. - * - * @return the minute value - */ - public Integer minute() { - return this.minute; - } - - /** - * Set the minute value. - * - * @param minute the minute value to set - * @return the HourDetailsFragment object itself. - */ - public HourDetailsFragment withMinute(Integer minute) { - this.minute = minute; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/IdentityProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/IdentityProperties.java deleted file mode 100644 index b444da203b8..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/IdentityProperties.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * IdentityProperties. - */ -public class IdentityProperties { - /** - * Managed identity. - */ - @JsonProperty(value = "type") - private String type; - - /** - * The principal id of resource identity. - */ - @JsonProperty(value = "principalId") - private String principalId; - - /** - * The tenant identifier of resource. - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /** - * The client secret URL of the identity. - */ - @JsonProperty(value = "clientSecretUrl") - private String clientSecretUrl; - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the IdentityProperties object itself. - */ - public IdentityProperties withType(String type) { - this.type = type; - return this; - } - - /** - * Get the principalId value. - * - * @return the principalId value - */ - public String principalId() { - return this.principalId; - } - - /** - * Set the principalId value. - * - * @param principalId the principalId value to set - * @return the IdentityProperties object itself. - */ - public IdentityProperties withPrincipalId(String principalId) { - this.principalId = principalId; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId value. - * - * @param tenantId the tenantId value to set - * @return the IdentityProperties object itself. - */ - public IdentityProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the clientSecretUrl value. - * - * @return the clientSecretUrl value - */ - public String clientSecretUrl() { - return this.clientSecretUrl; - } - - /** - * Set the clientSecretUrl value. - * - * @param clientSecretUrl the clientSecretUrl value to set - * @return the IdentityProperties object itself. - */ - public IdentityProperties withClientSecretUrl(String clientSecretUrl) { - this.clientSecretUrl = clientSecretUrl; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/InboundNatRule.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/InboundNatRule.java deleted file mode 100644 index 7544fca4c47..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/InboundNatRule.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A rule for NAT - exposing a VM's port (backendPort) on the public IP address - * using a load balancer. - */ -public class InboundNatRule { - /** - * The transport protocol for the endpoint. Possible values include: 'Tcp', - * 'Udp'. - */ - @JsonProperty(value = "transportProtocol") - private TransportProtocol transportProtocol; - - /** - * The external endpoint port of the inbound connection. Possible values - * range between 1 and 65535, inclusive. If unspecified, a value will be - * allocated automatically. - */ - @JsonProperty(value = "frontendPort") - private Integer frontendPort; - - /** - * The port to which the external traffic will be redirected. - */ - @JsonProperty(value = "backendPort") - private Integer backendPort; - - /** - * Get the transportProtocol value. - * - * @return the transportProtocol value - */ - public TransportProtocol transportProtocol() { - return this.transportProtocol; - } - - /** - * Set the transportProtocol value. - * - * @param transportProtocol the transportProtocol value to set - * @return the InboundNatRule object itself. - */ - public InboundNatRule withTransportProtocol(TransportProtocol transportProtocol) { - this.transportProtocol = transportProtocol; - return this; - } - - /** - * Get the frontendPort value. - * - * @return the frontendPort value - */ - public Integer frontendPort() { - return this.frontendPort; - } - - /** - * Set the frontendPort value. - * - * @param frontendPort the frontendPort value to set - * @return the InboundNatRule object itself. - */ - public InboundNatRule withFrontendPort(Integer frontendPort) { - this.frontendPort = frontendPort; - return this; - } - - /** - * Get the backendPort value. - * - * @return the backendPort value - */ - public Integer backendPort() { - return this.backendPort; - } - - /** - * Set the backendPort value. - * - * @param backendPort the backendPort value to set - * @return the InboundNatRule object itself. - */ - public InboundNatRule withBackendPort(Integer backendPort) { - this.backendPort = backendPort; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/InboundNatRuleFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/InboundNatRuleFragment.java deleted file mode 100644 index 9c26c5f5d92..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/InboundNatRuleFragment.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A rule for NAT - exposing a VM's port (backendPort) on the public IP address - * using a load balancer. - */ -public class InboundNatRuleFragment { - /** - * The transport protocol for the endpoint. Possible values include: 'Tcp', - * 'Udp'. - */ - @JsonProperty(value = "transportProtocol") - private TransportProtocol transportProtocol; - - /** - * The external endpoint port of the inbound connection. Possible values - * range between 1 and 65535, inclusive. If unspecified, a value will be - * allocated automatically. - */ - @JsonProperty(value = "frontendPort") - private Integer frontendPort; - - /** - * The port to which the external traffic will be redirected. - */ - @JsonProperty(value = "backendPort") - private Integer backendPort; - - /** - * Get the transportProtocol value. - * - * @return the transportProtocol value - */ - public TransportProtocol transportProtocol() { - return this.transportProtocol; - } - - /** - * Set the transportProtocol value. - * - * @param transportProtocol the transportProtocol value to set - * @return the InboundNatRuleFragment object itself. - */ - public InboundNatRuleFragment withTransportProtocol(TransportProtocol transportProtocol) { - this.transportProtocol = transportProtocol; - return this; - } - - /** - * Get the frontendPort value. - * - * @return the frontendPort value - */ - public Integer frontendPort() { - return this.frontendPort; - } - - /** - * Set the frontendPort value. - * - * @param frontendPort the frontendPort value to set - * @return the InboundNatRuleFragment object itself. - */ - public InboundNatRuleFragment withFrontendPort(Integer frontendPort) { - this.frontendPort = frontendPort; - return this; - } - - /** - * Get the backendPort value. - * - * @return the backendPort value - */ - public Integer backendPort() { - return this.backendPort; - } - - /** - * Set the backendPort value. - * - * @param backendPort the backendPort value to set - * @return the InboundNatRuleFragment object itself. - */ - public InboundNatRuleFragment withBackendPort(Integer backendPort) { - this.backendPort = backendPort; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabCostDetailsProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabCostDetailsProperties.java deleted file mode 100644 index d7ec5601814..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabCostDetailsProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of a lab cost item. - */ -public class LabCostDetailsProperties { - /** - * The date of the cost item. - */ - @JsonProperty(value = "date") - private DateTime dateProperty; - - /** - * The cost component of the cost item. - */ - @JsonProperty(value = "cost") - private Double cost; - - /** - * The type of the cost. Possible values include: 'Unavailable', - * 'Reported', 'Projected'. - */ - @JsonProperty(value = "costType") - private CostType costType; - - /** - * Get the dateProperty value. - * - * @return the dateProperty value - */ - public DateTime dateProperty() { - return this.dateProperty; - } - - /** - * Set the dateProperty value. - * - * @param dateProperty the dateProperty value to set - * @return the LabCostDetailsProperties object itself. - */ - public LabCostDetailsProperties withDateProperty(DateTime dateProperty) { - this.dateProperty = dateProperty; - return this; - } - - /** - * Get the cost value. - * - * @return the cost value - */ - public Double cost() { - return this.cost; - } - - /** - * Set the cost value. - * - * @param cost the cost value to set - * @return the LabCostDetailsProperties object itself. - */ - public LabCostDetailsProperties withCost(Double cost) { - this.cost = cost; - return this; - } - - /** - * Get the costType value. - * - * @return the costType value - */ - public CostType costType() { - return this.costType; - } - - /** - * Set the costType value. - * - * @param costType the costType value to set - * @return the LabCostDetailsProperties object itself. - */ - public LabCostDetailsProperties withCostType(CostType costType) { - this.costType = costType; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabCostSummaryProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabCostSummaryProperties.java deleted file mode 100644 index afad6800590..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabCostSummaryProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of the cost summary. - */ -public class LabCostSummaryProperties { - /** - * The cost component of the cost item. - */ - @JsonProperty(value = "estimatedLabCost") - private Double estimatedLabCost; - - /** - * Get the estimatedLabCost value. - * - * @return the estimatedLabCost value - */ - public Double estimatedLabCost() { - return this.estimatedLabCost; - } - - /** - * Set the estimatedLabCost value. - * - * @param estimatedLabCost the estimatedLabCost value to set - * @return the LabCostSummaryProperties object itself. - */ - public LabCostSummaryProperties withEstimatedLabCost(Double estimatedLabCost) { - this.estimatedLabCost = estimatedLabCost; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabResourceCostProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabResourceCostProperties.java deleted file mode 100644 index 55de1380882..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LabResourceCostProperties.java +++ /dev/null @@ -1,251 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties of a resource cost item. - */ -public class LabResourceCostProperties { - /** - * The name of the resource. - */ - @JsonProperty(value = "resourcename") - private String resourcename; - - /** - * The unique identifier of the resource. - */ - @JsonProperty(value = "resourceUId") - private String resourceUId; - - /** - * The cost component of the resource cost item. - */ - @JsonProperty(value = "resourceCost") - private Double resourceCost; - - /** - * The logical resource type (ex. virtualmachine, storageaccount). - */ - @JsonProperty(value = "resourceType") - private String resourceType; - - /** - * The owner of the resource (ex. janedoe@microsoft.com). - */ - @JsonProperty(value = "resourceOwner") - private String resourceOwner; - - /** - * The category of the resource (ex. Premium_LRS, Standard_DS1). - */ - @JsonProperty(value = "resourcePricingTier") - private String resourcePricingTier; - - /** - * The status of the resource (ex. Active). - */ - @JsonProperty(value = "resourceStatus") - private String resourceStatus; - - /** - * The ID of the resource. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * The ID of the external resource. - */ - @JsonProperty(value = "externalResourceId") - private String externalResourceId; - - /** - * Get the resourcename value. - * - * @return the resourcename value - */ - public String resourcename() { - return this.resourcename; - } - - /** - * Set the resourcename value. - * - * @param resourcename the resourcename value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withResourcename(String resourcename) { - this.resourcename = resourcename; - return this; - } - - /** - * Get the resourceUId value. - * - * @return the resourceUId value - */ - public String resourceUId() { - return this.resourceUId; - } - - /** - * Set the resourceUId value. - * - * @param resourceUId the resourceUId value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withResourceUId(String resourceUId) { - this.resourceUId = resourceUId; - return this; - } - - /** - * Get the resourceCost value. - * - * @return the resourceCost value - */ - public Double resourceCost() { - return this.resourceCost; - } - - /** - * Set the resourceCost value. - * - * @param resourceCost the resourceCost value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withResourceCost(Double resourceCost) { - this.resourceCost = resourceCost; - return this; - } - - /** - * Get the resourceType value. - * - * @return the resourceType value - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Set the resourceType value. - * - * @param resourceType the resourceType value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withResourceType(String resourceType) { - this.resourceType = resourceType; - return this; - } - - /** - * Get the resourceOwner value. - * - * @return the resourceOwner value - */ - public String resourceOwner() { - return this.resourceOwner; - } - - /** - * Set the resourceOwner value. - * - * @param resourceOwner the resourceOwner value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withResourceOwner(String resourceOwner) { - this.resourceOwner = resourceOwner; - return this; - } - - /** - * Get the resourcePricingTier value. - * - * @return the resourcePricingTier value - */ - public String resourcePricingTier() { - return this.resourcePricingTier; - } - - /** - * Set the resourcePricingTier value. - * - * @param resourcePricingTier the resourcePricingTier value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withResourcePricingTier(String resourcePricingTier) { - this.resourcePricingTier = resourcePricingTier; - return this; - } - - /** - * Get the resourceStatus value. - * - * @return the resourceStatus value - */ - public String resourceStatus() { - return this.resourceStatus; - } - - /** - * Set the resourceStatus value. - * - * @param resourceStatus the resourceStatus value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withResourceStatus(String resourceStatus) { - this.resourceStatus = resourceStatus; - return this; - } - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the externalResourceId value. - * - * @return the externalResourceId value - */ - public String externalResourceId() { - return this.externalResourceId; - } - - /** - * Set the externalResourceId value. - * - * @param externalResourceId the externalResourceId value to set - * @return the LabResourceCostProperties object itself. - */ - public LabResourceCostProperties withExternalResourceId(String externalResourceId) { - this.externalResourceId = externalResourceId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LinuxOsInfo.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LinuxOsInfo.java deleted file mode 100644 index 24146099517..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LinuxOsInfo.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about a Linux OS. - */ -public class LinuxOsInfo { - /** - * The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, - * DeprovisionApplied). Possible values include: 'NonDeprovisioned', - * 'DeprovisionRequested', 'DeprovisionApplied'. - */ - @JsonProperty(value = "linuxOsState") - private LinuxOsState linuxOsState; - - /** - * Get the linuxOsState value. - * - * @return the linuxOsState value - */ - public LinuxOsState linuxOsState() { - return this.linuxOsState; - } - - /** - * Set the linuxOsState value. - * - * @param linuxOsState the linuxOsState value to set - * @return the LinuxOsInfo object itself. - */ - public LinuxOsInfo withLinuxOsState(LinuxOsState linuxOsState) { - this.linuxOsState = linuxOsState; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LinuxOsState.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LinuxOsState.java deleted file mode 100644 index 93241119766..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/LinuxOsState.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for LinuxOsState. - */ -public final class LinuxOsState { - /** Static value NonDeprovisioned for LinuxOsState. */ - public static final LinuxOsState NON_DEPROVISIONED = new LinuxOsState("NonDeprovisioned"); - - /** Static value DeprovisionRequested for LinuxOsState. */ - public static final LinuxOsState DEPROVISION_REQUESTED = new LinuxOsState("DeprovisionRequested"); - - /** Static value DeprovisionApplied for LinuxOsState. */ - public static final LinuxOsState DEPROVISION_APPLIED = new LinuxOsState("DeprovisionApplied"); - - private String value; - - /** - * Creates a custom value for LinuxOsState. - * @param value the custom value - */ - public LinuxOsState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof LinuxOsState)) { - return false; - } - if (obj == this) { - return true; - } - LinuxOsState rhs = (LinuxOsState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NetworkInterfaceProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NetworkInterfaceProperties.java deleted file mode 100644 index 0c68741234e..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NetworkInterfaceProperties.java +++ /dev/null @@ -1,254 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a network interface. - */ -public class NetworkInterfaceProperties { - /** - * The resource ID of the virtual network. - */ - @JsonProperty(value = "virtualNetworkId") - private String virtualNetworkId; - - /** - * The resource ID of the sub net. - */ - @JsonProperty(value = "subnetId") - private String subnetId; - - /** - * The resource ID of the public IP address. - */ - @JsonProperty(value = "publicIpAddressId") - private String publicIpAddressId; - - /** - * The public IP address. - */ - @JsonProperty(value = "publicIpAddress") - private String publicIpAddress; - - /** - * The private IP address. - */ - @JsonProperty(value = "privateIpAddress") - private String privateIpAddress; - - /** - * The DNS name. - */ - @JsonProperty(value = "dnsName") - private String dnsName; - - /** - * The RdpAuthority property is a server DNS host name or IP address - * followed by the service port number for RDP (Remote Desktop Protocol). - */ - @JsonProperty(value = "rdpAuthority") - private String rdpAuthority; - - /** - * The SshAuthority property is a server DNS host name or IP address - * followed by the service port number for SSH. - */ - @JsonProperty(value = "sshAuthority") - private String sshAuthority; - - /** - * The configuration for sharing a public IP address across multiple - * virtual machines. - */ - @JsonProperty(value = "sharedPublicIpAddressConfiguration") - private SharedPublicIpAddressConfiguration sharedPublicIpAddressConfiguration; - - /** - * Get the virtualNetworkId value. - * - * @return the virtualNetworkId value - */ - public String virtualNetworkId() { - return this.virtualNetworkId; - } - - /** - * Set the virtualNetworkId value. - * - * @param virtualNetworkId the virtualNetworkId value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withVirtualNetworkId(String virtualNetworkId) { - this.virtualNetworkId = virtualNetworkId; - return this; - } - - /** - * Get the subnetId value. - * - * @return the subnetId value - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId value. - * - * @param subnetId the subnetId value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Get the publicIpAddressId value. - * - * @return the publicIpAddressId value - */ - public String publicIpAddressId() { - return this.publicIpAddressId; - } - - /** - * Set the publicIpAddressId value. - * - * @param publicIpAddressId the publicIpAddressId value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withPublicIpAddressId(String publicIpAddressId) { - this.publicIpAddressId = publicIpAddressId; - return this; - } - - /** - * Get the publicIpAddress value. - * - * @return the publicIpAddress value - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Set the publicIpAddress value. - * - * @param publicIpAddress the publicIpAddress value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withPublicIpAddress(String publicIpAddress) { - this.publicIpAddress = publicIpAddress; - return this; - } - - /** - * Get the privateIpAddress value. - * - * @return the privateIpAddress value - */ - public String privateIpAddress() { - return this.privateIpAddress; - } - - /** - * Set the privateIpAddress value. - * - * @param privateIpAddress the privateIpAddress value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withPrivateIpAddress(String privateIpAddress) { - this.privateIpAddress = privateIpAddress; - return this; - } - - /** - * Get the dnsName value. - * - * @return the dnsName value - */ - public String dnsName() { - return this.dnsName; - } - - /** - * Set the dnsName value. - * - * @param dnsName the dnsName value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withDnsName(String dnsName) { - this.dnsName = dnsName; - return this; - } - - /** - * Get the rdpAuthority value. - * - * @return the rdpAuthority value - */ - public String rdpAuthority() { - return this.rdpAuthority; - } - - /** - * Set the rdpAuthority value. - * - * @param rdpAuthority the rdpAuthority value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withRdpAuthority(String rdpAuthority) { - this.rdpAuthority = rdpAuthority; - return this; - } - - /** - * Get the sshAuthority value. - * - * @return the sshAuthority value - */ - public String sshAuthority() { - return this.sshAuthority; - } - - /** - * Set the sshAuthority value. - * - * @param sshAuthority the sshAuthority value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withSshAuthority(String sshAuthority) { - this.sshAuthority = sshAuthority; - return this; - } - - /** - * Get the sharedPublicIpAddressConfiguration value. - * - * @return the sharedPublicIpAddressConfiguration value - */ - public SharedPublicIpAddressConfiguration sharedPublicIpAddressConfiguration() { - return this.sharedPublicIpAddressConfiguration; - } - - /** - * Set the sharedPublicIpAddressConfiguration value. - * - * @param sharedPublicIpAddressConfiguration the sharedPublicIpAddressConfiguration value to set - * @return the NetworkInterfaceProperties object itself. - */ - public NetworkInterfaceProperties withSharedPublicIpAddressConfiguration(SharedPublicIpAddressConfiguration sharedPublicIpAddressConfiguration) { - this.sharedPublicIpAddressConfiguration = sharedPublicIpAddressConfiguration; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NetworkInterfacePropertiesFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NetworkInterfacePropertiesFragment.java deleted file mode 100644 index 954b4d44258..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NetworkInterfacePropertiesFragment.java +++ /dev/null @@ -1,254 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a network interface. - */ -public class NetworkInterfacePropertiesFragment { - /** - * The resource ID of the virtual network. - */ - @JsonProperty(value = "virtualNetworkId") - private String virtualNetworkId; - - /** - * The resource ID of the sub net. - */ - @JsonProperty(value = "subnetId") - private String subnetId; - - /** - * The resource ID of the public IP address. - */ - @JsonProperty(value = "publicIpAddressId") - private String publicIpAddressId; - - /** - * The public IP address. - */ - @JsonProperty(value = "publicIpAddress") - private String publicIpAddress; - - /** - * The private IP address. - */ - @JsonProperty(value = "privateIpAddress") - private String privateIpAddress; - - /** - * The DNS name. - */ - @JsonProperty(value = "dnsName") - private String dnsName; - - /** - * The RdpAuthority property is a server DNS host name or IP address - * followed by the service port number for RDP (Remote Desktop Protocol). - */ - @JsonProperty(value = "rdpAuthority") - private String rdpAuthority; - - /** - * The SshAuthority property is a server DNS host name or IP address - * followed by the service port number for SSH. - */ - @JsonProperty(value = "sshAuthority") - private String sshAuthority; - - /** - * The configuration for sharing a public IP address across multiple - * virtual machines. - */ - @JsonProperty(value = "sharedPublicIpAddressConfiguration") - private SharedPublicIpAddressConfigurationFragment sharedPublicIpAddressConfiguration; - - /** - * Get the virtualNetworkId value. - * - * @return the virtualNetworkId value - */ - public String virtualNetworkId() { - return this.virtualNetworkId; - } - - /** - * Set the virtualNetworkId value. - * - * @param virtualNetworkId the virtualNetworkId value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withVirtualNetworkId(String virtualNetworkId) { - this.virtualNetworkId = virtualNetworkId; - return this; - } - - /** - * Get the subnetId value. - * - * @return the subnetId value - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId value. - * - * @param subnetId the subnetId value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Get the publicIpAddressId value. - * - * @return the publicIpAddressId value - */ - public String publicIpAddressId() { - return this.publicIpAddressId; - } - - /** - * Set the publicIpAddressId value. - * - * @param publicIpAddressId the publicIpAddressId value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withPublicIpAddressId(String publicIpAddressId) { - this.publicIpAddressId = publicIpAddressId; - return this; - } - - /** - * Get the publicIpAddress value. - * - * @return the publicIpAddress value - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Set the publicIpAddress value. - * - * @param publicIpAddress the publicIpAddress value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withPublicIpAddress(String publicIpAddress) { - this.publicIpAddress = publicIpAddress; - return this; - } - - /** - * Get the privateIpAddress value. - * - * @return the privateIpAddress value - */ - public String privateIpAddress() { - return this.privateIpAddress; - } - - /** - * Set the privateIpAddress value. - * - * @param privateIpAddress the privateIpAddress value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withPrivateIpAddress(String privateIpAddress) { - this.privateIpAddress = privateIpAddress; - return this; - } - - /** - * Get the dnsName value. - * - * @return the dnsName value - */ - public String dnsName() { - return this.dnsName; - } - - /** - * Set the dnsName value. - * - * @param dnsName the dnsName value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withDnsName(String dnsName) { - this.dnsName = dnsName; - return this; - } - - /** - * Get the rdpAuthority value. - * - * @return the rdpAuthority value - */ - public String rdpAuthority() { - return this.rdpAuthority; - } - - /** - * Set the rdpAuthority value. - * - * @param rdpAuthority the rdpAuthority value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withRdpAuthority(String rdpAuthority) { - this.rdpAuthority = rdpAuthority; - return this; - } - - /** - * Get the sshAuthority value. - * - * @return the sshAuthority value - */ - public String sshAuthority() { - return this.sshAuthority; - } - - /** - * Set the sshAuthority value. - * - * @param sshAuthority the sshAuthority value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withSshAuthority(String sshAuthority) { - this.sshAuthority = sshAuthority; - return this; - } - - /** - * Get the sharedPublicIpAddressConfiguration value. - * - * @return the sharedPublicIpAddressConfiguration value - */ - public SharedPublicIpAddressConfigurationFragment sharedPublicIpAddressConfiguration() { - return this.sharedPublicIpAddressConfiguration; - } - - /** - * Set the sharedPublicIpAddressConfiguration value. - * - * @param sharedPublicIpAddressConfiguration the sharedPublicIpAddressConfiguration value to set - * @return the NetworkInterfacePropertiesFragment object itself. - */ - public NetworkInterfacePropertiesFragment withSharedPublicIpAddressConfiguration(SharedPublicIpAddressConfigurationFragment sharedPublicIpAddressConfiguration) { - this.sharedPublicIpAddressConfiguration = sharedPublicIpAddressConfiguration; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationChannelEventType.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationChannelEventType.java deleted file mode 100644 index b6de941d784..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationChannelEventType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for NotificationChannelEventType. - */ -public final class NotificationChannelEventType { - /** Static value AutoShutdown for NotificationChannelEventType. */ - public static final NotificationChannelEventType AUTO_SHUTDOWN = new NotificationChannelEventType("AutoShutdown"); - - /** Static value Cost for NotificationChannelEventType. */ - public static final NotificationChannelEventType COST = new NotificationChannelEventType("Cost"); - - private String value; - - /** - * Creates a custom value for NotificationChannelEventType. - * @param value the custom value - */ - public NotificationChannelEventType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof NotificationChannelEventType)) { - return false; - } - if (obj == this) { - return true; - } - NotificationChannelEventType rhs = (NotificationChannelEventType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationSettings.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationSettings.java deleted file mode 100644 index 7288f28dc00..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationSettings.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Notification settings for a schedule. - */ -public class NotificationSettings { - /** - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled'. - */ - @JsonProperty(value = "status") - private NotificationStatus status; - - /** - * Time in minutes before event at which notification will be sent. - */ - @JsonProperty(value = "timeInMinutes") - private Integer timeInMinutes; - - /** - * The webhook URL to which the notification will be sent. - */ - @JsonProperty(value = "webhookUrl") - private String webhookUrl; - - /** - * Get the status value. - * - * @return the status value - */ - public NotificationStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the NotificationSettings object itself. - */ - public NotificationSettings withStatus(NotificationStatus status) { - this.status = status; - return this; - } - - /** - * Get the timeInMinutes value. - * - * @return the timeInMinutes value - */ - public Integer timeInMinutes() { - return this.timeInMinutes; - } - - /** - * Set the timeInMinutes value. - * - * @param timeInMinutes the timeInMinutes value to set - * @return the NotificationSettings object itself. - */ - public NotificationSettings withTimeInMinutes(Integer timeInMinutes) { - this.timeInMinutes = timeInMinutes; - return this; - } - - /** - * Get the webhookUrl value. - * - * @return the webhookUrl value - */ - public String webhookUrl() { - return this.webhookUrl; - } - - /** - * Set the webhookUrl value. - * - * @param webhookUrl the webhookUrl value to set - * @return the NotificationSettings object itself. - */ - public NotificationSettings withWebhookUrl(String webhookUrl) { - this.webhookUrl = webhookUrl; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationSettingsFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationSettingsFragment.java deleted file mode 100644 index 411e538e0a4..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationSettingsFragment.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Notification settings for a schedule. - */ -public class NotificationSettingsFragment { - /** - * If notifications are enabled for this schedule (i.e. Enabled, Disabled). - * Possible values include: 'Disabled', 'Enabled'. - */ - @JsonProperty(value = "status") - private NotificationStatus status; - - /** - * Time in minutes before event at which notification will be sent. - */ - @JsonProperty(value = "timeInMinutes") - private Integer timeInMinutes; - - /** - * The webhook URL to which the notification will be sent. - */ - @JsonProperty(value = "webhookUrl") - private String webhookUrl; - - /** - * Get the status value. - * - * @return the status value - */ - public NotificationStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the NotificationSettingsFragment object itself. - */ - public NotificationSettingsFragment withStatus(NotificationStatus status) { - this.status = status; - return this; - } - - /** - * Get the timeInMinutes value. - * - * @return the timeInMinutes value - */ - public Integer timeInMinutes() { - return this.timeInMinutes; - } - - /** - * Set the timeInMinutes value. - * - * @param timeInMinutes the timeInMinutes value to set - * @return the NotificationSettingsFragment object itself. - */ - public NotificationSettingsFragment withTimeInMinutes(Integer timeInMinutes) { - this.timeInMinutes = timeInMinutes; - return this; - } - - /** - * Get the webhookUrl value. - * - * @return the webhookUrl value - */ - public String webhookUrl() { - return this.webhookUrl; - } - - /** - * Set the webhookUrl value. - * - * @param webhookUrl the webhookUrl value to set - * @return the NotificationSettingsFragment object itself. - */ - public NotificationSettingsFragment withWebhookUrl(String webhookUrl) { - this.webhookUrl = webhookUrl; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationStatus.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationStatus.java deleted file mode 100644 index 7c97a8f674b..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/NotificationStatus.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for NotificationStatus. - */ -public final class NotificationStatus { - /** Static value Disabled for NotificationStatus. */ - public static final NotificationStatus DISABLED = new NotificationStatus("Disabled"); - - /** Static value Enabled for NotificationStatus. */ - public static final NotificationStatus ENABLED = new NotificationStatus("Enabled"); - - private String value; - - /** - * Creates a custom value for NotificationStatus. - * @param value the custom value - */ - public NotificationStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof NotificationStatus)) { - return false; - } - if (obj == this) { - return true; - } - NotificationStatus rhs = (NotificationStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ParameterInfo.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ParameterInfo.java deleted file mode 100644 index 4d8e3cf3e04..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ParameterInfo.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about an artifact's parameter. - */ -public class ParameterInfo { - /** - * The name of the artifact parameter. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The value of the artifact parameter. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ParameterInfo object itself. - */ - public ParameterInfo withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the ParameterInfo object itself. - */ - public ParameterInfo withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ParametersValueFileInfo.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ParametersValueFileInfo.java deleted file mode 100644 index c42014a51ef..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ParametersValueFileInfo.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A file containing a set of parameter values for an ARM template. - */ -public class ParametersValueFileInfo { - /** - * File name. - */ - @JsonProperty(value = "fileName") - private String fileName; - - /** - * Contents of the file. - */ - @JsonProperty(value = "parametersValueInfo") - private Object parametersValueInfo; - - /** - * Get the fileName value. - * - * @return the fileName value - */ - public String fileName() { - return this.fileName; - } - - /** - * Set the fileName value. - * - * @param fileName the fileName value to set - * @return the ParametersValueFileInfo object itself. - */ - public ParametersValueFileInfo withFileName(String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Get the parametersValueInfo value. - * - * @return the parametersValueInfo value - */ - public Object parametersValueInfo() { - return this.parametersValueInfo; - } - - /** - * Set the parametersValueInfo value. - * - * @param parametersValueInfo the parametersValueInfo value to set - * @return the ParametersValueFileInfo object itself. - */ - public ParametersValueFileInfo withParametersValueInfo(Object parametersValueInfo) { - this.parametersValueInfo = parametersValueInfo; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PercentageCostThresholdProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PercentageCostThresholdProperties.java deleted file mode 100644 index 570362c0c05..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PercentageCostThresholdProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a percentage cost threshold. - */ -public class PercentageCostThresholdProperties { - /** - * The cost threshold value. - */ - @JsonProperty(value = "thresholdValue") - private Double thresholdValue; - - /** - * Get the thresholdValue value. - * - * @return the thresholdValue value - */ - public Double thresholdValue() { - return this.thresholdValue; - } - - /** - * Set the thresholdValue value. - * - * @param thresholdValue the thresholdValue value to set - * @return the PercentageCostThresholdProperties object itself. - */ - public PercentageCostThresholdProperties withThresholdValue(Double thresholdValue) { - this.thresholdValue = thresholdValue; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyEvaluatorType.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyEvaluatorType.java deleted file mode 100644 index 2d11aa1cc59..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyEvaluatorType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for PolicyEvaluatorType. - */ -public final class PolicyEvaluatorType { - /** Static value AllowedValuesPolicy for PolicyEvaluatorType. */ - public static final PolicyEvaluatorType ALLOWED_VALUES_POLICY = new PolicyEvaluatorType("AllowedValuesPolicy"); - - /** Static value MaxValuePolicy for PolicyEvaluatorType. */ - public static final PolicyEvaluatorType MAX_VALUE_POLICY = new PolicyEvaluatorType("MaxValuePolicy"); - - private String value; - - /** - * Creates a custom value for PolicyEvaluatorType. - * @param value the custom value - */ - public PolicyEvaluatorType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PolicyEvaluatorType)) { - return false; - } - if (obj == this) { - return true; - } - PolicyEvaluatorType rhs = (PolicyEvaluatorType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyFactName.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyFactName.java deleted file mode 100644 index b019a395ace..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyFactName.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for PolicyFactName. - */ -public final class PolicyFactName { - /** Static value UserOwnedLabVmCount for PolicyFactName. */ - public static final PolicyFactName USER_OWNED_LAB_VM_COUNT = new PolicyFactName("UserOwnedLabVmCount"); - - /** Static value UserOwnedLabPremiumVmCount for PolicyFactName. */ - public static final PolicyFactName USER_OWNED_LAB_PREMIUM_VM_COUNT = new PolicyFactName("UserOwnedLabPremiumVmCount"); - - /** Static value LabVmCount for PolicyFactName. */ - public static final PolicyFactName LAB_VM_COUNT = new PolicyFactName("LabVmCount"); - - /** Static value LabPremiumVmCount for PolicyFactName. */ - public static final PolicyFactName LAB_PREMIUM_VM_COUNT = new PolicyFactName("LabPremiumVmCount"); - - /** Static value LabVmSize for PolicyFactName. */ - public static final PolicyFactName LAB_VM_SIZE = new PolicyFactName("LabVmSize"); - - /** Static value GalleryImage for PolicyFactName. */ - public static final PolicyFactName GALLERY_IMAGE = new PolicyFactName("GalleryImage"); - - /** Static value UserOwnedLabVmCountInSubnet for PolicyFactName. */ - public static final PolicyFactName USER_OWNED_LAB_VM_COUNT_IN_SUBNET = new PolicyFactName("UserOwnedLabVmCountInSubnet"); - - /** Static value LabTargetCost for PolicyFactName. */ - public static final PolicyFactName LAB_TARGET_COST = new PolicyFactName("LabTargetCost"); - - private String value; - - /** - * Creates a custom value for PolicyFactName. - * @param value the custom value - */ - public PolicyFactName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PolicyFactName)) { - return false; - } - if (obj == this) { - return true; - } - PolicyFactName rhs = (PolicyFactName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicySetResult.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicySetResult.java deleted file mode 100644 index e27aee81131..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicySetResult.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Result of a policy set evaluation. - */ -public class PolicySetResult { - /** - * A value indicating whether this policy set evaluation has discovered - * violations. - */ - @JsonProperty(value = "hasError") - private Boolean hasError; - - /** - * The list of policy violations. - */ - @JsonProperty(value = "policyViolations") - private List policyViolations; - - /** - * Get the hasError value. - * - * @return the hasError value - */ - public Boolean hasError() { - return this.hasError; - } - - /** - * Set the hasError value. - * - * @param hasError the hasError value to set - * @return the PolicySetResult object itself. - */ - public PolicySetResult withHasError(Boolean hasError) { - this.hasError = hasError; - return this; - } - - /** - * Get the policyViolations value. - * - * @return the policyViolations value - */ - public List policyViolations() { - return this.policyViolations; - } - - /** - * Set the policyViolations value. - * - * @param policyViolations the policyViolations value to set - * @return the PolicySetResult object itself. - */ - public PolicySetResult withPolicyViolations(List policyViolations) { - this.policyViolations = policyViolations; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyStatus.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyStatus.java deleted file mode 100644 index 14841570351..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyStatus.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for PolicyStatus. - */ -public final class PolicyStatus { - /** Static value Enabled for PolicyStatus. */ - public static final PolicyStatus ENABLED = new PolicyStatus("Enabled"); - - /** Static value Disabled for PolicyStatus. */ - public static final PolicyStatus DISABLED = new PolicyStatus("Disabled"); - - private String value; - - /** - * Creates a custom value for PolicyStatus. - * @param value the custom value - */ - public PolicyStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PolicyStatus)) { - return false; - } - if (obj == this) { - return true; - } - PolicyStatus rhs = (PolicyStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyViolation.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyViolation.java deleted file mode 100644 index ec3c7b512c7..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PolicyViolation.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Policy violation. - */ -public class PolicyViolation { - /** - * The code of the policy violation. - */ - @JsonProperty(value = "code") - private String code; - - /** - * The message of the policy violation. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the PolicyViolation object itself. - */ - public PolicyViolation withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the PolicyViolation object itself. - */ - public PolicyViolation withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Port.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Port.java deleted file mode 100644 index 4d995fd2075..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Port.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a network port. - */ -public class Port { - /** - * Protocol type of the port. Possible values include: 'Tcp', 'Udp'. - */ - @JsonProperty(value = "transportProtocol") - private TransportProtocol transportProtocol; - - /** - * Backend port of the target virtual machine. - */ - @JsonProperty(value = "backendPort") - private Integer backendPort; - - /** - * Get the transportProtocol value. - * - * @return the transportProtocol value - */ - public TransportProtocol transportProtocol() { - return this.transportProtocol; - } - - /** - * Set the transportProtocol value. - * - * @param transportProtocol the transportProtocol value to set - * @return the Port object itself. - */ - public Port withTransportProtocol(TransportProtocol transportProtocol) { - this.transportProtocol = transportProtocol; - return this; - } - - /** - * Get the backendPort value. - * - * @return the backendPort value - */ - public Integer backendPort() { - return this.backendPort; - } - - /** - * Set the backendPort value. - * - * @param backendPort the backendPort value to set - * @return the Port object itself. - */ - public Port withBackendPort(Integer backendPort) { - this.backendPort = backendPort; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PortFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PortFragment.java deleted file mode 100644 index 13918041f88..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PortFragment.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a network port. - */ -public class PortFragment { - /** - * Protocol type of the port. Possible values include: 'Tcp', 'Udp'. - */ - @JsonProperty(value = "transportProtocol") - private TransportProtocol transportProtocol; - - /** - * Backend port of the target virtual machine. - */ - @JsonProperty(value = "backendPort") - private Integer backendPort; - - /** - * Get the transportProtocol value. - * - * @return the transportProtocol value - */ - public TransportProtocol transportProtocol() { - return this.transportProtocol; - } - - /** - * Set the transportProtocol value. - * - * @param transportProtocol the transportProtocol value to set - * @return the PortFragment object itself. - */ - public PortFragment withTransportProtocol(TransportProtocol transportProtocol) { - this.transportProtocol = transportProtocol; - return this; - } - - /** - * Get the backendPort value. - * - * @return the backendPort value - */ - public Integer backendPort() { - return this.backendPort; - } - - /** - * Set the backendPort value. - * - * @param backendPort the backendPort value to set - * @return the PortFragment object itself. - */ - public PortFragment withBackendPort(Integer backendPort) { - this.backendPort = backendPort; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PremiumDataDisk.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PremiumDataDisk.java deleted file mode 100644 index 93e9b00adfd..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/PremiumDataDisk.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for PremiumDataDisk. - */ -public final class PremiumDataDisk { - /** Static value Disabled for PremiumDataDisk. */ - public static final PremiumDataDisk DISABLED = new PremiumDataDisk("Disabled"); - - /** Static value Enabled for PremiumDataDisk. */ - public static final PremiumDataDisk ENABLED = new PremiumDataDisk("Enabled"); - - private String value; - - /** - * Creates a custom value for PremiumDataDisk. - * @param value the custom value - */ - public PremiumDataDisk(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PremiumDataDisk)) { - return false; - } - if (obj == this) { - return true; - } - PremiumDataDisk rhs = (PremiumDataDisk) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ReportingCycleType.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ReportingCycleType.java deleted file mode 100644 index 43c7b156809..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ReportingCycleType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ReportingCycleType. - */ -public final class ReportingCycleType { - /** Static value CalendarMonth for ReportingCycleType. */ - public static final ReportingCycleType CALENDAR_MONTH = new ReportingCycleType("CalendarMonth"); - - /** Static value Custom for ReportingCycleType. */ - public static final ReportingCycleType CUSTOM = new ReportingCycleType("Custom"); - - private String value; - - /** - * Creates a custom value for ReportingCycleType. - * @param value the custom value - */ - public ReportingCycleType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ReportingCycleType)) { - return false; - } - if (obj == this) { - return true; - } - ReportingCycleType rhs = (ReportingCycleType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SharedPublicIpAddressConfiguration.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SharedPublicIpAddressConfiguration.java deleted file mode 100644 index 7f8aa6f617d..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SharedPublicIpAddressConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a virtual machine that determine how it is connected to a load - * balancer. - */ -public class SharedPublicIpAddressConfiguration { - /** - * The incoming NAT rules. - */ - @JsonProperty(value = "inboundNatRules") - private List inboundNatRules; - - /** - * Get the inboundNatRules value. - * - * @return the inboundNatRules value - */ - public List inboundNatRules() { - return this.inboundNatRules; - } - - /** - * Set the inboundNatRules value. - * - * @param inboundNatRules the inboundNatRules value to set - * @return the SharedPublicIpAddressConfiguration object itself. - */ - public SharedPublicIpAddressConfiguration withInboundNatRules(List inboundNatRules) { - this.inboundNatRules = inboundNatRules; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SharedPublicIpAddressConfigurationFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SharedPublicIpAddressConfigurationFragment.java deleted file mode 100644 index 2c885cf39a6..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SharedPublicIpAddressConfigurationFragment.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a virtual machine that determine how it is connected to a load - * balancer. - */ -public class SharedPublicIpAddressConfigurationFragment { - /** - * The incoming NAT rules. - */ - @JsonProperty(value = "inboundNatRules") - private List inboundNatRules; - - /** - * Get the inboundNatRules value. - * - * @return the inboundNatRules value - */ - public List inboundNatRules() { - return this.inboundNatRules; - } - - /** - * Set the inboundNatRules value. - * - * @param inboundNatRules the inboundNatRules value to set - * @return the SharedPublicIpAddressConfigurationFragment object itself. - */ - public SharedPublicIpAddressConfigurationFragment withInboundNatRules(List inboundNatRules) { - this.inboundNatRules = inboundNatRules; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ShutdownNotificationContent.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ShutdownNotificationContent.java deleted file mode 100644 index 007642fb490..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/ShutdownNotificationContent.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The contents of a shutdown notification. Webhooks can use this type to - * deserialize the request body when they get notified of an imminent shutdown. - */ -public class ShutdownNotificationContent { - /** - * The URL to skip auto-shutdown. - */ - @JsonProperty(value = "skipUrl") - private String skipUrl; - - /** - * The URL to delay shutdown by 60 minutes. - */ - @JsonProperty(value = "delayUrl60") - private String delayUrl60; - - /** - * The URL to delay shutdown by 2 hours. - */ - @JsonProperty(value = "delayUrl120") - private String delayUrl120; - - /** - * The virtual machine to be shut down. - */ - @JsonProperty(value = "vmName") - private String vmName; - - /** - * The GUID for the virtual machine to be shut down. - */ - @JsonProperty(value = "guid") - private String guid; - - /** - * The owner of the virtual machine. - */ - @JsonProperty(value = "owner") - private String owner; - - /** - * The event for which a notification will be sent. - */ - @JsonProperty(value = "eventType") - private String eventType; - - /** - * The text for the notification. - */ - @JsonProperty(value = "text") - private String text; - - /** - * The subscription ID for the schedule. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** - * The resource group name for the schedule. - */ - @JsonProperty(value = "resourceGroupName") - private String resourceGroupName; - - /** - * The lab for the schedule. - */ - @JsonProperty(value = "labName") - private String labName; - - /** - * Get the skipUrl value. - * - * @return the skipUrl value - */ - public String skipUrl() { - return this.skipUrl; - } - - /** - * Set the skipUrl value. - * - * @param skipUrl the skipUrl value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withSkipUrl(String skipUrl) { - this.skipUrl = skipUrl; - return this; - } - - /** - * Get the delayUrl60 value. - * - * @return the delayUrl60 value - */ - public String delayUrl60() { - return this.delayUrl60; - } - - /** - * Set the delayUrl60 value. - * - * @param delayUrl60 the delayUrl60 value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withDelayUrl60(String delayUrl60) { - this.delayUrl60 = delayUrl60; - return this; - } - - /** - * Get the delayUrl120 value. - * - * @return the delayUrl120 value - */ - public String delayUrl120() { - return this.delayUrl120; - } - - /** - * Set the delayUrl120 value. - * - * @param delayUrl120 the delayUrl120 value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withDelayUrl120(String delayUrl120) { - this.delayUrl120 = delayUrl120; - return this; - } - - /** - * Get the vmName value. - * - * @return the vmName value - */ - public String vmName() { - return this.vmName; - } - - /** - * Set the vmName value. - * - * @param vmName the vmName value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withVmName(String vmName) { - this.vmName = vmName; - return this; - } - - /** - * Get the guid value. - * - * @return the guid value - */ - public String guid() { - return this.guid; - } - - /** - * Set the guid value. - * - * @param guid the guid value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withGuid(String guid) { - this.guid = guid; - return this; - } - - /** - * Get the owner value. - * - * @return the owner value - */ - public String owner() { - return this.owner; - } - - /** - * Set the owner value. - * - * @param owner the owner value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withOwner(String owner) { - this.owner = owner; - return this; - } - - /** - * Get the eventType value. - * - * @return the eventType value - */ - public String eventType() { - return this.eventType; - } - - /** - * Set the eventType value. - * - * @param eventType the eventType value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withEventType(String eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get the text value. - * - * @return the text value - */ - public String text() { - return this.text; - } - - /** - * Set the text value. - * - * @param text the text value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withText(String text) { - this.text = text; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroupName value. - * - * @return the resourceGroupName value - */ - public String resourceGroupName() { - return this.resourceGroupName; - } - - /** - * Set the resourceGroupName value. - * - * @param resourceGroupName the resourceGroupName value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withResourceGroupName(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - /** - * Get the labName value. - * - * @return the labName value - */ - public String labName() { - return this.labName; - } - - /** - * Set the labName value. - * - * @param labName the labName value to set - * @return the ShutdownNotificationContent object itself. - */ - public ShutdownNotificationContent withLabName(String labName) { - this.labName = labName; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SourceControlType.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SourceControlType.java deleted file mode 100644 index 9513c151003..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SourceControlType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SourceControlType. - */ -public final class SourceControlType { - /** Static value VsoGit for SourceControlType. */ - public static final SourceControlType VSO_GIT = new SourceControlType("VsoGit"); - - /** Static value GitHub for SourceControlType. */ - public static final SourceControlType GIT_HUB = new SourceControlType("GitHub"); - - private String value; - - /** - * Creates a custom value for SourceControlType. - * @param value the custom value - */ - public SourceControlType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SourceControlType)) { - return false; - } - if (obj == this) { - return true; - } - SourceControlType rhs = (SourceControlType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/StorageType.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/StorageType.java deleted file mode 100644 index 2ea29a682e6..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/StorageType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for StorageType. - */ -public final class StorageType { - /** Static value Standard for StorageType. */ - public static final StorageType STANDARD = new StorageType("Standard"); - - /** Static value Premium for StorageType. */ - public static final StorageType PREMIUM = new StorageType("Premium"); - - private String value; - - /** - * Creates a custom value for StorageType. - * @param value the custom value - */ - public StorageType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof StorageType)) { - return false; - } - if (obj == this) { - return true; - } - StorageType rhs = (StorageType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Subnet.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Subnet.java deleted file mode 100644 index 594ef7a24c0..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/Subnet.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Subnet information. - */ -public class Subnet { - /** - * The resource ID of the subnet. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * The name of the subnet as seen in the lab. - */ - @JsonProperty(value = "labSubnetName") - private String labSubnetName; - - /** - * The permission policy of the subnet for allowing public IP addresses - * (i.e. Allow, Deny)). Possible values include: 'Default', 'Deny', - * 'Allow'. - */ - @JsonProperty(value = "allowPublicIp") - private UsagePermissionType allowPublicIp; - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the Subnet object itself. - */ - public Subnet withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the labSubnetName value. - * - * @return the labSubnetName value - */ - public String labSubnetName() { - return this.labSubnetName; - } - - /** - * Set the labSubnetName value. - * - * @param labSubnetName the labSubnetName value to set - * @return the Subnet object itself. - */ - public Subnet withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; - return this; - } - - /** - * Get the allowPublicIp value. - * - * @return the allowPublicIp value - */ - public UsagePermissionType allowPublicIp() { - return this.allowPublicIp; - } - - /** - * Set the allowPublicIp value. - * - * @param allowPublicIp the allowPublicIp value to set - * @return the Subnet object itself. - */ - public Subnet withAllowPublicIp(UsagePermissionType allowPublicIp) { - this.allowPublicIp = allowPublicIp; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetFragment.java deleted file mode 100644 index 8ff31d92070..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetFragment.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Subnet information. - */ -public class SubnetFragment { - /** - * The resource ID of the subnet. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * The name of the subnet as seen in the lab. - */ - @JsonProperty(value = "labSubnetName") - private String labSubnetName; - - /** - * The permission policy of the subnet for allowing public IP addresses - * (i.e. Allow, Deny)). Possible values include: 'Default', 'Deny', - * 'Allow'. - */ - @JsonProperty(value = "allowPublicIp") - private UsagePermissionType allowPublicIp; - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the SubnetFragment object itself. - */ - public SubnetFragment withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the labSubnetName value. - * - * @return the labSubnetName value - */ - public String labSubnetName() { - return this.labSubnetName; - } - - /** - * Set the labSubnetName value. - * - * @param labSubnetName the labSubnetName value to set - * @return the SubnetFragment object itself. - */ - public SubnetFragment withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; - return this; - } - - /** - * Get the allowPublicIp value. - * - * @return the allowPublicIp value - */ - public UsagePermissionType allowPublicIp() { - return this.allowPublicIp; - } - - /** - * Set the allowPublicIp value. - * - * @param allowPublicIp the allowPublicIp value to set - * @return the SubnetFragment object itself. - */ - public SubnetFragment withAllowPublicIp(UsagePermissionType allowPublicIp) { - this.allowPublicIp = allowPublicIp; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetOverride.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetOverride.java deleted file mode 100644 index 1735313bd21..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetOverride.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Property overrides on a subnet of a virtual network. - */ -public class SubnetOverride { - /** - * The resource ID of the subnet. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * The name given to the subnet within the lab. - */ - @JsonProperty(value = "labSubnetName") - private String labSubnetName; - - /** - * Indicates whether this subnet can be used during virtual machine - * creation (i.e. Allow, Deny). Possible values include: 'Default', 'Deny', - * 'Allow'. - */ - @JsonProperty(value = "useInVmCreationPermission") - private UsagePermissionType useInVmCreationPermission; - - /** - * Indicates whether public IP addresses can be assigned to virtual - * machines on this subnet (i.e. Allow, Deny). Possible values include: - * 'Default', 'Deny', 'Allow'. - */ - @JsonProperty(value = "usePublicIpAddressPermission") - private UsagePermissionType usePublicIpAddressPermission; - - /** - * Properties that virtual machines on this subnet will share. - */ - @JsonProperty(value = "sharedPublicIpAddressConfiguration") - private SubnetSharedPublicIpAddressConfiguration sharedPublicIpAddressConfiguration; - - /** - * The virtual network pool associated with this subnet. - */ - @JsonProperty(value = "virtualNetworkPoolName") - private String virtualNetworkPoolName; - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the SubnetOverride object itself. - */ - public SubnetOverride withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the labSubnetName value. - * - * @return the labSubnetName value - */ - public String labSubnetName() { - return this.labSubnetName; - } - - /** - * Set the labSubnetName value. - * - * @param labSubnetName the labSubnetName value to set - * @return the SubnetOverride object itself. - */ - public SubnetOverride withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; - return this; - } - - /** - * Get the useInVmCreationPermission value. - * - * @return the useInVmCreationPermission value - */ - public UsagePermissionType useInVmCreationPermission() { - return this.useInVmCreationPermission; - } - - /** - * Set the useInVmCreationPermission value. - * - * @param useInVmCreationPermission the useInVmCreationPermission value to set - * @return the SubnetOverride object itself. - */ - public SubnetOverride withUseInVmCreationPermission(UsagePermissionType useInVmCreationPermission) { - this.useInVmCreationPermission = useInVmCreationPermission; - return this; - } - - /** - * Get the usePublicIpAddressPermission value. - * - * @return the usePublicIpAddressPermission value - */ - public UsagePermissionType usePublicIpAddressPermission() { - return this.usePublicIpAddressPermission; - } - - /** - * Set the usePublicIpAddressPermission value. - * - * @param usePublicIpAddressPermission the usePublicIpAddressPermission value to set - * @return the SubnetOverride object itself. - */ - public SubnetOverride withUsePublicIpAddressPermission(UsagePermissionType usePublicIpAddressPermission) { - this.usePublicIpAddressPermission = usePublicIpAddressPermission; - return this; - } - - /** - * Get the sharedPublicIpAddressConfiguration value. - * - * @return the sharedPublicIpAddressConfiguration value - */ - public SubnetSharedPublicIpAddressConfiguration sharedPublicIpAddressConfiguration() { - return this.sharedPublicIpAddressConfiguration; - } - - /** - * Set the sharedPublicIpAddressConfiguration value. - * - * @param sharedPublicIpAddressConfiguration the sharedPublicIpAddressConfiguration value to set - * @return the SubnetOverride object itself. - */ - public SubnetOverride withSharedPublicIpAddressConfiguration(SubnetSharedPublicIpAddressConfiguration sharedPublicIpAddressConfiguration) { - this.sharedPublicIpAddressConfiguration = sharedPublicIpAddressConfiguration; - return this; - } - - /** - * Get the virtualNetworkPoolName value. - * - * @return the virtualNetworkPoolName value - */ - public String virtualNetworkPoolName() { - return this.virtualNetworkPoolName; - } - - /** - * Set the virtualNetworkPoolName value. - * - * @param virtualNetworkPoolName the virtualNetworkPoolName value to set - * @return the SubnetOverride object itself. - */ - public SubnetOverride withVirtualNetworkPoolName(String virtualNetworkPoolName) { - this.virtualNetworkPoolName = virtualNetworkPoolName; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetOverrideFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetOverrideFragment.java deleted file mode 100644 index db383676ca5..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetOverrideFragment.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Property overrides on a subnet of a virtual network. - */ -public class SubnetOverrideFragment { - /** - * The resource ID of the subnet. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * The name given to the subnet within the lab. - */ - @JsonProperty(value = "labSubnetName") - private String labSubnetName; - - /** - * Indicates whether this subnet can be used during virtual machine - * creation (i.e. Allow, Deny). Possible values include: 'Default', 'Deny', - * 'Allow'. - */ - @JsonProperty(value = "useInVmCreationPermission") - private UsagePermissionType useInVmCreationPermission; - - /** - * Indicates whether public IP addresses can be assigned to virtual - * machines on this subnet (i.e. Allow, Deny). Possible values include: - * 'Default', 'Deny', 'Allow'. - */ - @JsonProperty(value = "usePublicIpAddressPermission") - private UsagePermissionType usePublicIpAddressPermission; - - /** - * Properties that virtual machines on this subnet will share. - */ - @JsonProperty(value = "sharedPublicIpAddressConfiguration") - private SubnetSharedPublicIpAddressConfigurationFragment sharedPublicIpAddressConfiguration; - - /** - * The virtual network pool associated with this subnet. - */ - @JsonProperty(value = "virtualNetworkPoolName") - private String virtualNetworkPoolName; - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the SubnetOverrideFragment object itself. - */ - public SubnetOverrideFragment withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the labSubnetName value. - * - * @return the labSubnetName value - */ - public String labSubnetName() { - return this.labSubnetName; - } - - /** - * Set the labSubnetName value. - * - * @param labSubnetName the labSubnetName value to set - * @return the SubnetOverrideFragment object itself. - */ - public SubnetOverrideFragment withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; - return this; - } - - /** - * Get the useInVmCreationPermission value. - * - * @return the useInVmCreationPermission value - */ - public UsagePermissionType useInVmCreationPermission() { - return this.useInVmCreationPermission; - } - - /** - * Set the useInVmCreationPermission value. - * - * @param useInVmCreationPermission the useInVmCreationPermission value to set - * @return the SubnetOverrideFragment object itself. - */ - public SubnetOverrideFragment withUseInVmCreationPermission(UsagePermissionType useInVmCreationPermission) { - this.useInVmCreationPermission = useInVmCreationPermission; - return this; - } - - /** - * Get the usePublicIpAddressPermission value. - * - * @return the usePublicIpAddressPermission value - */ - public UsagePermissionType usePublicIpAddressPermission() { - return this.usePublicIpAddressPermission; - } - - /** - * Set the usePublicIpAddressPermission value. - * - * @param usePublicIpAddressPermission the usePublicIpAddressPermission value to set - * @return the SubnetOverrideFragment object itself. - */ - public SubnetOverrideFragment withUsePublicIpAddressPermission(UsagePermissionType usePublicIpAddressPermission) { - this.usePublicIpAddressPermission = usePublicIpAddressPermission; - return this; - } - - /** - * Get the sharedPublicIpAddressConfiguration value. - * - * @return the sharedPublicIpAddressConfiguration value - */ - public SubnetSharedPublicIpAddressConfigurationFragment sharedPublicIpAddressConfiguration() { - return this.sharedPublicIpAddressConfiguration; - } - - /** - * Set the sharedPublicIpAddressConfiguration value. - * - * @param sharedPublicIpAddressConfiguration the sharedPublicIpAddressConfiguration value to set - * @return the SubnetOverrideFragment object itself. - */ - public SubnetOverrideFragment withSharedPublicIpAddressConfiguration(SubnetSharedPublicIpAddressConfigurationFragment sharedPublicIpAddressConfiguration) { - this.sharedPublicIpAddressConfiguration = sharedPublicIpAddressConfiguration; - return this; - } - - /** - * Get the virtualNetworkPoolName value. - * - * @return the virtualNetworkPoolName value - */ - public String virtualNetworkPoolName() { - return this.virtualNetworkPoolName; - } - - /** - * Set the virtualNetworkPoolName value. - * - * @param virtualNetworkPoolName the virtualNetworkPoolName value to set - * @return the SubnetOverrideFragment object itself. - */ - public SubnetOverrideFragment withVirtualNetworkPoolName(String virtualNetworkPoolName) { - this.virtualNetworkPoolName = virtualNetworkPoolName; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetSharedPublicIpAddressConfiguration.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetSharedPublicIpAddressConfiguration.java deleted file mode 100644 index 05bb704f5bc..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetSharedPublicIpAddressConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Configuration for public IP address sharing. - */ -public class SubnetSharedPublicIpAddressConfiguration { - /** - * Backend ports that virtual machines on this subnet are allowed to - * expose. - */ - @JsonProperty(value = "allowedPorts") - private List allowedPorts; - - /** - * Get the allowedPorts value. - * - * @return the allowedPorts value - */ - public List allowedPorts() { - return this.allowedPorts; - } - - /** - * Set the allowedPorts value. - * - * @param allowedPorts the allowedPorts value to set - * @return the SubnetSharedPublicIpAddressConfiguration object itself. - */ - public SubnetSharedPublicIpAddressConfiguration withAllowedPorts(List allowedPorts) { - this.allowedPorts = allowedPorts; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetSharedPublicIpAddressConfigurationFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetSharedPublicIpAddressConfigurationFragment.java deleted file mode 100644 index c32a2ec6f37..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/SubnetSharedPublicIpAddressConfigurationFragment.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Configuration for public IP address sharing. - */ -public class SubnetSharedPublicIpAddressConfigurationFragment { - /** - * Backend ports that virtual machines on this subnet are allowed to - * expose. - */ - @JsonProperty(value = "allowedPorts") - private List allowedPorts; - - /** - * Get the allowedPorts value. - * - * @return the allowedPorts value - */ - public List allowedPorts() { - return this.allowedPorts; - } - - /** - * Set the allowedPorts value. - * - * @param allowedPorts the allowedPorts value to set - * @return the SubnetSharedPublicIpAddressConfigurationFragment object itself. - */ - public SubnetSharedPublicIpAddressConfigurationFragment withAllowedPorts(List allowedPorts) { - this.allowedPorts = allowedPorts; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TargetCostProperties.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TargetCostProperties.java deleted file mode 100644 index 79ea11b5a21..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TargetCostProperties.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a cost target. - */ -public class TargetCostProperties { - /** - * Target cost status. Possible values include: 'Enabled', 'Disabled'. - */ - @JsonProperty(value = "status") - private TargetCostStatus status; - - /** - * Lab target cost. - */ - @JsonProperty(value = "target") - private Integer target; - - /** - * Cost thresholds. - */ - @JsonProperty(value = "costThresholds") - private List costThresholds; - - /** - * Reporting cycle start date. - */ - @JsonProperty(value = "cycleStartDateTime") - private DateTime cycleStartDateTime; - - /** - * Reporting cycle end date. - */ - @JsonProperty(value = "cycleEndDateTime") - private DateTime cycleEndDateTime; - - /** - * Reporting cycle type. Possible values include: 'CalendarMonth', - * 'Custom'. - */ - @JsonProperty(value = "cycleType") - private ReportingCycleType cycleType; - - /** - * Get the status value. - * - * @return the status value - */ - public TargetCostStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the TargetCostProperties object itself. - */ - public TargetCostProperties withStatus(TargetCostStatus status) { - this.status = status; - return this; - } - - /** - * Get the target value. - * - * @return the target value - */ - public Integer target() { - return this.target; - } - - /** - * Set the target value. - * - * @param target the target value to set - * @return the TargetCostProperties object itself. - */ - public TargetCostProperties withTarget(Integer target) { - this.target = target; - return this; - } - - /** - * Get the costThresholds value. - * - * @return the costThresholds value - */ - public List costThresholds() { - return this.costThresholds; - } - - /** - * Set the costThresholds value. - * - * @param costThresholds the costThresholds value to set - * @return the TargetCostProperties object itself. - */ - public TargetCostProperties withCostThresholds(List costThresholds) { - this.costThresholds = costThresholds; - return this; - } - - /** - * Get the cycleStartDateTime value. - * - * @return the cycleStartDateTime value - */ - public DateTime cycleStartDateTime() { - return this.cycleStartDateTime; - } - - /** - * Set the cycleStartDateTime value. - * - * @param cycleStartDateTime the cycleStartDateTime value to set - * @return the TargetCostProperties object itself. - */ - public TargetCostProperties withCycleStartDateTime(DateTime cycleStartDateTime) { - this.cycleStartDateTime = cycleStartDateTime; - return this; - } - - /** - * Get the cycleEndDateTime value. - * - * @return the cycleEndDateTime value - */ - public DateTime cycleEndDateTime() { - return this.cycleEndDateTime; - } - - /** - * Set the cycleEndDateTime value. - * - * @param cycleEndDateTime the cycleEndDateTime value to set - * @return the TargetCostProperties object itself. - */ - public TargetCostProperties withCycleEndDateTime(DateTime cycleEndDateTime) { - this.cycleEndDateTime = cycleEndDateTime; - return this; - } - - /** - * Get the cycleType value. - * - * @return the cycleType value - */ - public ReportingCycleType cycleType() { - return this.cycleType; - } - - /** - * Set the cycleType value. - * - * @param cycleType the cycleType value to set - * @return the TargetCostProperties object itself. - */ - public TargetCostProperties withCycleType(ReportingCycleType cycleType) { - this.cycleType = cycleType; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TargetCostStatus.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TargetCostStatus.java deleted file mode 100644 index 1fc16be8600..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TargetCostStatus.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for TargetCostStatus. - */ -public final class TargetCostStatus { - /** Static value Enabled for TargetCostStatus. */ - public static final TargetCostStatus ENABLED = new TargetCostStatus("Enabled"); - - /** Static value Disabled for TargetCostStatus. */ - public static final TargetCostStatus DISABLED = new TargetCostStatus("Disabled"); - - private String value; - - /** - * Creates a custom value for TargetCostStatus. - * @param value the custom value - */ - public TargetCostStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof TargetCostStatus)) { - return false; - } - if (obj == this) { - return true; - } - TargetCostStatus rhs = (TargetCostStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TransportProtocol.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TransportProtocol.java deleted file mode 100644 index bd9f227a6fd..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/TransportProtocol.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for TransportProtocol. - */ -public final class TransportProtocol { - /** Static value Tcp for TransportProtocol. */ - public static final TransportProtocol TCP = new TransportProtocol("Tcp"); - - /** Static value Udp for TransportProtocol. */ - public static final TransportProtocol UDP = new TransportProtocol("Udp"); - - private String value; - - /** - * Creates a custom value for TransportProtocol. - * @param value the custom value - */ - public TransportProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof TransportProtocol)) { - return false; - } - if (obj == this) { - return true; - } - TransportProtocol rhs = (TransportProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UsagePermissionType.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UsagePermissionType.java deleted file mode 100644 index 5962729f96a..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UsagePermissionType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for UsagePermissionType. - */ -public final class UsagePermissionType { - /** Static value Default for UsagePermissionType. */ - public static final UsagePermissionType DEFAULT = new UsagePermissionType("Default"); - - /** Static value Deny for UsagePermissionType. */ - public static final UsagePermissionType DENY = new UsagePermissionType("Deny"); - - /** Static value Allow for UsagePermissionType. */ - public static final UsagePermissionType ALLOW = new UsagePermissionType("Allow"); - - private String value; - - /** - * Creates a custom value for UsagePermissionType. - * @param value the custom value - */ - public UsagePermissionType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof UsagePermissionType)) { - return false; - } - if (obj == this) { - return true; - } - UsagePermissionType rhs = (UsagePermissionType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserIdentity.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserIdentity.java deleted file mode 100644 index e1448df3654..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserIdentity.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Identity attributes of a lab user. - */ -public class UserIdentity { - /** - * Set to the principal name / UPN of the client JWT making the request. - */ - @JsonProperty(value = "principalName") - private String principalName; - - /** - * Set to the principal Id of the client JWT making the request. Service - * principal will not have the principal Id. - */ - @JsonProperty(value = "principalId") - private String principalId; - - /** - * Set to the tenant ID of the client JWT making the request. - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /** - * Set to the object Id of the client JWT making the request. Not all users - * have object Id. For CSP (reseller) scenarios for example, object Id is - * not available. - */ - @JsonProperty(value = "objectId") - private String objectId; - - /** - * Set to the app Id of the client JWT making the request. - */ - @JsonProperty(value = "appId") - private String appId; - - /** - * Get the principalName value. - * - * @return the principalName value - */ - public String principalName() { - return this.principalName; - } - - /** - * Set the principalName value. - * - * @param principalName the principalName value to set - * @return the UserIdentity object itself. - */ - public UserIdentity withPrincipalName(String principalName) { - this.principalName = principalName; - return this; - } - - /** - * Get the principalId value. - * - * @return the principalId value - */ - public String principalId() { - return this.principalId; - } - - /** - * Set the principalId value. - * - * @param principalId the principalId value to set - * @return the UserIdentity object itself. - */ - public UserIdentity withPrincipalId(String principalId) { - this.principalId = principalId; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId value. - * - * @param tenantId the tenantId value to set - * @return the UserIdentity object itself. - */ - public UserIdentity withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the objectId value. - * - * @return the objectId value - */ - public String objectId() { - return this.objectId; - } - - /** - * Set the objectId value. - * - * @param objectId the objectId value to set - * @return the UserIdentity object itself. - */ - public UserIdentity withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the appId value. - * - * @return the appId value - */ - public String appId() { - return this.appId; - } - - /** - * Set the appId value. - * - * @param appId the appId value to set - * @return the UserIdentity object itself. - */ - public UserIdentity withAppId(String appId) { - this.appId = appId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserIdentityFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserIdentityFragment.java deleted file mode 100644 index efcb048772b..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserIdentityFragment.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Identity attributes of a lab user. - */ -public class UserIdentityFragment { - /** - * Set to the principal name / UPN of the client JWT making the request. - */ - @JsonProperty(value = "principalName") - private String principalName; - - /** - * Set to the principal Id of the client JWT making the request. Service - * principal will not have the principal Id. - */ - @JsonProperty(value = "principalId") - private String principalId; - - /** - * Set to the tenant ID of the client JWT making the request. - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /** - * Set to the object Id of the client JWT making the request. Not all users - * have object Id. For CSP (reseller) scenarios for example, object Id is - * not available. - */ - @JsonProperty(value = "objectId") - private String objectId; - - /** - * Set to the app Id of the client JWT making the request. - */ - @JsonProperty(value = "appId") - private String appId; - - /** - * Get the principalName value. - * - * @return the principalName value - */ - public String principalName() { - return this.principalName; - } - - /** - * Set the principalName value. - * - * @param principalName the principalName value to set - * @return the UserIdentityFragment object itself. - */ - public UserIdentityFragment withPrincipalName(String principalName) { - this.principalName = principalName; - return this; - } - - /** - * Get the principalId value. - * - * @return the principalId value - */ - public String principalId() { - return this.principalId; - } - - /** - * Set the principalId value. - * - * @param principalId the principalId value to set - * @return the UserIdentityFragment object itself. - */ - public UserIdentityFragment withPrincipalId(String principalId) { - this.principalId = principalId; - return this; - } - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId value. - * - * @param tenantId the tenantId value to set - * @return the UserIdentityFragment object itself. - */ - public UserIdentityFragment withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the objectId value. - * - * @return the objectId value - */ - public String objectId() { - return this.objectId; - } - - /** - * Set the objectId value. - * - * @param objectId the objectId value to set - * @return the UserIdentityFragment object itself. - */ - public UserIdentityFragment withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the appId value. - * - * @return the appId value - */ - public String appId() { - return this.appId; - } - - /** - * Set the appId value. - * - * @param appId the appId value to set - * @return the UserIdentityFragment object itself. - */ - public UserIdentityFragment withAppId(String appId) { - this.appId = appId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserSecretStore.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserSecretStore.java deleted file mode 100644 index ddd381171b1..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserSecretStore.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a user's secret store. - */ -public class UserSecretStore { - /** - * The URI of the user's Key vault. - */ - @JsonProperty(value = "keyVaultUri") - private String keyVaultUri; - - /** - * The ID of the user's Key vault. - */ - @JsonProperty(value = "keyVaultId") - private String keyVaultId; - - /** - * Get the keyVaultUri value. - * - * @return the keyVaultUri value - */ - public String keyVaultUri() { - return this.keyVaultUri; - } - - /** - * Set the keyVaultUri value. - * - * @param keyVaultUri the keyVaultUri value to set - * @return the UserSecretStore object itself. - */ - public UserSecretStore withKeyVaultUri(String keyVaultUri) { - this.keyVaultUri = keyVaultUri; - return this; - } - - /** - * Get the keyVaultId value. - * - * @return the keyVaultId value - */ - public String keyVaultId() { - return this.keyVaultId; - } - - /** - * Set the keyVaultId value. - * - * @param keyVaultId the keyVaultId value to set - * @return the UserSecretStore object itself. - */ - public UserSecretStore withKeyVaultId(String keyVaultId) { - this.keyVaultId = keyVaultId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserSecretStoreFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserSecretStoreFragment.java deleted file mode 100644 index 7bc3a12f43b..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/UserSecretStoreFragment.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a user's secret store. - */ -public class UserSecretStoreFragment { - /** - * The URI of the user's Key vault. - */ - @JsonProperty(value = "keyVaultUri") - private String keyVaultUri; - - /** - * The ID of the user's Key vault. - */ - @JsonProperty(value = "keyVaultId") - private String keyVaultId; - - /** - * Get the keyVaultUri value. - * - * @return the keyVaultUri value - */ - public String keyVaultUri() { - return this.keyVaultUri; - } - - /** - * Set the keyVaultUri value. - * - * @param keyVaultUri the keyVaultUri value to set - * @return the UserSecretStoreFragment object itself. - */ - public UserSecretStoreFragment withKeyVaultUri(String keyVaultUri) { - this.keyVaultUri = keyVaultUri; - return this; - } - - /** - * Get the keyVaultId value. - * - * @return the keyVaultId value - */ - public String keyVaultId() { - return this.keyVaultId; - } - - /** - * Set the keyVaultId value. - * - * @param keyVaultId the keyVaultId value to set - * @return the UserSecretStoreFragment object itself. - */ - public UserSecretStoreFragment withKeyVaultId(String keyVaultId) { - this.keyVaultId = keyVaultId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/VirtualMachineCreationSource.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/VirtualMachineCreationSource.java deleted file mode 100644 index b5c8b886b97..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/VirtualMachineCreationSource.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for VirtualMachineCreationSource. - */ -public final class VirtualMachineCreationSource { - /** Static value FromCustomImage for VirtualMachineCreationSource. */ - public static final VirtualMachineCreationSource FROM_CUSTOM_IMAGE = new VirtualMachineCreationSource("FromCustomImage"); - - /** Static value FromGalleryImage for VirtualMachineCreationSource. */ - public static final VirtualMachineCreationSource FROM_GALLERY_IMAGE = new VirtualMachineCreationSource("FromGalleryImage"); - - private String value; - - /** - * Creates a custom value for VirtualMachineCreationSource. - * @param value the custom value - */ - public VirtualMachineCreationSource(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VirtualMachineCreationSource)) { - return false; - } - if (obj == this) { - return true; - } - VirtualMachineCreationSource rhs = (VirtualMachineCreationSource) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WeekDetails.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WeekDetails.java deleted file mode 100644 index d6766e42f9b..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WeekDetails.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a weekly schedule. - */ -public class WeekDetails { - /** - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - */ - @JsonProperty(value = "weekdays") - private List weekdays; - - /** - * The time of the day the schedule will occur. - */ - @JsonProperty(value = "time") - private String time; - - /** - * Get the weekdays value. - * - * @return the weekdays value - */ - public List weekdays() { - return this.weekdays; - } - - /** - * Set the weekdays value. - * - * @param weekdays the weekdays value to set - * @return the WeekDetails object itself. - */ - public WeekDetails withWeekdays(List weekdays) { - this.weekdays = weekdays; - return this; - } - - /** - * Get the time value. - * - * @return the time value - */ - public String time() { - return this.time; - } - - /** - * Set the time value. - * - * @param time the time value to set - * @return the WeekDetails object itself. - */ - public WeekDetails withTime(String time) { - this.time = time; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WeekDetailsFragment.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WeekDetailsFragment.java deleted file mode 100644 index 86bff7fc27b..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WeekDetailsFragment.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a weekly schedule. - */ -public class WeekDetailsFragment { - /** - * The days of the week for which the schedule is set (e.g. Sunday, Monday, - * Tuesday, etc.). - */ - @JsonProperty(value = "weekdays") - private List weekdays; - - /** - * The time of the day the schedule will occur. - */ - @JsonProperty(value = "time") - private String time; - - /** - * Get the weekdays value. - * - * @return the weekdays value - */ - public List weekdays() { - return this.weekdays; - } - - /** - * Set the weekdays value. - * - * @param weekdays the weekdays value to set - * @return the WeekDetailsFragment object itself. - */ - public WeekDetailsFragment withWeekdays(List weekdays) { - this.weekdays = weekdays; - return this; - } - - /** - * Get the time value. - * - * @return the time value - */ - public String time() { - return this.time; - } - - /** - * Set the time value. - * - * @param time the time value to set - * @return the WeekDetailsFragment object itself. - */ - public WeekDetailsFragment withTime(String time) { - this.time = time; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WindowsOsInfo.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WindowsOsInfo.java deleted file mode 100644 index 429c72b96c1..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WindowsOsInfo.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about a Windows OS. - */ -public class WindowsOsInfo { - /** - * The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, - * SysprepApplied). Possible values include: 'NonSysprepped', - * 'SysprepRequested', 'SysprepApplied'. - */ - @JsonProperty(value = "windowsOsState") - private WindowsOsState windowsOsState; - - /** - * Get the windowsOsState value. - * - * @return the windowsOsState value - */ - public WindowsOsState windowsOsState() { - return this.windowsOsState; - } - - /** - * Set the windowsOsState value. - * - * @param windowsOsState the windowsOsState value to set - * @return the WindowsOsInfo object itself. - */ - public WindowsOsInfo withWindowsOsState(WindowsOsState windowsOsState) { - this.windowsOsState = windowsOsState; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WindowsOsState.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WindowsOsState.java deleted file mode 100644 index 116abfb0826..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/WindowsOsState.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for WindowsOsState. - */ -public final class WindowsOsState { - /** Static value NonSysprepped for WindowsOsState. */ - public static final WindowsOsState NON_SYSPREPPED = new WindowsOsState("NonSysprepped"); - - /** Static value SysprepRequested for WindowsOsState. */ - public static final WindowsOsState SYSPREP_REQUESTED = new WindowsOsState("SysprepRequested"); - - /** Static value SysprepApplied for WindowsOsState. */ - public static final WindowsOsState SYSPREP_APPLIED = new WindowsOsState("SysprepApplied"); - - private String value; - - /** - * Creates a custom value for WindowsOsState. - * @param value the custom value - */ - public WindowsOsState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof WindowsOsState)) { - return false; - } - if (obj == this) { - return true; - } - WindowsOsState rhs = (WindowsOsState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ApplicableScheduleFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ApplicableScheduleFragmentInner.java deleted file mode 100644 index 3fe9766d12e..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ApplicableScheduleFragmentInner.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Schedules applicable to a virtual machine. The schedules may have been - * defined on a VM or on lab level. - */ -@JsonFlatten -public class ApplicableScheduleFragmentInner extends Resource { - /** - * The auto-shutdown schedule, if one has been set at the lab or lab - * resource level. - */ - @JsonProperty(value = "properties.labVmsShutdown") - private ScheduleFragmentInner labVmsShutdown; - - /** - * The auto-startup schedule, if one has been set at the lab or lab - * resource level. - */ - @JsonProperty(value = "properties.labVmsStartup") - private ScheduleFragmentInner labVmsStartup; - - /** - * Get the labVmsShutdown value. - * - * @return the labVmsShutdown value - */ - public ScheduleFragmentInner labVmsShutdown() { - return this.labVmsShutdown; - } - - /** - * Set the labVmsShutdown value. - * - * @param labVmsShutdown the labVmsShutdown value to set - * @return the ApplicableScheduleFragmentInner object itself. - */ - public ApplicableScheduleFragmentInner withLabVmsShutdown(ScheduleFragmentInner labVmsShutdown) { - this.labVmsShutdown = labVmsShutdown; - return this; - } - - /** - * Get the labVmsStartup value. - * - * @return the labVmsStartup value - */ - public ScheduleFragmentInner labVmsStartup() { - return this.labVmsStartup; - } - - /** - * Set the labVmsStartup value. - * - * @param labVmsStartup the labVmsStartup value to set - * @return the ApplicableScheduleFragmentInner object itself. - */ - public ApplicableScheduleFragmentInner withLabVmsStartup(ScheduleFragmentInner labVmsStartup) { - this.labVmsStartup = labVmsStartup; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ApplicableScheduleInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ApplicableScheduleInner.java deleted file mode 100644 index 120d540cc48..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ApplicableScheduleInner.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Schedules applicable to a virtual machine. The schedules may have been - * defined on a VM or on lab level. - */ -@JsonFlatten -public class ApplicableScheduleInner extends Resource { - /** - * The auto-shutdown schedule, if one has been set at the lab or lab - * resource level. - */ - @JsonProperty(value = "properties.labVmsShutdown") - private ScheduleInner labVmsShutdown; - - /** - * The auto-startup schedule, if one has been set at the lab or lab - * resource level. - */ - @JsonProperty(value = "properties.labVmsStartup") - private ScheduleInner labVmsStartup; - - /** - * Get the labVmsShutdown value. - * - * @return the labVmsShutdown value - */ - public ScheduleInner labVmsShutdown() { - return this.labVmsShutdown; - } - - /** - * Set the labVmsShutdown value. - * - * @param labVmsShutdown the labVmsShutdown value to set - * @return the ApplicableScheduleInner object itself. - */ - public ApplicableScheduleInner withLabVmsShutdown(ScheduleInner labVmsShutdown) { - this.labVmsShutdown = labVmsShutdown; - return this; - } - - /** - * Get the labVmsStartup value. - * - * @return the labVmsStartup value - */ - public ScheduleInner labVmsStartup() { - return this.labVmsStartup; - } - - /** - * Set the labVmsStartup value. - * - * @param labVmsStartup the labVmsStartup value to set - * @return the ApplicableScheduleInner object itself. - */ - public ApplicableScheduleInner withLabVmsStartup(ScheduleInner labVmsStartup) { - this.labVmsStartup = labVmsStartup; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplateInfoInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplateInfoInner.java deleted file mode 100644 index bd6d10622c5..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplateInfoInner.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about a generated ARM template. - */ -public class ArmTemplateInfoInner { - /** - * The template's contents. - */ - @JsonProperty(value = "template") - private Object template; - - /** - * The parameters of the ARM template. - */ - @JsonProperty(value = "parameters") - private Object parameters; - - /** - * Get the template value. - * - * @return the template value - */ - public Object template() { - return this.template; - } - - /** - * Set the template value. - * - * @param template the template value to set - * @return the ArmTemplateInfoInner object itself. - */ - public ArmTemplateInfoInner withTemplate(Object template) { - this.template = template; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public Object parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the ArmTemplateInfoInner object itself. - */ - public ArmTemplateInfoInner withParameters(Object parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplateInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplateInner.java deleted file mode 100644 index 22e4ec61309..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplateInner.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import org.joda.time.DateTime; -import java.util.List; -import com.microsoft.azure.management.devtestlab.ParametersValueFileInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * An Azure Resource Manager template. - */ -@JsonFlatten -public class ArmTemplateInner extends Resource { - /** - * The display name of the ARM template. - */ - @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /** - * The description of the ARM template. - */ - @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * The publisher of the ARM template. - */ - @JsonProperty(value = "properties.publisher", access = JsonProperty.Access.WRITE_ONLY) - private String publisher; - - /** - * The URI to the icon of the ARM template. - */ - @JsonProperty(value = "properties.icon", access = JsonProperty.Access.WRITE_ONLY) - private String icon; - - /** - * The contents of the ARM template. - */ - @JsonProperty(value = "properties.contents", access = JsonProperty.Access.WRITE_ONLY) - private Object contents; - - /** - * The creation date of the armTemplate. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * File name and parameter values information from all - * azuredeploy.*.parameters.json for the ARM template. - */ - @JsonProperty(value = "properties.parametersValueFilesInfo", access = JsonProperty.Access.WRITE_ONLY) - private List parametersValueFilesInfo; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Get the publisher value. - * - * @return the publisher value - */ - public String publisher() { - return this.publisher; - } - - /** - * Get the icon value. - * - * @return the icon value - */ - public String icon() { - return this.icon; - } - - /** - * Get the contents value. - * - * @return the contents value - */ - public Object contents() { - return this.contents; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the parametersValueFilesInfo value. - * - * @return the parametersValueFilesInfo value - */ - public List parametersValueFilesInfo() { - return this.parametersValueFilesInfo; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplatesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplatesInner.java deleted file mode 100644 index 87a50d14100..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArmTemplatesInner.java +++ /dev/null @@ -1,662 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ArmTemplates. - */ -public class ArmTemplatesInner { - /** The Retrofit service to perform REST calls. */ - private ArmTemplatesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of ArmTemplatesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ArmTemplatesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(ArmTemplatesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ArmTemplates to be - * used by Retrofit to perform actually REST calls. - */ - interface ArmTemplatesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArmTemplates list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("artifactSourceName") String artifactSourceName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArmTemplates get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("artifactSourceName") String artifactSourceName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArmTemplates listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArmTemplateInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String artifactSourceName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, artifactSourceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, artifactSourceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArmTemplateInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String artifactSourceName) { - return listWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArmTemplateInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String artifactSourceName) { - return listSinglePageAsync(resourceGroupName, labName, artifactSourceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArmTemplateInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String artifactSourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArmTemplateInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArmTemplateInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArmTemplateInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List azure resource manager templates in a given artifact source. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param artifactSourceName The name of the artifact source. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArmTemplateInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get azure resource manager template. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the azure Resource Manager template. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArmTemplateInner object if successful. - */ - public ArmTemplateInner get(String resourceGroupName, String labName, String artifactSourceName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name).toBlocking().single().body(); - } - - /** - * Get azure resource manager template. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the azure Resource Manager template. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String artifactSourceName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name), serviceCallback); - } - - /** - * Get azure resource manager template. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the azure Resource Manager template. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArmTemplateInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String artifactSourceName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name).map(new Func1, ArmTemplateInner>() { - @Override - public ArmTemplateInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get azure resource manager template. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the azure Resource Manager template. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArmTemplateInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String artifactSourceName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get azure resource manager template. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the azure Resource Manager template. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArmTemplateInner object if successful. - */ - public ArmTemplateInner get(String resourceGroupName, String labName, String artifactSourceName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, expand).toBlocking().single().body(); - } - - /** - * Get azure resource manager template. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the azure Resource Manager template. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String artifactSourceName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, expand), serviceCallback); - } - - /** - * Get azure resource manager template. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the azure Resource Manager template. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArmTemplateInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String artifactSourceName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, expand).map(new Func1, ArmTemplateInner>() { - @Override - public ArmTemplateInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get azure resource manager template. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the azure Resource Manager template. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArmTemplateInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String artifactSourceName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArmTemplateInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArmTemplateInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List azure resource manager templates in a given artifact source. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArmTemplateInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List azure resource manager templates in a given artifact source. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArmTemplateInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactInner.java deleted file mode 100644 index e81dae0e319..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactInner.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * An artifact. - */ -@JsonFlatten -public class ArtifactInner extends Resource { - /** - * The artifact's title. - */ - @JsonProperty(value = "properties.title", access = JsonProperty.Access.WRITE_ONLY) - private String title; - - /** - * The artifact's description. - */ - @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * The artifact's publisher. - */ - @JsonProperty(value = "properties.publisher", access = JsonProperty.Access.WRITE_ONLY) - private String publisher; - - /** - * The file path to the artifact. - */ - @JsonProperty(value = "properties.filePath", access = JsonProperty.Access.WRITE_ONLY) - private String filePath; - - /** - * The URI to the artifact icon. - */ - @JsonProperty(value = "properties.icon", access = JsonProperty.Access.WRITE_ONLY) - private String icon; - - /** - * The artifact's target OS. - */ - @JsonProperty(value = "properties.targetOsType", access = JsonProperty.Access.WRITE_ONLY) - private String targetOsType; - - /** - * The artifact's parameters. - */ - @JsonProperty(value = "properties.parameters", access = JsonProperty.Access.WRITE_ONLY) - private Object parameters; - - /** - * The artifact's creation date. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Get the publisher value. - * - * @return the publisher value - */ - public String publisher() { - return this.publisher; - } - - /** - * Get the filePath value. - * - * @return the filePath value - */ - public String filePath() { - return this.filePath; - } - - /** - * Get the icon value. - * - * @return the icon value - */ - public String icon() { - return this.icon; - } - - /** - * Get the targetOsType value. - * - * @return the targetOsType value - */ - public String targetOsType() { - return this.targetOsType; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public Object parameters() { - return this.parameters; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactInstallPropertiesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactInstallPropertiesInner.java deleted file mode 100644 index 2ec4c716fe3..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactInstallPropertiesInner.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.ArtifactParameterProperties; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of an artifact. - */ -public class ArtifactInstallPropertiesInner { - /** - * The artifact's identifier. - */ - @JsonProperty(value = "artifactId") - private String artifactId; - - /** - * The parameters of the artifact. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * The status of the artifact. - */ - @JsonProperty(value = "status") - private String status; - - /** - * The status message from the deployment. - */ - @JsonProperty(value = "deploymentStatusMessage") - private String deploymentStatusMessage; - - /** - * The status message from the virtual machine extension. - */ - @JsonProperty(value = "vmExtensionStatusMessage") - private String vmExtensionStatusMessage; - - /** - * The time that the artifact starts to install on the virtual machine. - */ - @JsonProperty(value = "installTime") - private DateTime installTime; - - /** - * Get the artifactId value. - * - * @return the artifactId value - */ - public String artifactId() { - return this.artifactId; - } - - /** - * Set the artifactId value. - * - * @param artifactId the artifactId value to set - * @return the ArtifactInstallPropertiesInner object itself. - */ - public ArtifactInstallPropertiesInner withArtifactId(String artifactId) { - this.artifactId = artifactId; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the ArtifactInstallPropertiesInner object itself. - */ - public ArtifactInstallPropertiesInner withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public String status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the ArtifactInstallPropertiesInner object itself. - */ - public ArtifactInstallPropertiesInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the deploymentStatusMessage value. - * - * @return the deploymentStatusMessage value - */ - public String deploymentStatusMessage() { - return this.deploymentStatusMessage; - } - - /** - * Set the deploymentStatusMessage value. - * - * @param deploymentStatusMessage the deploymentStatusMessage value to set - * @return the ArtifactInstallPropertiesInner object itself. - */ - public ArtifactInstallPropertiesInner withDeploymentStatusMessage(String deploymentStatusMessage) { - this.deploymentStatusMessage = deploymentStatusMessage; - return this; - } - - /** - * Get the vmExtensionStatusMessage value. - * - * @return the vmExtensionStatusMessage value - */ - public String vmExtensionStatusMessage() { - return this.vmExtensionStatusMessage; - } - - /** - * Set the vmExtensionStatusMessage value. - * - * @param vmExtensionStatusMessage the vmExtensionStatusMessage value to set - * @return the ArtifactInstallPropertiesInner object itself. - */ - public ArtifactInstallPropertiesInner withVmExtensionStatusMessage(String vmExtensionStatusMessage) { - this.vmExtensionStatusMessage = vmExtensionStatusMessage; - return this; - } - - /** - * Get the installTime value. - * - * @return the installTime value - */ - public DateTime installTime() { - return this.installTime; - } - - /** - * Set the installTime value. - * - * @param installTime the installTime value to set - * @return the ArtifactInstallPropertiesInner object itself. - */ - public ArtifactInstallPropertiesInner withInstallTime(DateTime installTime) { - this.installTime = installTime; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourceFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourceFragmentInner.java deleted file mode 100644 index dea8e1ab4eb..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourceFragmentInner.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.SourceControlType; -import com.microsoft.azure.management.devtestlab.EnableStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Properties of an artifact source. - */ -@JsonFlatten -public class ArtifactSourceFragmentInner extends Resource { - /** - * The artifact source's display name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * The artifact source's URI. - */ - @JsonProperty(value = "properties.uri") - private String uri; - - /** - * The artifact source's type. Possible values include: 'VsoGit', 'GitHub'. - */ - @JsonProperty(value = "properties.sourceType") - private SourceControlType sourceType; - - /** - * The folder containing artifacts. - */ - @JsonProperty(value = "properties.folderPath") - private String folderPath; - - /** - * The folder containing Azure Resource Manager templates. - */ - @JsonProperty(value = "properties.armTemplateFolderPath") - private String armTemplateFolderPath; - - /** - * The artifact source's branch reference. - */ - @JsonProperty(value = "properties.branchRef") - private String branchRef; - - /** - * The security token to authenticate to the artifact source. - */ - @JsonProperty(value = "properties.securityToken") - private String securityToken; - - /** - * Indicates if the artifact source is enabled (values: Enabled, Disabled). - * Possible values include: 'Enabled', 'Disabled'. - */ - @JsonProperty(value = "properties.status") - private EnableStatus status; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the uri value. - * - * @return the uri value - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri value. - * - * @param uri the uri value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the sourceType value. - * - * @return the sourceType value - */ - public SourceControlType sourceType() { - return this.sourceType; - } - - /** - * Set the sourceType value. - * - * @param sourceType the sourceType value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withSourceType(SourceControlType sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get the folderPath value. - * - * @return the folderPath value - */ - public String folderPath() { - return this.folderPath; - } - - /** - * Set the folderPath value. - * - * @param folderPath the folderPath value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withFolderPath(String folderPath) { - this.folderPath = folderPath; - return this; - } - - /** - * Get the armTemplateFolderPath value. - * - * @return the armTemplateFolderPath value - */ - public String armTemplateFolderPath() { - return this.armTemplateFolderPath; - } - - /** - * Set the armTemplateFolderPath value. - * - * @param armTemplateFolderPath the armTemplateFolderPath value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withArmTemplateFolderPath(String armTemplateFolderPath) { - this.armTemplateFolderPath = armTemplateFolderPath; - return this; - } - - /** - * Get the branchRef value. - * - * @return the branchRef value - */ - public String branchRef() { - return this.branchRef; - } - - /** - * Set the branchRef value. - * - * @param branchRef the branchRef value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withBranchRef(String branchRef) { - this.branchRef = branchRef; - return this; - } - - /** - * Get the securityToken value. - * - * @return the securityToken value - */ - public String securityToken() { - return this.securityToken; - } - - /** - * Set the securityToken value. - * - * @param securityToken the securityToken value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withSecurityToken(String securityToken) { - this.securityToken = securityToken; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public EnableStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withStatus(EnableStatus status) { - this.status = status; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the ArtifactSourceFragmentInner object itself. - */ - public ArtifactSourceFragmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourceInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourceInner.java deleted file mode 100644 index 03d421c731f..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourceInner.java +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.SourceControlType; -import com.microsoft.azure.management.devtestlab.EnableStatus; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Properties of an artifact source. - */ -@JsonFlatten -public class ArtifactSourceInner extends Resource { - /** - * The artifact source's display name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /** - * The artifact source's URI. - */ - @JsonProperty(value = "properties.uri") - private String uri; - - /** - * The artifact source's type. Possible values include: 'VsoGit', 'GitHub'. - */ - @JsonProperty(value = "properties.sourceType") - private SourceControlType sourceType; - - /** - * The folder containing artifacts. - */ - @JsonProperty(value = "properties.folderPath") - private String folderPath; - - /** - * The folder containing Azure Resource Manager templates. - */ - @JsonProperty(value = "properties.armTemplateFolderPath") - private String armTemplateFolderPath; - - /** - * The artifact source's branch reference. - */ - @JsonProperty(value = "properties.branchRef") - private String branchRef; - - /** - * The security token to authenticate to the artifact source. - */ - @JsonProperty(value = "properties.securityToken") - private String securityToken; - - /** - * Indicates if the artifact source is enabled (values: Enabled, Disabled). - * Possible values include: 'Enabled', 'Disabled'. - */ - @JsonProperty(value = "properties.status") - private EnableStatus status; - - /** - * The artifact source's creation date. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the uri value. - * - * @return the uri value - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri value. - * - * @param uri the uri value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the sourceType value. - * - * @return the sourceType value - */ - public SourceControlType sourceType() { - return this.sourceType; - } - - /** - * Set the sourceType value. - * - * @param sourceType the sourceType value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withSourceType(SourceControlType sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get the folderPath value. - * - * @return the folderPath value - */ - public String folderPath() { - return this.folderPath; - } - - /** - * Set the folderPath value. - * - * @param folderPath the folderPath value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withFolderPath(String folderPath) { - this.folderPath = folderPath; - return this; - } - - /** - * Get the armTemplateFolderPath value. - * - * @return the armTemplateFolderPath value - */ - public String armTemplateFolderPath() { - return this.armTemplateFolderPath; - } - - /** - * Set the armTemplateFolderPath value. - * - * @param armTemplateFolderPath the armTemplateFolderPath value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withArmTemplateFolderPath(String armTemplateFolderPath) { - this.armTemplateFolderPath = armTemplateFolderPath; - return this; - } - - /** - * Get the branchRef value. - * - * @return the branchRef value - */ - public String branchRef() { - return this.branchRef; - } - - /** - * Set the branchRef value. - * - * @param branchRef the branchRef value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withBranchRef(String branchRef) { - this.branchRef = branchRef; - return this; - } - - /** - * Get the securityToken value. - * - * @return the securityToken value - */ - public String securityToken() { - return this.securityToken; - } - - /** - * Set the securityToken value. - * - * @param securityToken the securityToken value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withSecurityToken(String securityToken) { - this.securityToken = securityToken; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public EnableStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withStatus(EnableStatus status) { - this.status = status; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the ArtifactSourceInner object itself. - */ - public ArtifactSourceInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourcesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourcesInner.java deleted file mode 100644 index af38d6dc614..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactSourcesInner.java +++ /dev/null @@ -1,945 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ArtifactSources. - */ -public class ArtifactSourcesInner { - /** The Retrofit service to perform REST calls. */ - private ArtifactSourcesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of ArtifactSourcesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ArtifactSourcesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(ArtifactSourcesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ArtifactSources to be - * used by Retrofit to perform actually REST calls. - */ - interface ArtifactSourcesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArtifactSources list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArtifactSources get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArtifactSources createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body ArtifactSourceInner artifactSource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArtifactSources delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArtifactSources update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body ArtifactSourceFragmentInner artifactSource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ArtifactSources listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArtifactSourceInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactSourceInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactSourceInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArtifactSourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArtifactSourceInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactSourceInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List artifact sources in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactSourceInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List artifact sources in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArtifactSourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArtifactSourceInner object if successful. - */ - public ArtifactSourceInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactSourceInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, ArtifactSourceInner>() { - @Override - public ArtifactSourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactSourceInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArtifactSourceInner object if successful. - */ - public ArtifactSourceInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactSourceInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, ArtifactSourceInner>() { - @Override - public ArtifactSourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=displayName)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactSourceInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param artifactSource Properties of an artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArtifactSourceInner object if successful. - */ - public ArtifactSourceInner createOrUpdate(String resourceGroupName, String labName, String name, ArtifactSourceInner artifactSource) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, artifactSource).toBlocking().single().body(); - } - - /** - * Create or replace an existing artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param artifactSource Properties of an artifact source. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, ArtifactSourceInner artifactSource, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, artifactSource), serviceCallback); - } - - /** - * Create or replace an existing artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param artifactSource Properties of an artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactSourceInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, ArtifactSourceInner artifactSource) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, artifactSource).map(new Func1, ArtifactSourceInner>() { - @Override - public ArtifactSourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param artifactSource Properties of an artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactSourceInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, ArtifactSourceInner artifactSource) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (artifactSource == null) { - throw new IllegalArgumentException("Parameter artifactSource is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(artifactSource); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, artifactSource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of artifact sources. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param artifactSource Properties of an artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArtifactSourceInner object if successful. - */ - public ArtifactSourceInner update(String resourceGroupName, String labName, String name, ArtifactSourceFragmentInner artifactSource) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, artifactSource).toBlocking().single().body(); - } - - /** - * Modify properties of artifact sources. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param artifactSource Properties of an artifact source. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String labName, String name, ArtifactSourceFragmentInner artifactSource, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, labName, name, artifactSource), serviceCallback); - } - - /** - * Modify properties of artifact sources. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param artifactSource Properties of an artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactSourceInner object - */ - public Observable updateAsync(String resourceGroupName, String labName, String name, ArtifactSourceFragmentInner artifactSource) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, artifactSource).map(new Func1, ArtifactSourceInner>() { - @Override - public ArtifactSourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of artifact sources. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the artifact source. - * @param artifactSource Properties of an artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactSourceInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String labName, String name, ArtifactSourceFragmentInner artifactSource) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (artifactSource == null) { - throw new IllegalArgumentException("Parameter artifactSource is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(artifactSource); - return service.update(this.client.subscriptionId(), resourceGroupName, labName, name, artifactSource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List artifact sources in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArtifactSourceInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List artifact sources in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List artifact sources in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactSourceInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List artifact sources in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactSourceInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List artifact sources in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArtifactSourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactsInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactsInner.java deleted file mode 100644 index 1880a51c243..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ArtifactsInner.java +++ /dev/null @@ -1,777 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Artifacts. - */ -public class ArtifactsInner { - /** The Retrofit service to perform REST calls. */ - private ArtifactsService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of ArtifactsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ArtifactsInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(ArtifactsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Artifacts to be - * used by Retrofit to perform actually REST calls. - */ - interface ArtifactsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Artifacts list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("artifactSourceName") String artifactSourceName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Artifacts get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("artifactSourceName") String artifactSourceName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Artifacts generateArmTemplate" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}/generateArmTemplate") - Observable> generateArmTemplate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("artifactSourceName") String artifactSourceName, @Path("name") String name, @Body GenerateArmTemplateRequestInner generateArmTemplateRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Artifacts listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArtifactInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String artifactSourceName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, artifactSourceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, artifactSourceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String artifactSourceName) { - return listWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String artifactSourceName) { - return listSinglePageAsync(resourceGroupName, labName, artifactSourceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArtifactInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String artifactSourceName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=title)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArtifactInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=title)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=title)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List artifacts in a given artifact source. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param expand Specify the $expand query. Example: 'properties($select=title)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List artifacts in a given artifact source. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param artifactSourceName The name of the artifact source. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=title)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArtifactInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String artifactSourceName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArtifactInner object if successful. - */ - public ArtifactInner get(String resourceGroupName, String labName, String artifactSourceName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name).toBlocking().single().body(); - } - - /** - * Get artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String artifactSourceName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name), serviceCallback); - } - - /** - * Get artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String artifactSourceName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name).map(new Func1, ArtifactInner>() { - @Override - public ArtifactInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String artifactSourceName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param expand Specify the $expand query. Example: 'properties($select=title)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArtifactInner object if successful. - */ - public ArtifactInner get(String resourceGroupName, String labName, String artifactSourceName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, expand).toBlocking().single().body(); - } - - /** - * Get artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param expand Specify the $expand query. Example: 'properties($select=title)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String artifactSourceName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, expand), serviceCallback); - } - - /** - * Get artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param expand Specify the $expand query. Example: 'properties($select=title)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String artifactSourceName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, expand).map(new Func1, ArtifactInner>() { - @Override - public ArtifactInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param expand Specify the $expand query. Example: 'properties($select=title)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArtifactInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String artifactSourceName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Generates an ARM template for the given artifact, uploads the required files to a storage account, and validates the generated artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param generateArmTemplateRequest Parameters for generating an ARM template for deploying artifacts. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ArmTemplateInfoInner object if successful. - */ - public ArmTemplateInfoInner generateArmTemplate(String resourceGroupName, String labName, String artifactSourceName, String name, GenerateArmTemplateRequestInner generateArmTemplateRequest) { - return generateArmTemplateWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest).toBlocking().single().body(); - } - - /** - * Generates an ARM template for the given artifact, uploads the required files to a storage account, and validates the generated artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param generateArmTemplateRequest Parameters for generating an ARM template for deploying artifacts. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture generateArmTemplateAsync(String resourceGroupName, String labName, String artifactSourceName, String name, GenerateArmTemplateRequestInner generateArmTemplateRequest, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generateArmTemplateWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest), serviceCallback); - } - - /** - * Generates an ARM template for the given artifact, uploads the required files to a storage account, and validates the generated artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param generateArmTemplateRequest Parameters for generating an ARM template for deploying artifacts. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArmTemplateInfoInner object - */ - public Observable generateArmTemplateAsync(String resourceGroupName, String labName, String artifactSourceName, String name, GenerateArmTemplateRequestInner generateArmTemplateRequest) { - return generateArmTemplateWithServiceResponseAsync(resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest).map(new Func1, ArmTemplateInfoInner>() { - @Override - public ArmTemplateInfoInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Generates an ARM template for the given artifact, uploads the required files to a storage account, and validates the generated artifact. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param artifactSourceName The name of the artifact source. - * @param name The name of the artifact. - * @param generateArmTemplateRequest Parameters for generating an ARM template for deploying artifacts. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ArmTemplateInfoInner object - */ - public Observable> generateArmTemplateWithServiceResponseAsync(String resourceGroupName, String labName, String artifactSourceName, String name, GenerateArmTemplateRequestInner generateArmTemplateRequest) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (artifactSourceName == null) { - throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (generateArmTemplateRequest == null) { - throw new IllegalArgumentException("Parameter generateArmTemplateRequest is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(generateArmTemplateRequest); - return service.generateArmTemplate(this.client.subscriptionId(), resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = generateArmTemplateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse generateArmTemplateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List artifacts in a given artifact source. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ArtifactInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List artifacts in a given artifact source. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List artifacts in a given artifact source. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List artifacts in a given artifact source. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ArtifactInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List artifacts in a given artifact source. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ArtifactInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CostsInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CostsInner.java deleted file mode 100644 index dbabc16ad44..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CostsInner.java +++ /dev/null @@ -1,353 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Costs. - */ -public class CostsInner { - /** The Retrofit service to perform REST calls. */ - private CostsService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of CostsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public CostsInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(CostsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Costs to be - * used by Retrofit to perform actually REST calls. - */ - interface CostsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Costs get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Costs createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body LabCostInner labCost, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabCostInner object if successful. - */ - public LabCostInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabCostInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, LabCostInner>() { - @Override - public LabCostInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabCostInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param expand Specify the $expand query. Example: 'properties($expand=labCostDetails)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabCostInner object if successful. - */ - public LabCostInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param expand Specify the $expand query. Example: 'properties($expand=labCostDetails)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param expand Specify the $expand query. Example: 'properties($expand=labCostDetails)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabCostInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, LabCostInner>() { - @Override - public LabCostInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param expand Specify the $expand query. Example: 'properties($expand=labCostDetails)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabCostInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param labCost A cost item. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabCostInner object if successful. - */ - public LabCostInner createOrUpdate(String resourceGroupName, String labName, String name, LabCostInner labCost) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labCost).toBlocking().single().body(); - } - - /** - * Create or replace an existing cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param labCost A cost item. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, LabCostInner labCost, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labCost), serviceCallback); - } - - /** - * Create or replace an existing cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param labCost A cost item. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabCostInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, LabCostInner labCost) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labCost).map(new Func1, LabCostInner>() { - @Override - public LabCostInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing cost. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the cost. - * @param labCost A cost item. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabCostInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, LabCostInner labCost) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (labCost == null) { - throw new IllegalArgumentException("Parameter labCost is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(labCost); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, labCost, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CustomImageInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CustomImageInner.java deleted file mode 100644 index 178a77f0918..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CustomImageInner.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.CustomImagePropertiesFromVm; -import com.microsoft.azure.management.devtestlab.CustomImagePropertiesCustom; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A custom image. - */ -@JsonFlatten -public class CustomImageInner extends Resource { - /** - * The virtual machine from which the image is to be created. - */ - @JsonProperty(value = "properties.vm") - private CustomImagePropertiesFromVm vm; - - /** - * The VHD from which the image is to be created. - */ - @JsonProperty(value = "properties.vhd") - private CustomImagePropertiesCustom vhd; - - /** - * The description of the custom image. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The author of the custom image. - */ - @JsonProperty(value = "properties.author") - private String author; - - /** - * The creation date of the custom image. - */ - @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime creationDate; - - /** - * The Managed Image Id backing the custom image. - */ - @JsonProperty(value = "properties.managedImageId") - private String managedImageId; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the vm value. - * - * @return the vm value - */ - public CustomImagePropertiesFromVm vm() { - return this.vm; - } - - /** - * Set the vm value. - * - * @param vm the vm value to set - * @return the CustomImageInner object itself. - */ - public CustomImageInner withVm(CustomImagePropertiesFromVm vm) { - this.vm = vm; - return this; - } - - /** - * Get the vhd value. - * - * @return the vhd value - */ - public CustomImagePropertiesCustom vhd() { - return this.vhd; - } - - /** - * Set the vhd value. - * - * @param vhd the vhd value to set - * @return the CustomImageInner object itself. - */ - public CustomImageInner withVhd(CustomImagePropertiesCustom vhd) { - this.vhd = vhd; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the CustomImageInner object itself. - */ - public CustomImageInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the author value. - * - * @return the author value - */ - public String author() { - return this.author; - } - - /** - * Set the author value. - * - * @param author the author value to set - * @return the CustomImageInner object itself. - */ - public CustomImageInner withAuthor(String author) { - this.author = author; - return this; - } - - /** - * Get the creationDate value. - * - * @return the creationDate value - */ - public DateTime creationDate() { - return this.creationDate; - } - - /** - * Get the managedImageId value. - * - * @return the managedImageId value - */ - public String managedImageId() { - return this.managedImageId; - } - - /** - * Set the managedImageId value. - * - * @param managedImageId the managedImageId value to set - * @return the CustomImageInner object itself. - */ - public CustomImageInner withManagedImageId(String managedImageId) { - this.managedImageId = managedImageId; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the CustomImageInner object itself. - */ - public CustomImageInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the CustomImageInner object itself. - */ - public CustomImageInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CustomImagesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CustomImagesInner.java deleted file mode 100644 index c9131fec994..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/CustomImagesInner.java +++ /dev/null @@ -1,1006 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in CustomImages. - */ -public class CustomImagesInner { - /** The Retrofit service to perform REST calls. */ - private CustomImagesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of CustomImagesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public CustomImagesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(CustomImagesService.class); - this.client = client; - } - - /** - * The interface defining all the services for CustomImages to be - * used by Retrofit to perform actually REST calls. - */ - interface CustomImagesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.CustomImages list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.CustomImages get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.CustomImages createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body CustomImageInner customImage, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.CustomImages beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}") - Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body CustomImageInner customImage, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.CustomImages delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.CustomImages beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.CustomImages listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CustomImageInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CustomImageInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CustomImageInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CustomImageInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=vm)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CustomImageInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=vm)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=vm)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CustomImageInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List custom images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=vm)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CustomImageInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List custom images in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=vm)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CustomImageInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get custom image. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CustomImageInner object if successful. - */ - public CustomImageInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get custom image. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get custom image. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CustomImageInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, CustomImageInner>() { - @Override - public CustomImageInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get custom image. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CustomImageInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get custom image. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param expand Specify the $expand query. Example: 'properties($select=vm)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CustomImageInner object if successful. - */ - public CustomImageInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get custom image. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param expand Specify the $expand query. Example: 'properties($select=vm)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get custom image. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param expand Specify the $expand query. Example: 'properties($select=vm)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CustomImageInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, CustomImageInner>() { - @Override - public CustomImageInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get custom image. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param expand Specify the $expand query. Example: 'properties($select=vm)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CustomImageInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param customImage A custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CustomImageInner object if successful. - */ - public CustomImageInner createOrUpdate(String resourceGroupName, String labName, String name, CustomImageInner customImage) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, customImage).toBlocking().last().body(); - } - - /** - * Create or replace an existing custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param customImage A custom image. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, CustomImageInner customImage, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, customImage), serviceCallback); - } - - /** - * Create or replace an existing custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param customImage A custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, CustomImageInner customImage) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, customImage).map(new Func1, CustomImageInner>() { - @Override - public CustomImageInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param customImage A custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, CustomImageInner customImage) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (customImage == null) { - throw new IllegalArgumentException("Parameter customImage is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(customImage); - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, customImage, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or replace an existing custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param customImage A custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CustomImageInner object if successful. - */ - public CustomImageInner beginCreateOrUpdate(String resourceGroupName, String labName, String name, CustomImageInner customImage) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, customImage).toBlocking().single().body(); - } - - /** - * Create or replace an existing custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param customImage A custom image. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String labName, String name, CustomImageInner customImage, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, customImage), serviceCallback); - } - - /** - * Create or replace an existing custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param customImage A custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CustomImageInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String labName, String name, CustomImageInner customImage) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, customImage).map(new Func1, CustomImageInner>() { - @Override - public CustomImageInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param customImage A custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CustomImageInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, CustomImageInner customImage) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (customImage == null) { - throw new IllegalArgumentException("Parameter customImage is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(customImage); - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, customImage, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Delete custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String labName, String name) { - beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String labName, String name) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete custom image. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the custom image. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List custom images in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<CustomImageInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List custom images in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List custom images in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CustomImageInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List custom images in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<CustomImageInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List custom images in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<CustomImageInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DataDiskPropertiesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DataDiskPropertiesInner.java deleted file mode 100644 index a25353ba44b..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DataDiskPropertiesInner.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.AttachNewDataDiskOptions; -import com.microsoft.azure.management.devtestlab.HostCachingOptions; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Request body for adding a new or existing data disk to a virtual machine. - */ -public class DataDiskPropertiesInner { - /** - * Specifies options to attach a new disk to the virtual machine. - */ - @JsonProperty(value = "attachNewDataDiskOptions") - private AttachNewDataDiskOptions attachNewDataDiskOptions; - - /** - * Specifies the existing lab disk id to attach to virtual machine. - */ - @JsonProperty(value = "existingLabDiskId") - private String existingLabDiskId; - - /** - * Caching option for a data disk (i.e. None, ReadOnly, ReadWrite). - * Possible values include: 'None', 'ReadOnly', 'ReadWrite'. - */ - @JsonProperty(value = "hostCaching") - private HostCachingOptions hostCaching; - - /** - * Get the attachNewDataDiskOptions value. - * - * @return the attachNewDataDiskOptions value - */ - public AttachNewDataDiskOptions attachNewDataDiskOptions() { - return this.attachNewDataDiskOptions; - } - - /** - * Set the attachNewDataDiskOptions value. - * - * @param attachNewDataDiskOptions the attachNewDataDiskOptions value to set - * @return the DataDiskPropertiesInner object itself. - */ - public DataDiskPropertiesInner withAttachNewDataDiskOptions(AttachNewDataDiskOptions attachNewDataDiskOptions) { - this.attachNewDataDiskOptions = attachNewDataDiskOptions; - return this; - } - - /** - * Get the existingLabDiskId value. - * - * @return the existingLabDiskId value - */ - public String existingLabDiskId() { - return this.existingLabDiskId; - } - - /** - * Set the existingLabDiskId value. - * - * @param existingLabDiskId the existingLabDiskId value to set - * @return the DataDiskPropertiesInner object itself. - */ - public DataDiskPropertiesInner withExistingLabDiskId(String existingLabDiskId) { - this.existingLabDiskId = existingLabDiskId; - return this; - } - - /** - * Get the hostCaching value. - * - * @return the hostCaching value - */ - public HostCachingOptions hostCaching() { - return this.hostCaching; - } - - /** - * Set the hostCaching value. - * - * @param hostCaching the hostCaching value to set - * @return the DataDiskPropertiesInner object itself. - */ - public DataDiskPropertiesInner withHostCaching(HostCachingOptions hostCaching) { - this.hostCaching = hostCaching; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DevTestLabManager.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DevTestLabManager.java deleted file mode 100644 index 660ed004dca..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DevTestLabManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure DevTestLab resource management. - */ -@Beta(Beta.SinceVersion.V1_2_0) -public final class DevTestLabManager extends Manager { - /** - * Get a Configurable instance that can be used to create DevTestLabManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new DevTestLabManager.ConfigurableImpl(); - } - /** - * Creates an instance of DevTestLabManager that exposes DevTestLab resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the DevTestLabManager - */ - public static DevTestLabManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new DevTestLabManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of DevTestLabManager that exposes DevTestLab resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the DevTestLabManager - */ - public static DevTestLabManager authenticate(RestClient restClient, String subscriptionId) { - return new DevTestLabManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of DevTestLabManager that exposes DevTestLab management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing DevTestLab management API entry points that work across subscriptions - */ - DevTestLabManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public DevTestLabManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return DevTestLabManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private DevTestLabManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new DevTestLabsClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DevTestLabsClientImpl.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DevTestLabsClientImpl.java deleted file mode 100644 index 5c134058f0f..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DevTestLabsClientImpl.java +++ /dev/null @@ -1,476 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the DevTestLabsClientImpl class. - */ -public class DevTestLabsClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Client API version. */ - private String apiVersion; - - /** - * Gets Client API version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** The subscription ID. */ - private String subscriptionId; - - /** - * Gets The subscription ID. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets The subscription ID. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public DevTestLabsClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public DevTestLabsClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public DevTestLabsClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public DevTestLabsClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The LabsInner object to access its operations. - */ - private LabsInner labs; - - /** - * Gets the LabsInner object to access its operations. - * @return the LabsInner object. - */ - public LabsInner labs() { - return this.labs; - } - - /** - * The GlobalSchedulesInner object to access its operations. - */ - private GlobalSchedulesInner globalSchedules; - - /** - * Gets the GlobalSchedulesInner object to access its operations. - * @return the GlobalSchedulesInner object. - */ - public GlobalSchedulesInner globalSchedules() { - return this.globalSchedules; - } - - /** - * The ArtifactSourcesInner object to access its operations. - */ - private ArtifactSourcesInner artifactSources; - - /** - * Gets the ArtifactSourcesInner object to access its operations. - * @return the ArtifactSourcesInner object. - */ - public ArtifactSourcesInner artifactSources() { - return this.artifactSources; - } - - /** - * The ArmTemplatesInner object to access its operations. - */ - private ArmTemplatesInner armTemplates; - - /** - * Gets the ArmTemplatesInner object to access its operations. - * @return the ArmTemplatesInner object. - */ - public ArmTemplatesInner armTemplates() { - return this.armTemplates; - } - - /** - * The ArtifactsInner object to access its operations. - */ - private ArtifactsInner artifacts; - - /** - * Gets the ArtifactsInner object to access its operations. - * @return the ArtifactsInner object. - */ - public ArtifactsInner artifacts() { - return this.artifacts; - } - - /** - * The CostsInner object to access its operations. - */ - private CostsInner costs; - - /** - * Gets the CostsInner object to access its operations. - * @return the CostsInner object. - */ - public CostsInner costs() { - return this.costs; - } - - /** - * The CustomImagesInner object to access its operations. - */ - private CustomImagesInner customImages; - - /** - * Gets the CustomImagesInner object to access its operations. - * @return the CustomImagesInner object. - */ - public CustomImagesInner customImages() { - return this.customImages; - } - - /** - * The FormulasInner object to access its operations. - */ - private FormulasInner formulas; - - /** - * Gets the FormulasInner object to access its operations. - * @return the FormulasInner object. - */ - public FormulasInner formulas() { - return this.formulas; - } - - /** - * The GalleryImagesInner object to access its operations. - */ - private GalleryImagesInner galleryImages; - - /** - * Gets the GalleryImagesInner object to access its operations. - * @return the GalleryImagesInner object. - */ - public GalleryImagesInner galleryImages() { - return this.galleryImages; - } - - /** - * The NotificationChannelsInner object to access its operations. - */ - private NotificationChannelsInner notificationChannels; - - /** - * Gets the NotificationChannelsInner object to access its operations. - * @return the NotificationChannelsInner object. - */ - public NotificationChannelsInner notificationChannels() { - return this.notificationChannels; - } - - /** - * The PolicySetsInner object to access its operations. - */ - private PolicySetsInner policySets; - - /** - * Gets the PolicySetsInner object to access its operations. - * @return the PolicySetsInner object. - */ - public PolicySetsInner policySets() { - return this.policySets; - } - - /** - * The PoliciesInner object to access its operations. - */ - private PoliciesInner policies; - - /** - * Gets the PoliciesInner object to access its operations. - * @return the PoliciesInner object. - */ - public PoliciesInner policies() { - return this.policies; - } - - /** - * The SchedulesInner object to access its operations. - */ - private SchedulesInner schedules; - - /** - * Gets the SchedulesInner object to access its operations. - * @return the SchedulesInner object. - */ - public SchedulesInner schedules() { - return this.schedules; - } - - /** - * The ServiceRunnersInner object to access its operations. - */ - private ServiceRunnersInner serviceRunners; - - /** - * Gets the ServiceRunnersInner object to access its operations. - * @return the ServiceRunnersInner object. - */ - public ServiceRunnersInner serviceRunners() { - return this.serviceRunners; - } - - /** - * The UsersInner object to access its operations. - */ - private UsersInner users; - - /** - * Gets the UsersInner object to access its operations. - * @return the UsersInner object. - */ - public UsersInner users() { - return this.users; - } - - /** - * The DisksInner object to access its operations. - */ - private DisksInner disks; - - /** - * Gets the DisksInner object to access its operations. - * @return the DisksInner object. - */ - public DisksInner disks() { - return this.disks; - } - - /** - * The EnvironmentsInner object to access its operations. - */ - private EnvironmentsInner environments; - - /** - * Gets the EnvironmentsInner object to access its operations. - * @return the EnvironmentsInner object. - */ - public EnvironmentsInner environments() { - return this.environments; - } - - /** - * The SecretsInner object to access its operations. - */ - private SecretsInner secrets; - - /** - * Gets the SecretsInner object to access its operations. - * @return the SecretsInner object. - */ - public SecretsInner secrets() { - return this.secrets; - } - - /** - * The VirtualMachinesInner object to access its operations. - */ - private VirtualMachinesInner virtualMachines; - - /** - * Gets the VirtualMachinesInner object to access its operations. - * @return the VirtualMachinesInner object. - */ - public VirtualMachinesInner virtualMachines() { - return this.virtualMachines; - } - - /** - * The VirtualMachineSchedulesInner object to access its operations. - */ - private VirtualMachineSchedulesInner virtualMachineSchedules; - - /** - * Gets the VirtualMachineSchedulesInner object to access its operations. - * @return the VirtualMachineSchedulesInner object. - */ - public VirtualMachineSchedulesInner virtualMachineSchedules() { - return this.virtualMachineSchedules; - } - - /** - * The VirtualNetworksInner object to access its operations. - */ - private VirtualNetworksInner virtualNetworks; - - /** - * Gets the VirtualNetworksInner object to access its operations. - * @return the VirtualNetworksInner object. - */ - public VirtualNetworksInner virtualNetworks() { - return this.virtualNetworks; - } - - /** - * Initializes an instance of DevTestLabsClient client. - * - * @param credentials the management credentials for Azure - */ - public DevTestLabsClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of DevTestLabsClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public DevTestLabsClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of DevTestLabsClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public DevTestLabsClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2016-05-15"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.labs = new LabsInner(restClient().retrofit(), this); - this.globalSchedules = new GlobalSchedulesInner(restClient().retrofit(), this); - this.artifactSources = new ArtifactSourcesInner(restClient().retrofit(), this); - this.armTemplates = new ArmTemplatesInner(restClient().retrofit(), this); - this.artifacts = new ArtifactsInner(restClient().retrofit(), this); - this.costs = new CostsInner(restClient().retrofit(), this); - this.customImages = new CustomImagesInner(restClient().retrofit(), this); - this.formulas = new FormulasInner(restClient().retrofit(), this); - this.galleryImages = new GalleryImagesInner(restClient().retrofit(), this); - this.notificationChannels = new NotificationChannelsInner(restClient().retrofit(), this); - this.policySets = new PolicySetsInner(restClient().retrofit(), this); - this.policies = new PoliciesInner(restClient().retrofit(), this); - this.schedules = new SchedulesInner(restClient().retrofit(), this); - this.serviceRunners = new ServiceRunnersInner(restClient().retrofit(), this); - this.users = new UsersInner(restClient().retrofit(), this); - this.disks = new DisksInner(restClient().retrofit(), this); - this.environments = new EnvironmentsInner(restClient().retrofit(), this); - this.secrets = new SecretsInner(restClient().retrofit(), this); - this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); - this.virtualMachineSchedules = new VirtualMachineSchedulesInner(restClient().retrofit(), this); - this.virtualNetworks = new VirtualNetworksInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "DevTestLabsClient", "2016-05-15"); - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DiskInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DiskInner.java deleted file mode 100644 index 5546b1057d0..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DiskInner.java +++ /dev/null @@ -1,273 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.StorageType; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A Disk. - */ -@JsonFlatten -public class DiskInner extends Resource { - /** - * The storage type for the disk (i.e. Standard, Premium). Possible values - * include: 'Standard', 'Premium'. - */ - @JsonProperty(value = "properties.diskType") - private StorageType diskType; - - /** - * The size of the disk in GibiBytes. - */ - @JsonProperty(value = "properties.diskSizeGiB") - private Integer diskSizeGiB; - - /** - * The resource ID of the VM to which this disk is leased. - */ - @JsonProperty(value = "properties.leasedByLabVmId") - private String leasedByLabVmId; - - /** - * When backed by a blob, the name of the VHD blob without extension. - */ - @JsonProperty(value = "properties.diskBlobName") - private String diskBlobName; - - /** - * When backed by a blob, the URI of underlying blob. - */ - @JsonProperty(value = "properties.diskUri") - private String diskUri; - - /** - * The creation date of the disk. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). - */ - @JsonProperty(value = "properties.hostCaching") - private String hostCaching; - - /** - * When backed by managed disk, this is the ID of the compute disk - * resource. - */ - @JsonProperty(value = "properties.managedDiskId") - private String managedDiskId; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the diskType value. - * - * @return the diskType value - */ - public StorageType diskType() { - return this.diskType; - } - - /** - * Set the diskType value. - * - * @param diskType the diskType value to set - * @return the DiskInner object itself. - */ - public DiskInner withDiskType(StorageType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the diskSizeGiB value. - * - * @return the diskSizeGiB value - */ - public Integer diskSizeGiB() { - return this.diskSizeGiB; - } - - /** - * Set the diskSizeGiB value. - * - * @param diskSizeGiB the diskSizeGiB value to set - * @return the DiskInner object itself. - */ - public DiskInner withDiskSizeGiB(Integer diskSizeGiB) { - this.diskSizeGiB = diskSizeGiB; - return this; - } - - /** - * Get the leasedByLabVmId value. - * - * @return the leasedByLabVmId value - */ - public String leasedByLabVmId() { - return this.leasedByLabVmId; - } - - /** - * Set the leasedByLabVmId value. - * - * @param leasedByLabVmId the leasedByLabVmId value to set - * @return the DiskInner object itself. - */ - public DiskInner withLeasedByLabVmId(String leasedByLabVmId) { - this.leasedByLabVmId = leasedByLabVmId; - return this; - } - - /** - * Get the diskBlobName value. - * - * @return the diskBlobName value - */ - public String diskBlobName() { - return this.diskBlobName; - } - - /** - * Set the diskBlobName value. - * - * @param diskBlobName the diskBlobName value to set - * @return the DiskInner object itself. - */ - public DiskInner withDiskBlobName(String diskBlobName) { - this.diskBlobName = diskBlobName; - return this; - } - - /** - * Get the diskUri value. - * - * @return the diskUri value - */ - public String diskUri() { - return this.diskUri; - } - - /** - * Set the diskUri value. - * - * @param diskUri the diskUri value to set - * @return the DiskInner object itself. - */ - public DiskInner withDiskUri(String diskUri) { - this.diskUri = diskUri; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the hostCaching value. - * - * @return the hostCaching value - */ - public String hostCaching() { - return this.hostCaching; - } - - /** - * Set the hostCaching value. - * - * @param hostCaching the hostCaching value to set - * @return the DiskInner object itself. - */ - public DiskInner withHostCaching(String hostCaching) { - this.hostCaching = hostCaching; - return this; - } - - /** - * Get the managedDiskId value. - * - * @return the managedDiskId value - */ - public String managedDiskId() { - return this.managedDiskId; - } - - /** - * Set the managedDiskId value. - * - * @param managedDiskId the managedDiskId value to set - * @return the DiskInner object itself. - */ - public DiskInner withManagedDiskId(String managedDiskId) { - this.managedDiskId = managedDiskId; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the DiskInner object itself. - */ - public DiskInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the DiskInner object itself. - */ - public DiskInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DisksInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DisksInner.java deleted file mode 100644 index d5a767d18b3..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DisksInner.java +++ /dev/null @@ -1,1829 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.devtestlab.AttachDiskProperties; -import com.microsoft.azure.management.devtestlab.DetachDiskProperties; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Disks. - */ -public class DisksInner { - /** The Retrofit service to perform REST calls. */ - private DisksService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of DisksInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public DisksInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(DisksService.class); - this.client = client; - } - - /** - * The interface defining all the services for Disks to be - * used by Retrofit to perform actually REST calls. - */ - interface DisksService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Body DiskInner disk, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}") - Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Body DiskInner disk, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks attach" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/attach") - Observable> attach(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AttachDiskProperties attachDiskProperties, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks beginAttach" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/attach") - Observable> beginAttach(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AttachDiskProperties attachDiskProperties, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks detach" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/detach") - Observable> detach(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DetachDiskProperties detachDiskProperties, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks beginDetach" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/detach") - Observable> beginDetach(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DetachDiskProperties detachDiskProperties, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Disks listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiskInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String userName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, userName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String userName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, userName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiskInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String userName) { - return listWithServiceResponseAsync(resourceGroupName, labName, userName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiskInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String userName) { - return listSinglePageAsync(resourceGroupName, labName, userName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiskInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String userName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, userName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiskInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiskInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, userName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List disks in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiskInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List disks in a given user profile. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param userName The name of the user profile. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiskInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, userName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get disk. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiskInner object if successful. - */ - public DiskInner get(String resourceGroupName, String labName, String userName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().single().body(); - } - - /** - * Get disk. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Get disk. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiskInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String userName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, DiskInner>() { - @Override - public DiskInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get disk. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiskInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, userName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get disk. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiskInner object if successful. - */ - public DiskInner get(String resourceGroupName, String labName, String userName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand).toBlocking().single().body(); - } - - /** - * Get disk. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String userName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand), serviceCallback); - } - - /** - * Get disk. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiskInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String userName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand).map(new Func1, DiskInner>() { - @Override - public DiskInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get disk. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param expand Specify the $expand query. Example: 'properties($select=diskType)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiskInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, userName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param disk A Disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiskInner object if successful. - */ - public DiskInner createOrUpdate(String resourceGroupName, String labName, String userName, String name, DiskInner disk) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, disk).toBlocking().last().body(); - } - - /** - * Create or replace an existing disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param disk A Disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, DiskInner disk, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, disk), serviceCallback); - } - - /** - * Create or replace an existing disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param disk A Disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, DiskInner disk) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, disk).map(new Func1, DiskInner>() { - @Override - public DiskInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param disk A Disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, DiskInner disk) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (disk == null) { - throw new IllegalArgumentException("Parameter disk is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(disk); - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, userName, name, disk, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or replace an existing disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param disk A Disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DiskInner object if successful. - */ - public DiskInner beginCreateOrUpdate(String resourceGroupName, String labName, String userName, String name, DiskInner disk) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, disk).toBlocking().single().body(); - } - - /** - * Create or replace an existing disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param disk A Disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, DiskInner disk, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, disk), serviceCallback); - } - - /** - * Create or replace an existing disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param disk A Disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiskInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, DiskInner disk) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, disk).map(new Func1, DiskInner>() { - @Override - public DiskInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param disk A Disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DiskInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, DiskInner disk) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (disk == null) { - throw new IllegalArgumentException("Parameter disk is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(disk); - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, userName, name, disk, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String userName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().last().body(); - } - - /** - * Delete disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Delete disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String labName, String userName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String labName, String userName, String name) { - beginDeleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().single().body(); - } - - /** - * Delete disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Delete disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String labName, String userName, String name) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete disk. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void attach(String resourceGroupName, String labName, String userName, String name) { - attachWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().last().body(); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture attachAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(attachWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable attachAsync(String resourceGroupName, String labName, String userName, String name) { - return attachWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> attachWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String leasedByLabVmId = null; - AttachDiskProperties attachDiskProperties = new AttachDiskProperties(); - attachDiskProperties.withLeasedByLabVmId(null); - Observable> observable = service.attach(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), attachDiskProperties, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab virtual machine to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void attach(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - attachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId).toBlocking().last().body(); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab virtual machine to which the disk is attached. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture attachAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(attachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId), serviceCallback); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab virtual machine to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable attachAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - return attachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab virtual machine to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> attachWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - AttachDiskProperties attachDiskProperties = new AttachDiskProperties(); - attachDiskProperties.withLeasedByLabVmId(leasedByLabVmId); - Observable> observable = service.attach(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), attachDiskProperties, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginAttach(String resourceGroupName, String labName, String userName, String name) { - beginAttachWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().single().body(); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginAttachAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginAttachWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginAttachAsync(String resourceGroupName, String labName, String userName, String name) { - return beginAttachWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginAttachWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String leasedByLabVmId = null; - AttachDiskProperties attachDiskProperties = new AttachDiskProperties(); - attachDiskProperties.withLeasedByLabVmId(null); - return service.beginAttach(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), attachDiskProperties, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginAttachDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab virtual machine to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginAttach(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - beginAttachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId).toBlocking().single().body(); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab virtual machine to which the disk is attached. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginAttachAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginAttachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId), serviceCallback); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab virtual machine to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginAttachAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - return beginAttachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab virtual machine to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginAttachWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - AttachDiskProperties attachDiskProperties = new AttachDiskProperties(); - attachDiskProperties.withLeasedByLabVmId(leasedByLabVmId); - return service.beginAttach(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), attachDiskProperties, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginAttachDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginAttachDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void detach(String resourceGroupName, String labName, String userName, String name) { - detachWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().last().body(); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture detachAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(detachWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable detachAsync(String resourceGroupName, String labName, String userName, String name) { - return detachWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> detachWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String leasedByLabVmId = null; - DetachDiskProperties detachDiskProperties = new DetachDiskProperties(); - detachDiskProperties.withLeasedByLabVmId(null); - Observable> observable = service.detach(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), detachDiskProperties, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab VM to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void detach(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - detachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId).toBlocking().last().body(); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab VM to which the disk is attached. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture detachAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(detachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId), serviceCallback); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab VM to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable detachAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - return detachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab VM to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> detachWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - DetachDiskProperties detachDiskProperties = new DetachDiskProperties(); - detachDiskProperties.withLeasedByLabVmId(leasedByLabVmId); - Observable> observable = service.detach(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), detachDiskProperties, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDetach(String resourceGroupName, String labName, String userName, String name) { - beginDetachWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().single().body(); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDetachAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDetachWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDetachAsync(String resourceGroupName, String labName, String userName, String name) { - return beginDetachWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDetachWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String leasedByLabVmId = null; - DetachDiskProperties detachDiskProperties = new DetachDiskProperties(); - detachDiskProperties.withLeasedByLabVmId(null); - return service.beginDetach(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), detachDiskProperties, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDetachDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab VM to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDetach(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - beginDetachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId).toBlocking().single().body(); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab VM to which the disk is attached. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDetachAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDetachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId), serviceCallback); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab VM to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDetachAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - return beginDetachWithServiceResponseAsync(resourceGroupName, labName, userName, name, leasedByLabVmId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the disk. - * @param leasedByLabVmId The resource ID of the Lab VM to which the disk is attached. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDetachWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, String leasedByLabVmId) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - DetachDiskProperties detachDiskProperties = new DetachDiskProperties(); - detachDiskProperties.withLeasedByLabVmId(leasedByLabVmId); - return service.beginDetach(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), detachDiskProperties, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDetachDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDetachDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List disks in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DiskInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List disks in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List disks in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiskInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List disks in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DiskInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List disks in a given user profile. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DiskInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DtlEnvironmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DtlEnvironmentInner.java deleted file mode 100644 index fe518cd6351..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/DtlEnvironmentInner.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.EnvironmentDeploymentProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * An environment, which is essentially an ARM template deployment. - */ -@JsonFlatten -public class DtlEnvironmentInner extends Resource { - /** - * The deployment properties of the environment. - */ - @JsonProperty(value = "properties.deploymentProperties") - private EnvironmentDeploymentProperties deploymentProperties; - - /** - * The display name of the Azure Resource Manager template that produced - * the environment. - */ - @JsonProperty(value = "properties.armTemplateDisplayName") - private String armTemplateDisplayName; - - /** - * The identifier of the resource group containing the environment's - * resources. - */ - @JsonProperty(value = "properties.resourceGroupId", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGroupId; - - /** - * The creator of the environment. - */ - @JsonProperty(value = "properties.createdByUser", access = JsonProperty.Access.WRITE_ONLY) - private String createdByUser; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the deploymentProperties value. - * - * @return the deploymentProperties value - */ - public EnvironmentDeploymentProperties deploymentProperties() { - return this.deploymentProperties; - } - - /** - * Set the deploymentProperties value. - * - * @param deploymentProperties the deploymentProperties value to set - * @return the DtlEnvironmentInner object itself. - */ - public DtlEnvironmentInner withDeploymentProperties(EnvironmentDeploymentProperties deploymentProperties) { - this.deploymentProperties = deploymentProperties; - return this; - } - - /** - * Get the armTemplateDisplayName value. - * - * @return the armTemplateDisplayName value - */ - public String armTemplateDisplayName() { - return this.armTemplateDisplayName; - } - - /** - * Set the armTemplateDisplayName value. - * - * @param armTemplateDisplayName the armTemplateDisplayName value to set - * @return the DtlEnvironmentInner object itself. - */ - public DtlEnvironmentInner withArmTemplateDisplayName(String armTemplateDisplayName) { - this.armTemplateDisplayName = armTemplateDisplayName; - return this; - } - - /** - * Get the resourceGroupId value. - * - * @return the resourceGroupId value - */ - public String resourceGroupId() { - return this.resourceGroupId; - } - - /** - * Get the createdByUser value. - * - * @return the createdByUser value - */ - public String createdByUser() { - return this.createdByUser; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the DtlEnvironmentInner object itself. - */ - public DtlEnvironmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the DtlEnvironmentInner object itself. - */ - public DtlEnvironmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EnvironmentsInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EnvironmentsInner.java deleted file mode 100644 index af6bfea55b6..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EnvironmentsInner.java +++ /dev/null @@ -1,1064 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Environments. - */ -public class EnvironmentsInner { - /** The Retrofit service to perform REST calls. */ - private EnvironmentsService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of EnvironmentsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public EnvironmentsInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(EnvironmentsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Environments to be - * used by Retrofit to perform actually REST calls. - */ - interface EnvironmentsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Environments list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Environments get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Environments createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Body DtlEnvironmentInner dtlEnvironment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Environments beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}") - Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Body DtlEnvironmentInner dtlEnvironment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Environments delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Environments beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Environments listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DtlEnvironmentInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String userName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, userName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String userName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, userName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DtlEnvironmentInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String userName) { - return listWithServiceResponseAsync(resourceGroupName, labName, userName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DtlEnvironmentInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String userName) { - return listSinglePageAsync(resourceGroupName, labName, userName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DtlEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String userName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, userName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DtlEnvironmentInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DtlEnvironmentInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, userName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List environments in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DtlEnvironmentInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List environments in a given user profile. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param userName The name of the user profile. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DtlEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, userName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get environment. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DtlEnvironmentInner object if successful. - */ - public DtlEnvironmentInner get(String resourceGroupName, String labName, String userName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().single().body(); - } - - /** - * Get environment. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Get environment. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DtlEnvironmentInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String userName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, DtlEnvironmentInner>() { - @Override - public DtlEnvironmentInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get environment. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DtlEnvironmentInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, userName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get environment. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DtlEnvironmentInner object if successful. - */ - public DtlEnvironmentInner get(String resourceGroupName, String labName, String userName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand).toBlocking().single().body(); - } - - /** - * Get environment. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String userName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand), serviceCallback); - } - - /** - * Get environment. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DtlEnvironmentInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String userName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand).map(new Func1, DtlEnvironmentInner>() { - @Override - public DtlEnvironmentInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get environment. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DtlEnvironmentInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, userName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param dtlEnvironment An environment, which is essentially an ARM template deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DtlEnvironmentInner object if successful. - */ - public DtlEnvironmentInner createOrUpdate(String resourceGroupName, String labName, String userName, String name, DtlEnvironmentInner dtlEnvironment) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, dtlEnvironment).toBlocking().last().body(); - } - - /** - * Create or replace an existing environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param dtlEnvironment An environment, which is essentially an ARM template deployment. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, DtlEnvironmentInner dtlEnvironment, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, dtlEnvironment), serviceCallback); - } - - /** - * Create or replace an existing environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param dtlEnvironment An environment, which is essentially an ARM template deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, DtlEnvironmentInner dtlEnvironment) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, dtlEnvironment).map(new Func1, DtlEnvironmentInner>() { - @Override - public DtlEnvironmentInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param dtlEnvironment An environment, which is essentially an ARM template deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, DtlEnvironmentInner dtlEnvironment) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (dtlEnvironment == null) { - throw new IllegalArgumentException("Parameter dtlEnvironment is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(dtlEnvironment); - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, userName, name, dtlEnvironment, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or replace an existing environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param dtlEnvironment An environment, which is essentially an ARM template deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DtlEnvironmentInner object if successful. - */ - public DtlEnvironmentInner beginCreateOrUpdate(String resourceGroupName, String labName, String userName, String name, DtlEnvironmentInner dtlEnvironment) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, dtlEnvironment).toBlocking().single().body(); - } - - /** - * Create or replace an existing environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param dtlEnvironment An environment, which is essentially an ARM template deployment. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, DtlEnvironmentInner dtlEnvironment, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, dtlEnvironment), serviceCallback); - } - - /** - * Create or replace an existing environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param dtlEnvironment An environment, which is essentially an ARM template deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DtlEnvironmentInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, DtlEnvironmentInner dtlEnvironment) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, dtlEnvironment).map(new Func1, DtlEnvironmentInner>() { - @Override - public DtlEnvironmentInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param dtlEnvironment An environment, which is essentially an ARM template deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DtlEnvironmentInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, DtlEnvironmentInner dtlEnvironment) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (dtlEnvironment == null) { - throw new IllegalArgumentException("Parameter dtlEnvironment is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(dtlEnvironment); - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, userName, name, dtlEnvironment, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String userName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().last().body(); - } - - /** - * Delete environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Delete environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String labName, String userName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String labName, String userName, String name) { - beginDeleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().single().body(); - } - - /** - * Delete environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Delete environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String labName, String userName, String name) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete environment. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the environment. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List environments in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<DtlEnvironmentInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List environments in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List environments in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DtlEnvironmentInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List environments in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DtlEnvironmentInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List environments in a given user profile. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DtlEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EvaluatePoliciesPropertiesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EvaluatePoliciesPropertiesInner.java deleted file mode 100644 index a7bb420db09..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EvaluatePoliciesPropertiesInner.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties for evaluating a policy set. - */ -public class EvaluatePoliciesPropertiesInner { - /** - * The fact name. - */ - @JsonProperty(value = "factName") - private String factName; - - /** - * The fact data. - */ - @JsonProperty(value = "factData") - private String factData; - - /** - * The value offset. - */ - @JsonProperty(value = "valueOffset") - private String valueOffset; - - /** - * Get the factName value. - * - * @return the factName value - */ - public String factName() { - return this.factName; - } - - /** - * Set the factName value. - * - * @param factName the factName value to set - * @return the EvaluatePoliciesPropertiesInner object itself. - */ - public EvaluatePoliciesPropertiesInner withFactName(String factName) { - this.factName = factName; - return this; - } - - /** - * Get the factData value. - * - * @return the factData value - */ - public String factData() { - return this.factData; - } - - /** - * Set the factData value. - * - * @param factData the factData value to set - * @return the EvaluatePoliciesPropertiesInner object itself. - */ - public EvaluatePoliciesPropertiesInner withFactData(String factData) { - this.factData = factData; - return this; - } - - /** - * Get the valueOffset value. - * - * @return the valueOffset value - */ - public String valueOffset() { - return this.valueOffset; - } - - /** - * Set the valueOffset value. - * - * @param valueOffset the valueOffset value to set - * @return the EvaluatePoliciesPropertiesInner object itself. - */ - public EvaluatePoliciesPropertiesInner withValueOffset(String valueOffset) { - this.valueOffset = valueOffset; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EvaluatePoliciesResponseInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EvaluatePoliciesResponseInner.java deleted file mode 100644 index 0835f63921c..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/EvaluatePoliciesResponseInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.PolicySetResult; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Response body for evaluating a policy set. - */ -public class EvaluatePoliciesResponseInner { - /** - * Results of evaluating a policy set. - */ - @JsonProperty(value = "results") - private List results; - - /** - * Get the results value. - * - * @return the results value - */ - public List results() { - return this.results; - } - - /** - * Set the results value. - * - * @param results the results value to set - * @return the EvaluatePoliciesResponseInner object itself. - */ - public EvaluatePoliciesResponseInner withResults(List results) { - this.results = results; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ExportResourceUsageParametersInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ExportResourceUsageParametersInner.java deleted file mode 100644 index 6c260447b0f..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ExportResourceUsageParametersInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The parameters of the export operation. - */ -public class ExportResourceUsageParametersInner { - /** - * The blob storage absolute sas uri with write permission to the container - * which the usage data needs to be uploaded to. - */ - @JsonProperty(value = "blobStorageAbsoluteSasUri") - private String blobStorageAbsoluteSasUri; - - /** - * The start time of the usage. If not provided, usage will be reported - * since the beginning of data collection. - */ - @JsonProperty(value = "usageStartDate") - private DateTime usageStartDate; - - /** - * Get the blobStorageAbsoluteSasUri value. - * - * @return the blobStorageAbsoluteSasUri value - */ - public String blobStorageAbsoluteSasUri() { - return this.blobStorageAbsoluteSasUri; - } - - /** - * Set the blobStorageAbsoluteSasUri value. - * - * @param blobStorageAbsoluteSasUri the blobStorageAbsoluteSasUri value to set - * @return the ExportResourceUsageParametersInner object itself. - */ - public ExportResourceUsageParametersInner withBlobStorageAbsoluteSasUri(String blobStorageAbsoluteSasUri) { - this.blobStorageAbsoluteSasUri = blobStorageAbsoluteSasUri; - return this; - } - - /** - * Get the usageStartDate value. - * - * @return the usageStartDate value - */ - public DateTime usageStartDate() { - return this.usageStartDate; - } - - /** - * Set the usageStartDate value. - * - * @param usageStartDate the usageStartDate value to set - * @return the ExportResourceUsageParametersInner object itself. - */ - public ExportResourceUsageParametersInner withUsageStartDate(DateTime usageStartDate) { - this.usageStartDate = usageStartDate; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/FormulaInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/FormulaInner.java deleted file mode 100644 index 5cb5f6ea3e7..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/FormulaInner.java +++ /dev/null @@ -1,219 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.devtestlab.FormulaPropertiesFromVm; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A formula for creating a VM, specifying an image base and other parameters. - */ -@JsonFlatten -public class FormulaInner extends Resource { - /** - * The description of the formula. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The author of the formula. - */ - @JsonProperty(value = "properties.author") - private String author; - - /** - * The OS type of the formula. - */ - @JsonProperty(value = "properties.osType") - private String osType; - - /** - * The creation date of the formula. - */ - @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime creationDate; - - /** - * The content of the formula. - */ - @JsonProperty(value = "properties.formulaContent") - private LabVirtualMachineCreationParameterInner formulaContent; - - /** - * Information about a VM from which a formula is to be created. - */ - @JsonProperty(value = "properties.vm") - private FormulaPropertiesFromVm vm; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the FormulaInner object itself. - */ - public FormulaInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the author value. - * - * @return the author value - */ - public String author() { - return this.author; - } - - /** - * Set the author value. - * - * @param author the author value to set - * @return the FormulaInner object itself. - */ - public FormulaInner withAuthor(String author) { - this.author = author; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the FormulaInner object itself. - */ - public FormulaInner withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the creationDate value. - * - * @return the creationDate value - */ - public DateTime creationDate() { - return this.creationDate; - } - - /** - * Get the formulaContent value. - * - * @return the formulaContent value - */ - public LabVirtualMachineCreationParameterInner formulaContent() { - return this.formulaContent; - } - - /** - * Set the formulaContent value. - * - * @param formulaContent the formulaContent value to set - * @return the FormulaInner object itself. - */ - public FormulaInner withFormulaContent(LabVirtualMachineCreationParameterInner formulaContent) { - this.formulaContent = formulaContent; - return this; - } - - /** - * Get the vm value. - * - * @return the vm value - */ - public FormulaPropertiesFromVm vm() { - return this.vm; - } - - /** - * Set the vm value. - * - * @param vm the vm value to set - * @return the FormulaInner object itself. - */ - public FormulaInner withVm(FormulaPropertiesFromVm vm) { - this.vm = vm; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the FormulaInner object itself. - */ - public FormulaInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the FormulaInner object itself. - */ - public FormulaInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/FormulasInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/FormulasInner.java deleted file mode 100644 index a10eba92015..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/FormulasInner.java +++ /dev/null @@ -1,927 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Formulas. - */ -public class FormulasInner { - /** The Retrofit service to perform REST calls. */ - private FormulasService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of FormulasInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public FormulasInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(FormulasService.class); - this.client = client; - } - - /** - * The interface defining all the services for Formulas to be - * used by Retrofit to perform actually REST calls. - */ - interface FormulasService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Formulas list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Formulas get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Formulas createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body FormulaInner formula, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Formulas beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}") - Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body FormulaInner formula, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Formulas delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Formulas listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<FormulaInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FormulaInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FormulaInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<FormulaInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<FormulaInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FormulaInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List formulas in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FormulaInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List formulas in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=description)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<FormulaInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FormulaInner object if successful. - */ - public FormulaInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FormulaInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, FormulaInner>() { - @Override - public FormulaInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FormulaInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FormulaInner object if successful. - */ - public FormulaInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FormulaInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, FormulaInner>() { - @Override - public FormulaInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FormulaInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing Formula. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param formula A formula for creating a VM, specifying an image base and other parameters - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FormulaInner object if successful. - */ - public FormulaInner createOrUpdate(String resourceGroupName, String labName, String name, FormulaInner formula) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, formula).toBlocking().last().body(); - } - - /** - * Create or replace an existing Formula. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param formula A formula for creating a VM, specifying an image base and other parameters - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, FormulaInner formula, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, formula), serviceCallback); - } - - /** - * Create or replace an existing Formula. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param formula A formula for creating a VM, specifying an image base and other parameters - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, FormulaInner formula) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, formula).map(new Func1, FormulaInner>() { - @Override - public FormulaInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing Formula. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param formula A formula for creating a VM, specifying an image base and other parameters - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, FormulaInner formula) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (formula == null) { - throw new IllegalArgumentException("Parameter formula is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(formula); - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, formula, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or replace an existing Formula. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param formula A formula for creating a VM, specifying an image base and other parameters - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FormulaInner object if successful. - */ - public FormulaInner beginCreateOrUpdate(String resourceGroupName, String labName, String name, FormulaInner formula) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, formula).toBlocking().single().body(); - } - - /** - * Create or replace an existing Formula. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param formula A formula for creating a VM, specifying an image base and other parameters - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String labName, String name, FormulaInner formula, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, formula), serviceCallback); - } - - /** - * Create or replace an existing Formula. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param formula A formula for creating a VM, specifying an image base and other parameters - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FormulaInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String labName, String name, FormulaInner formula) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, formula).map(new Func1, FormulaInner>() { - @Override - public FormulaInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing Formula. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param formula A formula for creating a VM, specifying an image base and other parameters - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FormulaInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, FormulaInner formula) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (formula == null) { - throw new IllegalArgumentException("Parameter formula is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(formula); - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, formula, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete formula. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the formula. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List formulas in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<FormulaInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List formulas in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List formulas in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FormulaInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List formulas in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FormulaInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List formulas in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<FormulaInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GalleryImageInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GalleryImageInner.java deleted file mode 100644 index c2ef2129418..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GalleryImageInner.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.devtestlab.GalleryImageReference; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A gallery image. - */ -@JsonFlatten -public class GalleryImageInner extends Resource { - /** - * The author of the gallery image. - */ - @JsonProperty(value = "properties.author") - private String author; - - /** - * The creation date of the gallery image. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The description of the gallery image. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The image reference of the gallery image. - */ - @JsonProperty(value = "properties.imageReference") - private GalleryImageReference imageReference; - - /** - * The icon of the gallery image. - */ - @JsonProperty(value = "properties.icon") - private String icon; - - /** - * Indicates whether this gallery image is enabled. - */ - @JsonProperty(value = "properties.enabled") - private Boolean enabled; - - /** - * Get the author value. - * - * @return the author value - */ - public String author() { - return this.author; - } - - /** - * Set the author value. - * - * @param author the author value to set - * @return the GalleryImageInner object itself. - */ - public GalleryImageInner withAuthor(String author) { - this.author = author; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the GalleryImageInner object itself. - */ - public GalleryImageInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the imageReference value. - * - * @return the imageReference value - */ - public GalleryImageReference imageReference() { - return this.imageReference; - } - - /** - * Set the imageReference value. - * - * @param imageReference the imageReference value to set - * @return the GalleryImageInner object itself. - */ - public GalleryImageInner withImageReference(GalleryImageReference imageReference) { - this.imageReference = imageReference; - return this; - } - - /** - * Get the icon value. - * - * @return the icon value - */ - public String icon() { - return this.icon; - } - - /** - * Set the icon value. - * - * @param icon the icon value to set - * @return the GalleryImageInner object itself. - */ - public GalleryImageInner withIcon(String icon) { - this.icon = icon; - return this; - } - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the GalleryImageInner object itself. - */ - public GalleryImageInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GalleryImagesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GalleryImagesInner.java deleted file mode 100644 index a217119a863..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GalleryImagesInner.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in GalleryImages. - */ -public class GalleryImagesInner { - /** The Retrofit service to perform REST calls. */ - private GalleryImagesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of GalleryImagesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public GalleryImagesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(GalleryImagesService.class); - this.client = client; - } - - /** - * The interface defining all the services for GalleryImages to be - * used by Retrofit to perform actually REST calls. - */ - interface GalleryImagesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GalleryImages list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/galleryimages") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GalleryImages listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GalleryImageInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GalleryImageInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GalleryImageInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GalleryImageInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=author)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GalleryImageInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=author)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=author)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GalleryImageInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List gallery images in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=author)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GalleryImageInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List gallery images in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=author)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GalleryImageInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List gallery images in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GalleryImageInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List gallery images in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List gallery images in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GalleryImageInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List gallery images in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GalleryImageInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List gallery images in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GalleryImageInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GenerateArmTemplateRequestInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GenerateArmTemplateRequestInner.java deleted file mode 100644 index 567f982458c..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GenerateArmTemplateRequestInner.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.ParameterInfo; -import com.microsoft.azure.management.devtestlab.FileUploadOptions; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters for generating an ARM template for deploying artifacts. - */ -public class GenerateArmTemplateRequestInner { - /** - * The resource name of the virtual machine. - */ - @JsonProperty(value = "virtualMachineName") - private String virtualMachineName; - - /** - * The parameters of the ARM template. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * The location of the virtual machine. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Options for uploading the files for the artifact. - * UploadFilesAndGenerateSasTokens is the default value. Possible values - * include: 'UploadFilesAndGenerateSasTokens', 'None'. - */ - @JsonProperty(value = "fileUploadOptions") - private FileUploadOptions fileUploadOptions; - - /** - * Get the virtualMachineName value. - * - * @return the virtualMachineName value - */ - public String virtualMachineName() { - return this.virtualMachineName; - } - - /** - * Set the virtualMachineName value. - * - * @param virtualMachineName the virtualMachineName value to set - * @return the GenerateArmTemplateRequestInner object itself. - */ - public GenerateArmTemplateRequestInner withVirtualMachineName(String virtualMachineName) { - this.virtualMachineName = virtualMachineName; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the GenerateArmTemplateRequestInner object itself. - */ - public GenerateArmTemplateRequestInner withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the GenerateArmTemplateRequestInner object itself. - */ - public GenerateArmTemplateRequestInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the fileUploadOptions value. - * - * @return the fileUploadOptions value - */ - public FileUploadOptions fileUploadOptions() { - return this.fileUploadOptions; - } - - /** - * Set the fileUploadOptions value. - * - * @param fileUploadOptions the fileUploadOptions value to set - * @return the GenerateArmTemplateRequestInner object itself. - */ - public GenerateArmTemplateRequestInner withFileUploadOptions(FileUploadOptions fileUploadOptions) { - this.fileUploadOptions = fileUploadOptions; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GenerateUploadUriResponseInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GenerateUploadUriResponseInner.java deleted file mode 100644 index 48489184493..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GenerateUploadUriResponseInner.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Reponse body for generating an upload URI. - */ -public class GenerateUploadUriResponseInner { - /** - * The upload URI for the VHD. - */ - @JsonProperty(value = "uploadUri") - private String uploadUri; - - /** - * Get the uploadUri value. - * - * @return the uploadUri value - */ - public String uploadUri() { - return this.uploadUri; - } - - /** - * Set the uploadUri value. - * - * @param uploadUri the uploadUri value to set - * @return the GenerateUploadUriResponseInner object itself. - */ - public GenerateUploadUriResponseInner withUploadUri(String uploadUri) { - this.uploadUri = uploadUri; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GlobalSchedulesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GlobalSchedulesInner.java deleted file mode 100644 index ae3a656e960..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/GlobalSchedulesInner.java +++ /dev/null @@ -1,1587 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in GlobalSchedules. - */ -public class GlobalSchedulesInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private GlobalSchedulesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of GlobalSchedulesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public GlobalSchedulesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(GlobalSchedulesService.class); - this.client = client; - } - - /** - * The interface defining all the services for GlobalSchedules to be - * used by Retrofit to perform actually REST calls. - */ - interface GlobalSchedulesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules listBySubscription" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body ScheduleInner schedule, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body ScheduleFragmentInner schedule, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules execute" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/execute") - Observable> execute(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules beginExecute" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/execute") - Observable> beginExecute(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules retarget" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget") - Observable> retarget(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body RetargetSchedulePropertiesInner retargetScheduleProperties, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules beginRetarget" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget") - Observable> beginRetarget(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body RetargetSchedulePropertiesInner retargetScheduleProperties, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules listBySubscriptionNext" }) - @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List schedules in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listBySubscription() { - ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync() { - return listBySubscriptionSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.listBySubscription(this.client.subscriptionId(), expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List schedules in a subscription. - * - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listBySubscription(final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listBySubscriptionSinglePageAsync(expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a subscription. - * - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a subscription. - * - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listBySubscriptionAsync(final String expand, final String filter, final Integer top, final String orderby) { - return listBySubscriptionWithServiceResponseAsync(expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a subscription. - * - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync(final String expand, final String filter, final Integer top, final String orderby) { - return listBySubscriptionSinglePageAsync(expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a subscription. - * - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=status)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync(final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscription(this.client.subscriptionId(), expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby) { - return listByResourceGroupSinglePageAsync(resourceGroupName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=status)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner getByResourceGroup(String resourceGroupName, String name) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String name) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner getByResourceGroup(String resourceGroupName, String name, String expand) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand).toBlocking().single().body(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand), serviceCallback); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String name, String expand) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner createOrUpdate(String resourceGroupName, String name, ScheduleInner schedule) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, schedule).toBlocking().single().body(); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param schedule A schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, ScheduleInner schedule, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, schedule), serviceCallback); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String name, ScheduleInner schedule) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, schedule).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, ScheduleInner schedule) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (schedule == null) { - throw new IllegalArgumentException("Parameter schedule is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(schedule); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, name, schedule, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner update(String resourceGroupName, String name, ScheduleFragmentInner schedule) { - return updateWithServiceResponseAsync(resourceGroupName, name, schedule).toBlocking().single().body(); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param schedule A schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String name, ScheduleFragmentInner schedule, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, schedule), serviceCallback); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable updateAsync(String resourceGroupName, String name, ScheduleFragmentInner schedule) { - return updateWithServiceResponseAsync(resourceGroupName, name, schedule).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, ScheduleFragmentInner schedule) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (schedule == null) { - throw new IllegalArgumentException("Parameter schedule is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(schedule); - return service.update(this.client.subscriptionId(), resourceGroupName, name, schedule, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void execute(String resourceGroupName, String name) { - executeWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().body(); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture executeAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(executeWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable executeAsync(String resourceGroupName, String name) { - return executeWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> executeWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.execute(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginExecute(String resourceGroupName, String name) { - beginExecuteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginExecuteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginExecuteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginExecuteAsync(String resourceGroupName, String name) { - return beginExecuteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginExecuteWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginExecute(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginExecuteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginExecuteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates a schedule's target resource Id. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param retargetScheduleProperties Properties for retargeting a virtual machine schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void retarget(String resourceGroupName, String name, RetargetSchedulePropertiesInner retargetScheduleProperties) { - retargetWithServiceResponseAsync(resourceGroupName, name, retargetScheduleProperties).toBlocking().last().body(); - } - - /** - * Updates a schedule's target resource Id. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param retargetScheduleProperties Properties for retargeting a virtual machine schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture retargetAsync(String resourceGroupName, String name, RetargetSchedulePropertiesInner retargetScheduleProperties, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(retargetWithServiceResponseAsync(resourceGroupName, name, retargetScheduleProperties), serviceCallback); - } - - /** - * Updates a schedule's target resource Id. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param retargetScheduleProperties Properties for retargeting a virtual machine schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable retargetAsync(String resourceGroupName, String name, RetargetSchedulePropertiesInner retargetScheduleProperties) { - return retargetWithServiceResponseAsync(resourceGroupName, name, retargetScheduleProperties).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a schedule's target resource Id. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param retargetScheduleProperties Properties for retargeting a virtual machine schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> retargetWithServiceResponseAsync(String resourceGroupName, String name, RetargetSchedulePropertiesInner retargetScheduleProperties) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (retargetScheduleProperties == null) { - throw new IllegalArgumentException("Parameter retargetScheduleProperties is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(retargetScheduleProperties); - Observable> observable = service.retarget(this.client.subscriptionId(), resourceGroupName, name, retargetScheduleProperties, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates a schedule's target resource Id. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param retargetScheduleProperties Properties for retargeting a virtual machine schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginRetarget(String resourceGroupName, String name, RetargetSchedulePropertiesInner retargetScheduleProperties) { - beginRetargetWithServiceResponseAsync(resourceGroupName, name, retargetScheduleProperties).toBlocking().single().body(); - } - - /** - * Updates a schedule's target resource Id. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param retargetScheduleProperties Properties for retargeting a virtual machine schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginRetargetAsync(String resourceGroupName, String name, RetargetSchedulePropertiesInner retargetScheduleProperties, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginRetargetWithServiceResponseAsync(resourceGroupName, name, retargetScheduleProperties), serviceCallback); - } - - /** - * Updates a schedule's target resource Id. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param retargetScheduleProperties Properties for retargeting a virtual machine schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginRetargetAsync(String resourceGroupName, String name, RetargetSchedulePropertiesInner retargetScheduleProperties) { - return beginRetargetWithServiceResponseAsync(resourceGroupName, name, retargetScheduleProperties).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a schedule's target resource Id. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the schedule. - * @param retargetScheduleProperties Properties for retargeting a virtual machine schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginRetargetWithServiceResponseAsync(String resourceGroupName, String name, RetargetSchedulePropertiesInner retargetScheduleProperties) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (retargetScheduleProperties == null) { - throw new IllegalArgumentException("Parameter retargetScheduleProperties is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(retargetScheduleProperties); - return service.beginRetarget(this.client.subscriptionId(), resourceGroupName, name, retargetScheduleProperties, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginRetargetDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginRetargetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List schedules in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List schedules in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabCostInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabCostInner.java deleted file mode 100644 index e0814e10428..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabCostInner.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.TargetCostProperties; -import com.microsoft.azure.management.devtestlab.LabCostSummaryProperties; -import java.util.List; -import com.microsoft.azure.management.devtestlab.LabCostDetailsProperties; -import com.microsoft.azure.management.devtestlab.LabResourceCostProperties; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A cost item. - */ -@JsonFlatten -public class LabCostInner extends Resource { - /** - * The target cost properties. - */ - @JsonProperty(value = "properties.targetCost") - private TargetCostProperties targetCost; - - /** - * The lab cost summary component of the cost data. - */ - @JsonProperty(value = "properties.labCostSummary", access = JsonProperty.Access.WRITE_ONLY) - private LabCostSummaryProperties labCostSummary; - - /** - * The lab cost details component of the cost data. - */ - @JsonProperty(value = "properties.labCostDetails", access = JsonProperty.Access.WRITE_ONLY) - private List labCostDetails; - - /** - * The resource cost component of the cost data. - */ - @JsonProperty(value = "properties.resourceCosts", access = JsonProperty.Access.WRITE_ONLY) - private List resourceCosts; - - /** - * The currency code of the cost. - */ - @JsonProperty(value = "properties.currencyCode") - private String currencyCode; - - /** - * The start time of the cost data. - */ - @JsonProperty(value = "properties.startDateTime") - private DateTime startDateTime; - - /** - * The end time of the cost data. - */ - @JsonProperty(value = "properties.endDateTime") - private DateTime endDateTime; - - /** - * The creation date of the cost. - */ - @JsonProperty(value = "properties.createdDate") - private DateTime createdDate; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the targetCost value. - * - * @return the targetCost value - */ - public TargetCostProperties targetCost() { - return this.targetCost; - } - - /** - * Set the targetCost value. - * - * @param targetCost the targetCost value to set - * @return the LabCostInner object itself. - */ - public LabCostInner withTargetCost(TargetCostProperties targetCost) { - this.targetCost = targetCost; - return this; - } - - /** - * Get the labCostSummary value. - * - * @return the labCostSummary value - */ - public LabCostSummaryProperties labCostSummary() { - return this.labCostSummary; - } - - /** - * Get the labCostDetails value. - * - * @return the labCostDetails value - */ - public List labCostDetails() { - return this.labCostDetails; - } - - /** - * Get the resourceCosts value. - * - * @return the resourceCosts value - */ - public List resourceCosts() { - return this.resourceCosts; - } - - /** - * Get the currencyCode value. - * - * @return the currencyCode value - */ - public String currencyCode() { - return this.currencyCode; - } - - /** - * Set the currencyCode value. - * - * @param currencyCode the currencyCode value to set - * @return the LabCostInner object itself. - */ - public LabCostInner withCurrencyCode(String currencyCode) { - this.currencyCode = currencyCode; - return this; - } - - /** - * Get the startDateTime value. - * - * @return the startDateTime value - */ - public DateTime startDateTime() { - return this.startDateTime; - } - - /** - * Set the startDateTime value. - * - * @param startDateTime the startDateTime value to set - * @return the LabCostInner object itself. - */ - public LabCostInner withStartDateTime(DateTime startDateTime) { - this.startDateTime = startDateTime; - return this; - } - - /** - * Get the endDateTime value. - * - * @return the endDateTime value - */ - public DateTime endDateTime() { - return this.endDateTime; - } - - /** - * Set the endDateTime value. - * - * @param endDateTime the endDateTime value to set - * @return the LabCostInner object itself. - */ - public LabCostInner withEndDateTime(DateTime endDateTime) { - this.endDateTime = endDateTime; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Set the createdDate value. - * - * @param createdDate the createdDate value to set - * @return the LabCostInner object itself. - */ - public LabCostInner withCreatedDate(DateTime createdDate) { - this.createdDate = createdDate; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the LabCostInner object itself. - */ - public LabCostInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the LabCostInner object itself. - */ - public LabCostInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabFragmentInner.java deleted file mode 100644 index 73756a51635..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabFragmentInner.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.StorageType; -import com.microsoft.azure.management.devtestlab.PremiumDataDisk; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A lab. - */ -@JsonFlatten -public class LabFragmentInner extends Resource { - /** - * Type of storage used by the lab. It can be either Premium or Standard. - * Default is Premium. Possible values include: 'Standard', 'Premium'. - */ - @JsonProperty(value = "properties.labStorageType") - private StorageType labStorageType; - - /** - * The setting to enable usage of premium data disks. - * When its value is 'Enabled', creation of standard or premium data disks - * is allowed. - * When its value is 'Disabled', only creation of standard data disks is - * allowed. Possible values include: 'Disabled', 'Enabled'. - */ - @JsonProperty(value = "properties.premiumDataDisks") - private PremiumDataDisk premiumDataDisks; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the labStorageType value. - * - * @return the labStorageType value - */ - public StorageType labStorageType() { - return this.labStorageType; - } - - /** - * Set the labStorageType value. - * - * @param labStorageType the labStorageType value to set - * @return the LabFragmentInner object itself. - */ - public LabFragmentInner withLabStorageType(StorageType labStorageType) { - this.labStorageType = labStorageType; - return this; - } - - /** - * Get the premiumDataDisks value. - * - * @return the premiumDataDisks value - */ - public PremiumDataDisk premiumDataDisks() { - return this.premiumDataDisks; - } - - /** - * Set the premiumDataDisks value. - * - * @param premiumDataDisks the premiumDataDisks value to set - * @return the LabFragmentInner object itself. - */ - public LabFragmentInner withPremiumDataDisks(PremiumDataDisk premiumDataDisks) { - this.premiumDataDisks = premiumDataDisks; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the LabFragmentInner object itself. - */ - public LabFragmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the LabFragmentInner object itself. - */ - public LabFragmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabInner.java deleted file mode 100644 index ea5f91dd52c..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabInner.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.StorageType; -import org.joda.time.DateTime; -import com.microsoft.azure.management.devtestlab.PremiumDataDisk; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A lab. - */ -@JsonFlatten -public class LabInner extends Resource { - /** - * The lab's default storage account. - */ - @JsonProperty(value = "properties.defaultStorageAccount", access = JsonProperty.Access.WRITE_ONLY) - private String defaultStorageAccount; - - /** - * The lab's default premium storage account. - */ - @JsonProperty(value = "properties.defaultPremiumStorageAccount", access = JsonProperty.Access.WRITE_ONLY) - private String defaultPremiumStorageAccount; - - /** - * The lab's artifact storage account. - */ - @JsonProperty(value = "properties.artifactsStorageAccount", access = JsonProperty.Access.WRITE_ONLY) - private String artifactsStorageAccount; - - /** - * The lab's premium data disk storage account. - */ - @JsonProperty(value = "properties.premiumDataDiskStorageAccount", access = JsonProperty.Access.WRITE_ONLY) - private String premiumDataDiskStorageAccount; - - /** - * The lab's Key vault. - */ - @JsonProperty(value = "properties.vaultName", access = JsonProperty.Access.WRITE_ONLY) - private String vaultName; - - /** - * Type of storage used by the lab. It can be either Premium or Standard. - * Default is Premium. Possible values include: 'Standard', 'Premium'. - */ - @JsonProperty(value = "properties.labStorageType") - private StorageType labStorageType; - - /** - * The creation date of the lab. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The setting to enable usage of premium data disks. - * When its value is 'Enabled', creation of standard or premium data disks - * is allowed. - * When its value is 'Disabled', only creation of standard data disks is - * allowed. Possible values include: 'Disabled', 'Enabled'. - */ - @JsonProperty(value = "properties.premiumDataDisks") - private PremiumDataDisk premiumDataDisks; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the defaultStorageAccount value. - * - * @return the defaultStorageAccount value - */ - public String defaultStorageAccount() { - return this.defaultStorageAccount; - } - - /** - * Get the defaultPremiumStorageAccount value. - * - * @return the defaultPremiumStorageAccount value - */ - public String defaultPremiumStorageAccount() { - return this.defaultPremiumStorageAccount; - } - - /** - * Get the artifactsStorageAccount value. - * - * @return the artifactsStorageAccount value - */ - public String artifactsStorageAccount() { - return this.artifactsStorageAccount; - } - - /** - * Get the premiumDataDiskStorageAccount value. - * - * @return the premiumDataDiskStorageAccount value - */ - public String premiumDataDiskStorageAccount() { - return this.premiumDataDiskStorageAccount; - } - - /** - * Get the vaultName value. - * - * @return the vaultName value - */ - public String vaultName() { - return this.vaultName; - } - - /** - * Get the labStorageType value. - * - * @return the labStorageType value - */ - public StorageType labStorageType() { - return this.labStorageType; - } - - /** - * Set the labStorageType value. - * - * @param labStorageType the labStorageType value to set - * @return the LabInner object itself. - */ - public LabInner withLabStorageType(StorageType labStorageType) { - this.labStorageType = labStorageType; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the premiumDataDisks value. - * - * @return the premiumDataDisks value - */ - public PremiumDataDisk premiumDataDisks() { - return this.premiumDataDisks; - } - - /** - * Set the premiumDataDisks value. - * - * @param premiumDataDisks the premiumDataDisks value to set - * @return the LabInner object itself. - */ - public LabInner withPremiumDataDisks(PremiumDataDisk premiumDataDisks) { - this.premiumDataDisks = premiumDataDisks; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the LabInner object itself. - */ - public LabInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the LabInner object itself. - */ - public LabInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVhdInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVhdInner.java deleted file mode 100644 index 68a2d1676b9..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVhdInner.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of a VHD in the lab. - */ -public class LabVhdInner { - /** - * The URI to the VHD. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the LabVhdInner object itself. - */ - public LabVhdInner withId(String id) { - this.id = id; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineCreationParameterInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineCreationParameterInner.java deleted file mode 100644 index 903b92563cd..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineCreationParameterInner.java +++ /dev/null @@ -1,917 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.BulkCreationParameters; -import org.joda.time.DateTime; -import java.util.List; -import com.microsoft.azure.management.devtestlab.ArtifactDeploymentStatusProperties; -import com.microsoft.azure.management.devtestlab.GalleryImageReference; -import com.microsoft.azure.management.devtestlab.ComputeVmProperties; -import com.microsoft.azure.management.devtestlab.NetworkInterfaceProperties; -import com.microsoft.azure.management.devtestlab.VirtualMachineCreationSource; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Properties for creating a virtual machine. - */ -@JsonFlatten -public class LabVirtualMachineCreationParameterInner { - /** - * The number of virtual machine instances to create. - */ - @JsonProperty(value = "properties.bulkCreationParameters") - private BulkCreationParameters bulkCreationParameters; - - /** - * The notes of the virtual machine. - */ - @JsonProperty(value = "properties.notes") - private String notes; - - /** - * The object identifier of the owner of the virtual machine. - */ - @JsonProperty(value = "properties.ownerObjectId") - private String ownerObjectId; - - /** - * The user principal name of the virtual machine owner. - */ - @JsonProperty(value = "properties.ownerUserPrincipalName") - private String ownerUserPrincipalName; - - /** - * The object identifier of the creator of the virtual machine. - */ - @JsonProperty(value = "properties.createdByUserId") - private String createdByUserId; - - /** - * The email address of creator of the virtual machine. - */ - @JsonProperty(value = "properties.createdByUser") - private String createdByUser; - - /** - * The creation date of the virtual machine. - */ - @JsonProperty(value = "properties.createdDate") - private DateTime createdDate; - - /** - * The custom image identifier of the virtual machine. - */ - @JsonProperty(value = "properties.customImageId") - private String customImageId; - - /** - * The OS type of the virtual machine. - */ - @JsonProperty(value = "properties.osType") - private String osType; - - /** - * The size of the virtual machine. - */ - @JsonProperty(value = "properties.size") - private String size; - - /** - * The user name of the virtual machine. - */ - @JsonProperty(value = "properties.userName") - private String userName; - - /** - * The password of the virtual machine administrator. - */ - @JsonProperty(value = "properties.password") - private String password; - - /** - * The SSH key of the virtual machine administrator. - */ - @JsonProperty(value = "properties.sshKey") - private String sshKey; - - /** - * Indicates whether this virtual machine uses an SSH key for - * authentication. - */ - @JsonProperty(value = "properties.isAuthenticationWithSshKey") - private Boolean isAuthenticationWithSshKey; - - /** - * The fully-qualified domain name of the virtual machine. - */ - @JsonProperty(value = "properties.fqdn") - private String fqdn; - - /** - * The lab subnet name of the virtual machine. - */ - @JsonProperty(value = "properties.labSubnetName") - private String labSubnetName; - - /** - * The lab virtual network identifier of the virtual machine. - */ - @JsonProperty(value = "properties.labVirtualNetworkId") - private String labVirtualNetworkId; - - /** - * Indicates whether the virtual machine is to be created without a public - * IP address. - */ - @JsonProperty(value = "properties.disallowPublicIpAddress") - private Boolean disallowPublicIpAddress; - - /** - * The artifacts to be installed on the virtual machine. - */ - @JsonProperty(value = "properties.artifacts") - private List artifacts; - - /** - * The artifact deployment status for the virtual machine. - */ - @JsonProperty(value = "properties.artifactDeploymentStatus") - private ArtifactDeploymentStatusProperties artifactDeploymentStatus; - - /** - * The Microsoft Azure Marketplace image reference of the virtual machine. - */ - @JsonProperty(value = "properties.galleryImageReference") - private GalleryImageReference galleryImageReference; - - /** - * The compute virtual machine properties. - */ - @JsonProperty(value = "properties.computeVm") - private ComputeVmProperties computeVm; - - /** - * The network interface properties. - */ - @JsonProperty(value = "properties.networkInterface") - private NetworkInterfaceProperties networkInterface; - - /** - * The applicable schedule for the virtual machine. - */ - @JsonProperty(value = "properties.applicableSchedule") - private ApplicableScheduleInner applicableSchedule; - - /** - * The expiration date for VM. - */ - @JsonProperty(value = "properties.expirationDate") - private DateTime expirationDate; - - /** - * Indicates whether another user can take ownership of the virtual - * machine. - */ - @JsonProperty(value = "properties.allowClaim") - private Boolean allowClaim; - - /** - * Storage type to use for virtual machine (i.e. Standard, Premium). - */ - @JsonProperty(value = "properties.storageType") - private String storageType; - - /** - * Tells source of creation of lab virtual machine. Output property only. - * Possible values include: 'FromCustomImage', 'FromGalleryImage'. - */ - @JsonProperty(value = "properties.virtualMachineCreationSource") - private VirtualMachineCreationSource virtualMachineCreationSource; - - /** - * The resource ID of the environment that contains this virtual machine, - * if any. - */ - @JsonProperty(value = "properties.environmentId") - private String environmentId; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * The name of the virtual machine or environment. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The location of the new virtual machine or environment. - */ - @JsonProperty(value = "location") - private String location; - - /** - * The tags of the resource. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the bulkCreationParameters value. - * - * @return the bulkCreationParameters value - */ - public BulkCreationParameters bulkCreationParameters() { - return this.bulkCreationParameters; - } - - /** - * Set the bulkCreationParameters value. - * - * @param bulkCreationParameters the bulkCreationParameters value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withBulkCreationParameters(BulkCreationParameters bulkCreationParameters) { - this.bulkCreationParameters = bulkCreationParameters; - return this; - } - - /** - * Get the notes value. - * - * @return the notes value - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes value. - * - * @param notes the notes value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the ownerObjectId value. - * - * @return the ownerObjectId value - */ - public String ownerObjectId() { - return this.ownerObjectId; - } - - /** - * Set the ownerObjectId value. - * - * @param ownerObjectId the ownerObjectId value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withOwnerObjectId(String ownerObjectId) { - this.ownerObjectId = ownerObjectId; - return this; - } - - /** - * Get the ownerUserPrincipalName value. - * - * @return the ownerUserPrincipalName value - */ - public String ownerUserPrincipalName() { - return this.ownerUserPrincipalName; - } - - /** - * Set the ownerUserPrincipalName value. - * - * @param ownerUserPrincipalName the ownerUserPrincipalName value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withOwnerUserPrincipalName(String ownerUserPrincipalName) { - this.ownerUserPrincipalName = ownerUserPrincipalName; - return this; - } - - /** - * Get the createdByUserId value. - * - * @return the createdByUserId value - */ - public String createdByUserId() { - return this.createdByUserId; - } - - /** - * Set the createdByUserId value. - * - * @param createdByUserId the createdByUserId value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withCreatedByUserId(String createdByUserId) { - this.createdByUserId = createdByUserId; - return this; - } - - /** - * Get the createdByUser value. - * - * @return the createdByUser value - */ - public String createdByUser() { - return this.createdByUser; - } - - /** - * Set the createdByUser value. - * - * @param createdByUser the createdByUser value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withCreatedByUser(String createdByUser) { - this.createdByUser = createdByUser; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Set the createdDate value. - * - * @param createdDate the createdDate value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withCreatedDate(DateTime createdDate) { - this.createdDate = createdDate; - return this; - } - - /** - * Get the customImageId value. - * - * @return the customImageId value - */ - public String customImageId() { - return this.customImageId; - } - - /** - * Set the customImageId value. - * - * @param customImageId the customImageId value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withCustomImageId(String customImageId) { - this.customImageId = customImageId; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the size value. - * - * @return the size value - */ - public String size() { - return this.size; - } - - /** - * Set the size value. - * - * @param size the size value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the userName value. - * - * @return the userName value - */ - public String userName() { - return this.userName; - } - - /** - * Set the userName value. - * - * @param userName the userName value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withUserName(String userName) { - this.userName = userName; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the sshKey value. - * - * @return the sshKey value - */ - public String sshKey() { - return this.sshKey; - } - - /** - * Set the sshKey value. - * - * @param sshKey the sshKey value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withSshKey(String sshKey) { - this.sshKey = sshKey; - return this; - } - - /** - * Get the isAuthenticationWithSshKey value. - * - * @return the isAuthenticationWithSshKey value - */ - public Boolean isAuthenticationWithSshKey() { - return this.isAuthenticationWithSshKey; - } - - /** - * Set the isAuthenticationWithSshKey value. - * - * @param isAuthenticationWithSshKey the isAuthenticationWithSshKey value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withIsAuthenticationWithSshKey(Boolean isAuthenticationWithSshKey) { - this.isAuthenticationWithSshKey = isAuthenticationWithSshKey; - return this; - } - - /** - * Get the fqdn value. - * - * @return the fqdn value - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Set the fqdn value. - * - * @param fqdn the fqdn value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withFqdn(String fqdn) { - this.fqdn = fqdn; - return this; - } - - /** - * Get the labSubnetName value. - * - * @return the labSubnetName value - */ - public String labSubnetName() { - return this.labSubnetName; - } - - /** - * Set the labSubnetName value. - * - * @param labSubnetName the labSubnetName value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; - return this; - } - - /** - * Get the labVirtualNetworkId value. - * - * @return the labVirtualNetworkId value - */ - public String labVirtualNetworkId() { - return this.labVirtualNetworkId; - } - - /** - * Set the labVirtualNetworkId value. - * - * @param labVirtualNetworkId the labVirtualNetworkId value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withLabVirtualNetworkId(String labVirtualNetworkId) { - this.labVirtualNetworkId = labVirtualNetworkId; - return this; - } - - /** - * Get the disallowPublicIpAddress value. - * - * @return the disallowPublicIpAddress value - */ - public Boolean disallowPublicIpAddress() { - return this.disallowPublicIpAddress; - } - - /** - * Set the disallowPublicIpAddress value. - * - * @param disallowPublicIpAddress the disallowPublicIpAddress value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withDisallowPublicIpAddress(Boolean disallowPublicIpAddress) { - this.disallowPublicIpAddress = disallowPublicIpAddress; - return this; - } - - /** - * Get the artifacts value. - * - * @return the artifacts value - */ - public List artifacts() { - return this.artifacts; - } - - /** - * Set the artifacts value. - * - * @param artifacts the artifacts value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withArtifacts(List artifacts) { - this.artifacts = artifacts; - return this; - } - - /** - * Get the artifactDeploymentStatus value. - * - * @return the artifactDeploymentStatus value - */ - public ArtifactDeploymentStatusProperties artifactDeploymentStatus() { - return this.artifactDeploymentStatus; - } - - /** - * Set the artifactDeploymentStatus value. - * - * @param artifactDeploymentStatus the artifactDeploymentStatus value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withArtifactDeploymentStatus(ArtifactDeploymentStatusProperties artifactDeploymentStatus) { - this.artifactDeploymentStatus = artifactDeploymentStatus; - return this; - } - - /** - * Get the galleryImageReference value. - * - * @return the galleryImageReference value - */ - public GalleryImageReference galleryImageReference() { - return this.galleryImageReference; - } - - /** - * Set the galleryImageReference value. - * - * @param galleryImageReference the galleryImageReference value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withGalleryImageReference(GalleryImageReference galleryImageReference) { - this.galleryImageReference = galleryImageReference; - return this; - } - - /** - * Get the computeVm value. - * - * @return the computeVm value - */ - public ComputeVmProperties computeVm() { - return this.computeVm; - } - - /** - * Set the computeVm value. - * - * @param computeVm the computeVm value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withComputeVm(ComputeVmProperties computeVm) { - this.computeVm = computeVm; - return this; - } - - /** - * Get the networkInterface value. - * - * @return the networkInterface value - */ - public NetworkInterfaceProperties networkInterface() { - return this.networkInterface; - } - - /** - * Set the networkInterface value. - * - * @param networkInterface the networkInterface value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withNetworkInterface(NetworkInterfaceProperties networkInterface) { - this.networkInterface = networkInterface; - return this; - } - - /** - * Get the applicableSchedule value. - * - * @return the applicableSchedule value - */ - public ApplicableScheduleInner applicableSchedule() { - return this.applicableSchedule; - } - - /** - * Set the applicableSchedule value. - * - * @param applicableSchedule the applicableSchedule value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withApplicableSchedule(ApplicableScheduleInner applicableSchedule) { - this.applicableSchedule = applicableSchedule; - return this; - } - - /** - * Get the expirationDate value. - * - * @return the expirationDate value - */ - public DateTime expirationDate() { - return this.expirationDate; - } - - /** - * Set the expirationDate value. - * - * @param expirationDate the expirationDate value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withExpirationDate(DateTime expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - /** - * Get the allowClaim value. - * - * @return the allowClaim value - */ - public Boolean allowClaim() { - return this.allowClaim; - } - - /** - * Set the allowClaim value. - * - * @param allowClaim the allowClaim value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withAllowClaim(Boolean allowClaim) { - this.allowClaim = allowClaim; - return this; - } - - /** - * Get the storageType value. - * - * @return the storageType value - */ - public String storageType() { - return this.storageType; - } - - /** - * Set the storageType value. - * - * @param storageType the storageType value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withStorageType(String storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the virtualMachineCreationSource value. - * - * @return the virtualMachineCreationSource value - */ - public VirtualMachineCreationSource virtualMachineCreationSource() { - return this.virtualMachineCreationSource; - } - - /** - * Set the virtualMachineCreationSource value. - * - * @param virtualMachineCreationSource the virtualMachineCreationSource value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withVirtualMachineCreationSource(VirtualMachineCreationSource virtualMachineCreationSource) { - this.virtualMachineCreationSource = virtualMachineCreationSource; - return this; - } - - /** - * Get the environmentId value. - * - * @return the environmentId value - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId value. - * - * @param environmentId the environmentId value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the LabVirtualMachineCreationParameterInner object itself. - */ - public LabVirtualMachineCreationParameterInner withTags(Map tags) { - this.tags = tags; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineFragmentInner.java deleted file mode 100644 index a3a791f3369..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineFragmentInner.java +++ /dev/null @@ -1,813 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import org.joda.time.DateTime; -import java.util.List; -import com.microsoft.azure.management.devtestlab.ArtifactInstallPropertiesFragment; -import com.microsoft.azure.management.devtestlab.ArtifactDeploymentStatusPropertiesFragment; -import com.microsoft.azure.management.devtestlab.GalleryImageReferenceFragment; -import com.microsoft.azure.management.devtestlab.ComputeVmPropertiesFragment; -import com.microsoft.azure.management.devtestlab.NetworkInterfacePropertiesFragment; -import com.microsoft.azure.management.devtestlab.VirtualMachineCreationSource; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A virtual machine. - */ -@JsonFlatten -public class LabVirtualMachineFragmentInner extends Resource { - /** - * The notes of the virtual machine. - */ - @JsonProperty(value = "properties.notes") - private String notes; - - /** - * The object identifier of the owner of the virtual machine. - */ - @JsonProperty(value = "properties.ownerObjectId") - private String ownerObjectId; - - /** - * The user principal name of the virtual machine owner. - */ - @JsonProperty(value = "properties.ownerUserPrincipalName") - private String ownerUserPrincipalName; - - /** - * The object identifier of the creator of the virtual machine. - */ - @JsonProperty(value = "properties.createdByUserId") - private String createdByUserId; - - /** - * The email address of creator of the virtual machine. - */ - @JsonProperty(value = "properties.createdByUser") - private String createdByUser; - - /** - * The creation date of the virtual machine. - */ - @JsonProperty(value = "properties.createdDate") - private DateTime createdDate; - - /** - * The custom image identifier of the virtual machine. - */ - @JsonProperty(value = "properties.customImageId") - private String customImageId; - - /** - * The OS type of the virtual machine. - */ - @JsonProperty(value = "properties.osType") - private String osType; - - /** - * The size of the virtual machine. - */ - @JsonProperty(value = "properties.size") - private String size; - - /** - * The user name of the virtual machine. - */ - @JsonProperty(value = "properties.userName") - private String userName; - - /** - * The password of the virtual machine administrator. - */ - @JsonProperty(value = "properties.password") - private String password; - - /** - * The SSH key of the virtual machine administrator. - */ - @JsonProperty(value = "properties.sshKey") - private String sshKey; - - /** - * Indicates whether this virtual machine uses an SSH key for - * authentication. - */ - @JsonProperty(value = "properties.isAuthenticationWithSshKey") - private Boolean isAuthenticationWithSshKey; - - /** - * The fully-qualified domain name of the virtual machine. - */ - @JsonProperty(value = "properties.fqdn") - private String fqdn; - - /** - * The lab subnet name of the virtual machine. - */ - @JsonProperty(value = "properties.labSubnetName") - private String labSubnetName; - - /** - * The lab virtual network identifier of the virtual machine. - */ - @JsonProperty(value = "properties.labVirtualNetworkId") - private String labVirtualNetworkId; - - /** - * Indicates whether the virtual machine is to be created without a public - * IP address. - */ - @JsonProperty(value = "properties.disallowPublicIpAddress") - private Boolean disallowPublicIpAddress; - - /** - * The artifacts to be installed on the virtual machine. - */ - @JsonProperty(value = "properties.artifacts") - private List artifacts; - - /** - * The artifact deployment status for the virtual machine. - */ - @JsonProperty(value = "properties.artifactDeploymentStatus") - private ArtifactDeploymentStatusPropertiesFragment artifactDeploymentStatus; - - /** - * The Microsoft Azure Marketplace image reference of the virtual machine. - */ - @JsonProperty(value = "properties.galleryImageReference") - private GalleryImageReferenceFragment galleryImageReference; - - /** - * The compute virtual machine properties. - */ - @JsonProperty(value = "properties.computeVm") - private ComputeVmPropertiesFragment computeVm; - - /** - * The network interface properties. - */ - @JsonProperty(value = "properties.networkInterface") - private NetworkInterfacePropertiesFragment networkInterface; - - /** - * The applicable schedule for the virtual machine. - */ - @JsonProperty(value = "properties.applicableSchedule") - private ApplicableScheduleFragmentInner applicableSchedule; - - /** - * The expiration date for VM. - */ - @JsonProperty(value = "properties.expirationDate") - private DateTime expirationDate; - - /** - * Indicates whether another user can take ownership of the virtual - * machine. - */ - @JsonProperty(value = "properties.allowClaim") - private Boolean allowClaim; - - /** - * Storage type to use for virtual machine (i.e. Standard, Premium). - */ - @JsonProperty(value = "properties.storageType") - private String storageType; - - /** - * Tells source of creation of lab virtual machine. Output property only. - * Possible values include: 'FromCustomImage', 'FromGalleryImage'. - */ - @JsonProperty(value = "properties.virtualMachineCreationSource") - private VirtualMachineCreationSource virtualMachineCreationSource; - - /** - * The resource ID of the environment that contains this virtual machine, - * if any. - */ - @JsonProperty(value = "properties.environmentId") - private String environmentId; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the notes value. - * - * @return the notes value - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes value. - * - * @param notes the notes value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the ownerObjectId value. - * - * @return the ownerObjectId value - */ - public String ownerObjectId() { - return this.ownerObjectId; - } - - /** - * Set the ownerObjectId value. - * - * @param ownerObjectId the ownerObjectId value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withOwnerObjectId(String ownerObjectId) { - this.ownerObjectId = ownerObjectId; - return this; - } - - /** - * Get the ownerUserPrincipalName value. - * - * @return the ownerUserPrincipalName value - */ - public String ownerUserPrincipalName() { - return this.ownerUserPrincipalName; - } - - /** - * Set the ownerUserPrincipalName value. - * - * @param ownerUserPrincipalName the ownerUserPrincipalName value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withOwnerUserPrincipalName(String ownerUserPrincipalName) { - this.ownerUserPrincipalName = ownerUserPrincipalName; - return this; - } - - /** - * Get the createdByUserId value. - * - * @return the createdByUserId value - */ - public String createdByUserId() { - return this.createdByUserId; - } - - /** - * Set the createdByUserId value. - * - * @param createdByUserId the createdByUserId value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withCreatedByUserId(String createdByUserId) { - this.createdByUserId = createdByUserId; - return this; - } - - /** - * Get the createdByUser value. - * - * @return the createdByUser value - */ - public String createdByUser() { - return this.createdByUser; - } - - /** - * Set the createdByUser value. - * - * @param createdByUser the createdByUser value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withCreatedByUser(String createdByUser) { - this.createdByUser = createdByUser; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Set the createdDate value. - * - * @param createdDate the createdDate value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withCreatedDate(DateTime createdDate) { - this.createdDate = createdDate; - return this; - } - - /** - * Get the customImageId value. - * - * @return the customImageId value - */ - public String customImageId() { - return this.customImageId; - } - - /** - * Set the customImageId value. - * - * @param customImageId the customImageId value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withCustomImageId(String customImageId) { - this.customImageId = customImageId; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the size value. - * - * @return the size value - */ - public String size() { - return this.size; - } - - /** - * Set the size value. - * - * @param size the size value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the userName value. - * - * @return the userName value - */ - public String userName() { - return this.userName; - } - - /** - * Set the userName value. - * - * @param userName the userName value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withUserName(String userName) { - this.userName = userName; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the sshKey value. - * - * @return the sshKey value - */ - public String sshKey() { - return this.sshKey; - } - - /** - * Set the sshKey value. - * - * @param sshKey the sshKey value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withSshKey(String sshKey) { - this.sshKey = sshKey; - return this; - } - - /** - * Get the isAuthenticationWithSshKey value. - * - * @return the isAuthenticationWithSshKey value - */ - public Boolean isAuthenticationWithSshKey() { - return this.isAuthenticationWithSshKey; - } - - /** - * Set the isAuthenticationWithSshKey value. - * - * @param isAuthenticationWithSshKey the isAuthenticationWithSshKey value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withIsAuthenticationWithSshKey(Boolean isAuthenticationWithSshKey) { - this.isAuthenticationWithSshKey = isAuthenticationWithSshKey; - return this; - } - - /** - * Get the fqdn value. - * - * @return the fqdn value - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Set the fqdn value. - * - * @param fqdn the fqdn value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withFqdn(String fqdn) { - this.fqdn = fqdn; - return this; - } - - /** - * Get the labSubnetName value. - * - * @return the labSubnetName value - */ - public String labSubnetName() { - return this.labSubnetName; - } - - /** - * Set the labSubnetName value. - * - * @param labSubnetName the labSubnetName value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; - return this; - } - - /** - * Get the labVirtualNetworkId value. - * - * @return the labVirtualNetworkId value - */ - public String labVirtualNetworkId() { - return this.labVirtualNetworkId; - } - - /** - * Set the labVirtualNetworkId value. - * - * @param labVirtualNetworkId the labVirtualNetworkId value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withLabVirtualNetworkId(String labVirtualNetworkId) { - this.labVirtualNetworkId = labVirtualNetworkId; - return this; - } - - /** - * Get the disallowPublicIpAddress value. - * - * @return the disallowPublicIpAddress value - */ - public Boolean disallowPublicIpAddress() { - return this.disallowPublicIpAddress; - } - - /** - * Set the disallowPublicIpAddress value. - * - * @param disallowPublicIpAddress the disallowPublicIpAddress value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withDisallowPublicIpAddress(Boolean disallowPublicIpAddress) { - this.disallowPublicIpAddress = disallowPublicIpAddress; - return this; - } - - /** - * Get the artifacts value. - * - * @return the artifacts value - */ - public List artifacts() { - return this.artifacts; - } - - /** - * Set the artifacts value. - * - * @param artifacts the artifacts value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withArtifacts(List artifacts) { - this.artifacts = artifacts; - return this; - } - - /** - * Get the artifactDeploymentStatus value. - * - * @return the artifactDeploymentStatus value - */ - public ArtifactDeploymentStatusPropertiesFragment artifactDeploymentStatus() { - return this.artifactDeploymentStatus; - } - - /** - * Set the artifactDeploymentStatus value. - * - * @param artifactDeploymentStatus the artifactDeploymentStatus value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withArtifactDeploymentStatus(ArtifactDeploymentStatusPropertiesFragment artifactDeploymentStatus) { - this.artifactDeploymentStatus = artifactDeploymentStatus; - return this; - } - - /** - * Get the galleryImageReference value. - * - * @return the galleryImageReference value - */ - public GalleryImageReferenceFragment galleryImageReference() { - return this.galleryImageReference; - } - - /** - * Set the galleryImageReference value. - * - * @param galleryImageReference the galleryImageReference value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withGalleryImageReference(GalleryImageReferenceFragment galleryImageReference) { - this.galleryImageReference = galleryImageReference; - return this; - } - - /** - * Get the computeVm value. - * - * @return the computeVm value - */ - public ComputeVmPropertiesFragment computeVm() { - return this.computeVm; - } - - /** - * Set the computeVm value. - * - * @param computeVm the computeVm value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withComputeVm(ComputeVmPropertiesFragment computeVm) { - this.computeVm = computeVm; - return this; - } - - /** - * Get the networkInterface value. - * - * @return the networkInterface value - */ - public NetworkInterfacePropertiesFragment networkInterface() { - return this.networkInterface; - } - - /** - * Set the networkInterface value. - * - * @param networkInterface the networkInterface value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withNetworkInterface(NetworkInterfacePropertiesFragment networkInterface) { - this.networkInterface = networkInterface; - return this; - } - - /** - * Get the applicableSchedule value. - * - * @return the applicableSchedule value - */ - public ApplicableScheduleFragmentInner applicableSchedule() { - return this.applicableSchedule; - } - - /** - * Set the applicableSchedule value. - * - * @param applicableSchedule the applicableSchedule value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withApplicableSchedule(ApplicableScheduleFragmentInner applicableSchedule) { - this.applicableSchedule = applicableSchedule; - return this; - } - - /** - * Get the expirationDate value. - * - * @return the expirationDate value - */ - public DateTime expirationDate() { - return this.expirationDate; - } - - /** - * Set the expirationDate value. - * - * @param expirationDate the expirationDate value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withExpirationDate(DateTime expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - /** - * Get the allowClaim value. - * - * @return the allowClaim value - */ - public Boolean allowClaim() { - return this.allowClaim; - } - - /** - * Set the allowClaim value. - * - * @param allowClaim the allowClaim value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withAllowClaim(Boolean allowClaim) { - this.allowClaim = allowClaim; - return this; - } - - /** - * Get the storageType value. - * - * @return the storageType value - */ - public String storageType() { - return this.storageType; - } - - /** - * Set the storageType value. - * - * @param storageType the storageType value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withStorageType(String storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the virtualMachineCreationSource value. - * - * @return the virtualMachineCreationSource value - */ - public VirtualMachineCreationSource virtualMachineCreationSource() { - return this.virtualMachineCreationSource; - } - - /** - * Set the virtualMachineCreationSource value. - * - * @param virtualMachineCreationSource the virtualMachineCreationSource value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withVirtualMachineCreationSource(VirtualMachineCreationSource virtualMachineCreationSource) { - this.virtualMachineCreationSource = virtualMachineCreationSource; - return this; - } - - /** - * Get the environmentId value. - * - * @return the environmentId value - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId value. - * - * @param environmentId the environmentId value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the LabVirtualMachineFragmentInner object itself. - */ - public LabVirtualMachineFragmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineInner.java deleted file mode 100644 index 4439f9aca3f..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabVirtualMachineInner.java +++ /dev/null @@ -1,827 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import org.joda.time.DateTime; -import java.util.List; -import com.microsoft.azure.management.devtestlab.ArtifactDeploymentStatusProperties; -import com.microsoft.azure.management.devtestlab.GalleryImageReference; -import com.microsoft.azure.management.devtestlab.ComputeVmProperties; -import com.microsoft.azure.management.devtestlab.NetworkInterfaceProperties; -import com.microsoft.azure.management.devtestlab.VirtualMachineCreationSource; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A virtual machine. - */ -@JsonFlatten -public class LabVirtualMachineInner extends Resource { - /** - * The notes of the virtual machine. - */ - @JsonProperty(value = "properties.notes") - private String notes; - - /** - * The object identifier of the owner of the virtual machine. - */ - @JsonProperty(value = "properties.ownerObjectId") - private String ownerObjectId; - - /** - * The user principal name of the virtual machine owner. - */ - @JsonProperty(value = "properties.ownerUserPrincipalName") - private String ownerUserPrincipalName; - - /** - * The object identifier of the creator of the virtual machine. - */ - @JsonProperty(value = "properties.createdByUserId") - private String createdByUserId; - - /** - * The email address of creator of the virtual machine. - */ - @JsonProperty(value = "properties.createdByUser") - private String createdByUser; - - /** - * The creation date of the virtual machine. - */ - @JsonProperty(value = "properties.createdDate") - private DateTime createdDate; - - /** - * The resource identifier (Microsoft.Compute) of the virtual machine. - */ - @JsonProperty(value = "properties.computeId", access = JsonProperty.Access.WRITE_ONLY) - private String computeId; - - /** - * The custom image identifier of the virtual machine. - */ - @JsonProperty(value = "properties.customImageId") - private String customImageId; - - /** - * The OS type of the virtual machine. - */ - @JsonProperty(value = "properties.osType") - private String osType; - - /** - * The size of the virtual machine. - */ - @JsonProperty(value = "properties.size") - private String size; - - /** - * The user name of the virtual machine. - */ - @JsonProperty(value = "properties.userName") - private String userName; - - /** - * The password of the virtual machine administrator. - */ - @JsonProperty(value = "properties.password") - private String password; - - /** - * The SSH key of the virtual machine administrator. - */ - @JsonProperty(value = "properties.sshKey") - private String sshKey; - - /** - * Indicates whether this virtual machine uses an SSH key for - * authentication. - */ - @JsonProperty(value = "properties.isAuthenticationWithSshKey") - private Boolean isAuthenticationWithSshKey; - - /** - * The fully-qualified domain name of the virtual machine. - */ - @JsonProperty(value = "properties.fqdn") - private String fqdn; - - /** - * The lab subnet name of the virtual machine. - */ - @JsonProperty(value = "properties.labSubnetName") - private String labSubnetName; - - /** - * The lab virtual network identifier of the virtual machine. - */ - @JsonProperty(value = "properties.labVirtualNetworkId") - private String labVirtualNetworkId; - - /** - * Indicates whether the virtual machine is to be created without a public - * IP address. - */ - @JsonProperty(value = "properties.disallowPublicIpAddress") - private Boolean disallowPublicIpAddress; - - /** - * The artifacts to be installed on the virtual machine. - */ - @JsonProperty(value = "properties.artifacts") - private List artifacts; - - /** - * The artifact deployment status for the virtual machine. - */ - @JsonProperty(value = "properties.artifactDeploymentStatus") - private ArtifactDeploymentStatusProperties artifactDeploymentStatus; - - /** - * The Microsoft Azure Marketplace image reference of the virtual machine. - */ - @JsonProperty(value = "properties.galleryImageReference") - private GalleryImageReference galleryImageReference; - - /** - * The compute virtual machine properties. - */ - @JsonProperty(value = "properties.computeVm") - private ComputeVmProperties computeVm; - - /** - * The network interface properties. - */ - @JsonProperty(value = "properties.networkInterface") - private NetworkInterfaceProperties networkInterface; - - /** - * The applicable schedule for the virtual machine. - */ - @JsonProperty(value = "properties.applicableSchedule") - private ApplicableScheduleInner applicableSchedule; - - /** - * The expiration date for VM. - */ - @JsonProperty(value = "properties.expirationDate") - private DateTime expirationDate; - - /** - * Indicates whether another user can take ownership of the virtual - * machine. - */ - @JsonProperty(value = "properties.allowClaim") - private Boolean allowClaim; - - /** - * Storage type to use for virtual machine (i.e. Standard, Premium). - */ - @JsonProperty(value = "properties.storageType") - private String storageType; - - /** - * Tells source of creation of lab virtual machine. Output property only. - * Possible values include: 'FromCustomImage', 'FromGalleryImage'. - */ - @JsonProperty(value = "properties.virtualMachineCreationSource") - private VirtualMachineCreationSource virtualMachineCreationSource; - - /** - * The resource ID of the environment that contains this virtual machine, - * if any. - */ - @JsonProperty(value = "properties.environmentId") - private String environmentId; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the notes value. - * - * @return the notes value - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes value. - * - * @param notes the notes value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the ownerObjectId value. - * - * @return the ownerObjectId value - */ - public String ownerObjectId() { - return this.ownerObjectId; - } - - /** - * Set the ownerObjectId value. - * - * @param ownerObjectId the ownerObjectId value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withOwnerObjectId(String ownerObjectId) { - this.ownerObjectId = ownerObjectId; - return this; - } - - /** - * Get the ownerUserPrincipalName value. - * - * @return the ownerUserPrincipalName value - */ - public String ownerUserPrincipalName() { - return this.ownerUserPrincipalName; - } - - /** - * Set the ownerUserPrincipalName value. - * - * @param ownerUserPrincipalName the ownerUserPrincipalName value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withOwnerUserPrincipalName(String ownerUserPrincipalName) { - this.ownerUserPrincipalName = ownerUserPrincipalName; - return this; - } - - /** - * Get the createdByUserId value. - * - * @return the createdByUserId value - */ - public String createdByUserId() { - return this.createdByUserId; - } - - /** - * Set the createdByUserId value. - * - * @param createdByUserId the createdByUserId value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withCreatedByUserId(String createdByUserId) { - this.createdByUserId = createdByUserId; - return this; - } - - /** - * Get the createdByUser value. - * - * @return the createdByUser value - */ - public String createdByUser() { - return this.createdByUser; - } - - /** - * Set the createdByUser value. - * - * @param createdByUser the createdByUser value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withCreatedByUser(String createdByUser) { - this.createdByUser = createdByUser; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Set the createdDate value. - * - * @param createdDate the createdDate value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withCreatedDate(DateTime createdDate) { - this.createdDate = createdDate; - return this; - } - - /** - * Get the computeId value. - * - * @return the computeId value - */ - public String computeId() { - return this.computeId; - } - - /** - * Get the customImageId value. - * - * @return the customImageId value - */ - public String customImageId() { - return this.customImageId; - } - - /** - * Set the customImageId value. - * - * @param customImageId the customImageId value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withCustomImageId(String customImageId) { - this.customImageId = customImageId; - return this; - } - - /** - * Get the osType value. - * - * @return the osType value - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType value. - * - * @param osType the osType value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the size value. - * - * @return the size value - */ - public String size() { - return this.size; - } - - /** - * Set the size value. - * - * @param size the size value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the userName value. - * - * @return the userName value - */ - public String userName() { - return this.userName; - } - - /** - * Set the userName value. - * - * @param userName the userName value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withUserName(String userName) { - this.userName = userName; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the sshKey value. - * - * @return the sshKey value - */ - public String sshKey() { - return this.sshKey; - } - - /** - * Set the sshKey value. - * - * @param sshKey the sshKey value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withSshKey(String sshKey) { - this.sshKey = sshKey; - return this; - } - - /** - * Get the isAuthenticationWithSshKey value. - * - * @return the isAuthenticationWithSshKey value - */ - public Boolean isAuthenticationWithSshKey() { - return this.isAuthenticationWithSshKey; - } - - /** - * Set the isAuthenticationWithSshKey value. - * - * @param isAuthenticationWithSshKey the isAuthenticationWithSshKey value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withIsAuthenticationWithSshKey(Boolean isAuthenticationWithSshKey) { - this.isAuthenticationWithSshKey = isAuthenticationWithSshKey; - return this; - } - - /** - * Get the fqdn value. - * - * @return the fqdn value - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Set the fqdn value. - * - * @param fqdn the fqdn value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withFqdn(String fqdn) { - this.fqdn = fqdn; - return this; - } - - /** - * Get the labSubnetName value. - * - * @return the labSubnetName value - */ - public String labSubnetName() { - return this.labSubnetName; - } - - /** - * Set the labSubnetName value. - * - * @param labSubnetName the labSubnetName value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; - return this; - } - - /** - * Get the labVirtualNetworkId value. - * - * @return the labVirtualNetworkId value - */ - public String labVirtualNetworkId() { - return this.labVirtualNetworkId; - } - - /** - * Set the labVirtualNetworkId value. - * - * @param labVirtualNetworkId the labVirtualNetworkId value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withLabVirtualNetworkId(String labVirtualNetworkId) { - this.labVirtualNetworkId = labVirtualNetworkId; - return this; - } - - /** - * Get the disallowPublicIpAddress value. - * - * @return the disallowPublicIpAddress value - */ - public Boolean disallowPublicIpAddress() { - return this.disallowPublicIpAddress; - } - - /** - * Set the disallowPublicIpAddress value. - * - * @param disallowPublicIpAddress the disallowPublicIpAddress value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withDisallowPublicIpAddress(Boolean disallowPublicIpAddress) { - this.disallowPublicIpAddress = disallowPublicIpAddress; - return this; - } - - /** - * Get the artifacts value. - * - * @return the artifacts value - */ - public List artifacts() { - return this.artifacts; - } - - /** - * Set the artifacts value. - * - * @param artifacts the artifacts value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withArtifacts(List artifacts) { - this.artifacts = artifacts; - return this; - } - - /** - * Get the artifactDeploymentStatus value. - * - * @return the artifactDeploymentStatus value - */ - public ArtifactDeploymentStatusProperties artifactDeploymentStatus() { - return this.artifactDeploymentStatus; - } - - /** - * Set the artifactDeploymentStatus value. - * - * @param artifactDeploymentStatus the artifactDeploymentStatus value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withArtifactDeploymentStatus(ArtifactDeploymentStatusProperties artifactDeploymentStatus) { - this.artifactDeploymentStatus = artifactDeploymentStatus; - return this; - } - - /** - * Get the galleryImageReference value. - * - * @return the galleryImageReference value - */ - public GalleryImageReference galleryImageReference() { - return this.galleryImageReference; - } - - /** - * Set the galleryImageReference value. - * - * @param galleryImageReference the galleryImageReference value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withGalleryImageReference(GalleryImageReference galleryImageReference) { - this.galleryImageReference = galleryImageReference; - return this; - } - - /** - * Get the computeVm value. - * - * @return the computeVm value - */ - public ComputeVmProperties computeVm() { - return this.computeVm; - } - - /** - * Set the computeVm value. - * - * @param computeVm the computeVm value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withComputeVm(ComputeVmProperties computeVm) { - this.computeVm = computeVm; - return this; - } - - /** - * Get the networkInterface value. - * - * @return the networkInterface value - */ - public NetworkInterfaceProperties networkInterface() { - return this.networkInterface; - } - - /** - * Set the networkInterface value. - * - * @param networkInterface the networkInterface value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withNetworkInterface(NetworkInterfaceProperties networkInterface) { - this.networkInterface = networkInterface; - return this; - } - - /** - * Get the applicableSchedule value. - * - * @return the applicableSchedule value - */ - public ApplicableScheduleInner applicableSchedule() { - return this.applicableSchedule; - } - - /** - * Set the applicableSchedule value. - * - * @param applicableSchedule the applicableSchedule value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withApplicableSchedule(ApplicableScheduleInner applicableSchedule) { - this.applicableSchedule = applicableSchedule; - return this; - } - - /** - * Get the expirationDate value. - * - * @return the expirationDate value - */ - public DateTime expirationDate() { - return this.expirationDate; - } - - /** - * Set the expirationDate value. - * - * @param expirationDate the expirationDate value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withExpirationDate(DateTime expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - /** - * Get the allowClaim value. - * - * @return the allowClaim value - */ - public Boolean allowClaim() { - return this.allowClaim; - } - - /** - * Set the allowClaim value. - * - * @param allowClaim the allowClaim value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withAllowClaim(Boolean allowClaim) { - this.allowClaim = allowClaim; - return this; - } - - /** - * Get the storageType value. - * - * @return the storageType value - */ - public String storageType() { - return this.storageType; - } - - /** - * Set the storageType value. - * - * @param storageType the storageType value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withStorageType(String storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the virtualMachineCreationSource value. - * - * @return the virtualMachineCreationSource value - */ - public VirtualMachineCreationSource virtualMachineCreationSource() { - return this.virtualMachineCreationSource; - } - - /** - * Set the virtualMachineCreationSource value. - * - * @param virtualMachineCreationSource the virtualMachineCreationSource value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withVirtualMachineCreationSource(VirtualMachineCreationSource virtualMachineCreationSource) { - this.virtualMachineCreationSource = virtualMachineCreationSource; - return this; - } - - /** - * Get the environmentId value. - * - * @return the environmentId value - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId value. - * - * @param environmentId the environmentId value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the LabVirtualMachineInner object itself. - */ - public LabVirtualMachineInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabsInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabsInner.java deleted file mode 100644 index 3a659dc9a59..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/LabsInner.java +++ /dev/null @@ -1,2339 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.devtestlab.GenerateUploadUriParameter; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Labs. - */ -public class LabsInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private LabsService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of LabsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public LabsInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(LabsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Labs to be - * used by Retrofit to perform actually REST calls. - */ - interface LabsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs listBySubscription" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body LabInner lab, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}") - Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body LabInner lab, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body LabFragmentInner lab, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs claimAnyVm" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/claimAnyVm") - Observable> claimAnyVm(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs beginClaimAnyVm" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/claimAnyVm") - Observable> beginClaimAnyVm(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs createEnvironment" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/createEnvironment") - Observable> createEnvironment(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs beginCreateEnvironment" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/createEnvironment") - Observable> beginCreateEnvironment(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs exportResourceUsage" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/exportResourceUsage") - Observable> exportResourceUsage(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body ExportResourceUsageParametersInner exportResourceUsageParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs beginExportResourceUsage" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/exportResourceUsage") - Observable> beginExportResourceUsage(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body ExportResourceUsageParametersInner exportResourceUsageParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs generateUploadUri" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/generateUploadUri") - Observable> generateUploadUri(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body GenerateUploadUriParameter generateUploadUriParameter, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs listVhds" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds") - Observable> listVhds(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs listBySubscriptionNext" }) - @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Labs listVhdsNext" }) - @GET - Observable> listVhdsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List labs in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabInner> object if successful. - */ - public PagedList listBySubscription() { - ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List labs in a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List labs in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List labs in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync() { - return listBySubscriptionSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List labs in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.listBySubscription(this.client.subscriptionId(), expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List labs in a subscription. - * - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabInner> object if successful. - */ - public PagedList listBySubscription(final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listBySubscriptionSinglePageAsync(expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List labs in a subscription. - * - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List labs in a subscription. - * - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable> listBySubscriptionAsync(final String expand, final String filter, final Integer top, final String orderby) { - return listBySubscriptionWithServiceResponseAsync(expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List labs in a subscription. - * - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync(final String expand, final String filter, final Integer top, final String orderby) { - return listBySubscriptionSinglePageAsync(expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List labs in a subscription. - * - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync(final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscription(this.client.subscriptionId(), expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List labs in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby) { - return listByResourceGroupSinglePageAsync(resourceGroupName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List labs in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabInner object if successful. - */ - public LabInner getByResourceGroup(String resourceGroupName, String name) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Get lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Get lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String name) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, LabInner>() { - @Override - public LabInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabInner object if successful. - */ - public LabInner getByResourceGroup(String resourceGroupName, String name, String expand) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand).toBlocking().single().body(); - } - - /** - * Get lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand), serviceCallback); - } - - /** - * Get lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String name, String expand) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand).map(new Func1, LabInner>() { - @Override - public LabInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabInner object if successful. - */ - public LabInner createOrUpdate(String resourceGroupName, String name, LabInner lab) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, lab).toBlocking().last().body(); - } - - /** - * Create or replace an existing lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, LabInner lab, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, lab), serviceCallback); - } - - /** - * Create or replace an existing lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String name, LabInner lab) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, lab).map(new Func1, LabInner>() { - @Override - public LabInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, LabInner lab) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (lab == null) { - throw new IllegalArgumentException("Parameter lab is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(lab); - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, name, lab, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or replace an existing lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabInner object if successful. - */ - public LabInner beginCreateOrUpdate(String resourceGroupName, String name, LabInner lab) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, lab).toBlocking().single().body(); - } - - /** - * Create or replace an existing lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String name, LabInner lab, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, lab), serviceCallback); - } - - /** - * Create or replace an existing lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, LabInner lab) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, lab).map(new Func1, LabInner>() { - @Override - public LabInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, LabInner lab) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (lab == null) { - throw new IllegalArgumentException("Parameter lab is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(lab); - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, name, lab, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().body(); - } - - /** - * Delete lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Delete lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String name) { - beginDeleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Delete lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Delete lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String name) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of labs. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabInner object if successful. - */ - public LabInner update(String resourceGroupName, String name, LabFragmentInner lab) { - return updateWithServiceResponseAsync(resourceGroupName, name, lab).toBlocking().single().body(); - } - - /** - * Modify properties of labs. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String name, LabFragmentInner lab, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, lab), serviceCallback); - } - - /** - * Modify properties of labs. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabInner object - */ - public Observable updateAsync(String resourceGroupName, String name, LabFragmentInner lab) { - return updateWithServiceResponseAsync(resourceGroupName, name, lab).map(new Func1, LabInner>() { - @Override - public LabInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of labs. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param lab A lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, LabFragmentInner lab) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (lab == null) { - throw new IllegalArgumentException("Parameter lab is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(lab); - return service.update(this.client.subscriptionId(), resourceGroupName, name, lab, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void claimAnyVm(String resourceGroupName, String name) { - claimAnyVmWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().body(); - } - - /** - * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture claimAnyVmAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(claimAnyVmWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable claimAnyVmAsync(String resourceGroupName, String name) { - return claimAnyVmWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> claimAnyVmWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.claimAnyVm(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginClaimAnyVm(String resourceGroupName, String name) { - beginClaimAnyVmWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginClaimAnyVmAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginClaimAnyVmWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginClaimAnyVmAsync(String resourceGroupName, String name) { - return beginClaimAnyVmWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginClaimAnyVmWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginClaimAnyVm(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginClaimAnyVmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginClaimAnyVmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create virtual machines in a lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param labVirtualMachineCreationParameter Properties for creating a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void createEnvironment(String resourceGroupName, String name, LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter) { - createEnvironmentWithServiceResponseAsync(resourceGroupName, name, labVirtualMachineCreationParameter).toBlocking().last().body(); - } - - /** - * Create virtual machines in a lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param labVirtualMachineCreationParameter Properties for creating a virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createEnvironmentAsync(String resourceGroupName, String name, LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createEnvironmentWithServiceResponseAsync(resourceGroupName, name, labVirtualMachineCreationParameter), serviceCallback); - } - - /** - * Create virtual machines in a lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param labVirtualMachineCreationParameter Properties for creating a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createEnvironmentAsync(String resourceGroupName, String name, LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter) { - return createEnvironmentWithServiceResponseAsync(resourceGroupName, name, labVirtualMachineCreationParameter).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create virtual machines in a lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param labVirtualMachineCreationParameter Properties for creating a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (labVirtualMachineCreationParameter == null) { - throw new IllegalArgumentException("Parameter labVirtualMachineCreationParameter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(labVirtualMachineCreationParameter); - Observable> observable = service.createEnvironment(this.client.subscriptionId(), resourceGroupName, name, labVirtualMachineCreationParameter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create virtual machines in a lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param labVirtualMachineCreationParameter Properties for creating a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginCreateEnvironment(String resourceGroupName, String name, LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter) { - beginCreateEnvironmentWithServiceResponseAsync(resourceGroupName, name, labVirtualMachineCreationParameter).toBlocking().single().body(); - } - - /** - * Create virtual machines in a lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param labVirtualMachineCreationParameter Properties for creating a virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateEnvironmentAsync(String resourceGroupName, String name, LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateEnvironmentWithServiceResponseAsync(resourceGroupName, name, labVirtualMachineCreationParameter), serviceCallback); - } - - /** - * Create virtual machines in a lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param labVirtualMachineCreationParameter Properties for creating a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginCreateEnvironmentAsync(String resourceGroupName, String name, LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter) { - return beginCreateEnvironmentWithServiceResponseAsync(resourceGroupName, name, labVirtualMachineCreationParameter).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create virtual machines in a lab. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param labVirtualMachineCreationParameter Properties for creating a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginCreateEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (labVirtualMachineCreationParameter == null) { - throw new IllegalArgumentException("Parameter labVirtualMachineCreationParameter is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(labVirtualMachineCreationParameter); - return service.beginCreateEnvironment(this.client.subscriptionId(), resourceGroupName, name, labVirtualMachineCreationParameter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateEnvironmentDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Exports the lab resource usage into a storage account This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param exportResourceUsageParameters The parameters of the export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void exportResourceUsage(String resourceGroupName, String name, ExportResourceUsageParametersInner exportResourceUsageParameters) { - exportResourceUsageWithServiceResponseAsync(resourceGroupName, name, exportResourceUsageParameters).toBlocking().last().body(); - } - - /** - * Exports the lab resource usage into a storage account This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param exportResourceUsageParameters The parameters of the export operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture exportResourceUsageAsync(String resourceGroupName, String name, ExportResourceUsageParametersInner exportResourceUsageParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(exportResourceUsageWithServiceResponseAsync(resourceGroupName, name, exportResourceUsageParameters), serviceCallback); - } - - /** - * Exports the lab resource usage into a storage account This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param exportResourceUsageParameters The parameters of the export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable exportResourceUsageAsync(String resourceGroupName, String name, ExportResourceUsageParametersInner exportResourceUsageParameters) { - return exportResourceUsageWithServiceResponseAsync(resourceGroupName, name, exportResourceUsageParameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Exports the lab resource usage into a storage account This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param exportResourceUsageParameters The parameters of the export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> exportResourceUsageWithServiceResponseAsync(String resourceGroupName, String name, ExportResourceUsageParametersInner exportResourceUsageParameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (exportResourceUsageParameters == null) { - throw new IllegalArgumentException("Parameter exportResourceUsageParameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(exportResourceUsageParameters); - Observable> observable = service.exportResourceUsage(this.client.subscriptionId(), resourceGroupName, name, exportResourceUsageParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Exports the lab resource usage into a storage account This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param exportResourceUsageParameters The parameters of the export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginExportResourceUsage(String resourceGroupName, String name, ExportResourceUsageParametersInner exportResourceUsageParameters) { - beginExportResourceUsageWithServiceResponseAsync(resourceGroupName, name, exportResourceUsageParameters).toBlocking().single().body(); - } - - /** - * Exports the lab resource usage into a storage account This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param exportResourceUsageParameters The parameters of the export operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginExportResourceUsageAsync(String resourceGroupName, String name, ExportResourceUsageParametersInner exportResourceUsageParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginExportResourceUsageWithServiceResponseAsync(resourceGroupName, name, exportResourceUsageParameters), serviceCallback); - } - - /** - * Exports the lab resource usage into a storage account This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param exportResourceUsageParameters The parameters of the export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginExportResourceUsageAsync(String resourceGroupName, String name, ExportResourceUsageParametersInner exportResourceUsageParameters) { - return beginExportResourceUsageWithServiceResponseAsync(resourceGroupName, name, exportResourceUsageParameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Exports the lab resource usage into a storage account This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param exportResourceUsageParameters The parameters of the export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginExportResourceUsageWithServiceResponseAsync(String resourceGroupName, String name, ExportResourceUsageParametersInner exportResourceUsageParameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (exportResourceUsageParameters == null) { - throw new IllegalArgumentException("Parameter exportResourceUsageParameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(exportResourceUsageParameters); - return service.beginExportResourceUsage(this.client.subscriptionId(), resourceGroupName, name, exportResourceUsageParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginExportResourceUsageDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginExportResourceUsageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Generate a URI for uploading custom disk images to a Lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the GenerateUploadUriResponseInner object if successful. - */ - public GenerateUploadUriResponseInner generateUploadUri(String resourceGroupName, String name) { - return generateUploadUriWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Generate a URI for uploading custom disk images to a Lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture generateUploadUriAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generateUploadUriWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Generate a URI for uploading custom disk images to a Lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GenerateUploadUriResponseInner object - */ - public Observable generateUploadUriAsync(String resourceGroupName, String name) { - return generateUploadUriWithServiceResponseAsync(resourceGroupName, name).map(new Func1, GenerateUploadUriResponseInner>() { - @Override - public GenerateUploadUriResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Generate a URI for uploading custom disk images to a Lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GenerateUploadUriResponseInner object - */ - public Observable> generateUploadUriWithServiceResponseAsync(String resourceGroupName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String blobName = null; - GenerateUploadUriParameter generateUploadUriParameter = new GenerateUploadUriParameter(); - generateUploadUriParameter.withBlobName(null); - return service.generateUploadUri(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), generateUploadUriParameter, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = generateUploadUriDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Generate a URI for uploading custom disk images to a Lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param blobName The blob name of the upload URI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the GenerateUploadUriResponseInner object if successful. - */ - public GenerateUploadUriResponseInner generateUploadUri(String resourceGroupName, String name, String blobName) { - return generateUploadUriWithServiceResponseAsync(resourceGroupName, name, blobName).toBlocking().single().body(); - } - - /** - * Generate a URI for uploading custom disk images to a Lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param blobName The blob name of the upload URI. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture generateUploadUriAsync(String resourceGroupName, String name, String blobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generateUploadUriWithServiceResponseAsync(resourceGroupName, name, blobName), serviceCallback); - } - - /** - * Generate a URI for uploading custom disk images to a Lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param blobName The blob name of the upload URI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GenerateUploadUriResponseInner object - */ - public Observable generateUploadUriAsync(String resourceGroupName, String name, String blobName) { - return generateUploadUriWithServiceResponseAsync(resourceGroupName, name, blobName).map(new Func1, GenerateUploadUriResponseInner>() { - @Override - public GenerateUploadUriResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Generate a URI for uploading custom disk images to a Lab. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param blobName The blob name of the upload URI. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GenerateUploadUriResponseInner object - */ - public Observable> generateUploadUriWithServiceResponseAsync(String resourceGroupName, String name, String blobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - GenerateUploadUriParameter generateUploadUriParameter = new GenerateUploadUriParameter(); - generateUploadUriParameter.withBlobName(blobName); - return service.generateUploadUri(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), generateUploadUriParameter, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = generateUploadUriDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse generateUploadUriDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List disk images available for custom image creation. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabVhdInner> object if successful. - */ - public PagedList listVhds(final String resourceGroupName, final String name) { - ServiceResponse> response = listVhdsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listVhdsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List disk images available for custom image creation. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listVhdsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listVhdsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listVhdsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List disk images available for custom image creation. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVhdInner> object - */ - public Observable> listVhdsAsync(final String resourceGroupName, final String name) { - return listVhdsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List disk images available for custom image creation. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVhdInner> object - */ - public Observable>> listVhdsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return listVhdsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listVhdsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List disk images available for custom image creation. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param name The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabVhdInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listVhdsSinglePageAsync(final String resourceGroupName, final String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listVhds(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listVhdsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listVhdsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List labs in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabInner> object if successful. - */ - public PagedList listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List labs in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List labs in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List labs in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List labs in a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List labs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List labs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List labs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List labs in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List labs in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List disk images available for custom image creation. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabVhdInner> object if successful. - */ - public PagedList listVhdsNext(final String nextPageLink) { - ServiceResponse> response = listVhdsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listVhdsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List disk images available for custom image creation. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listVhdsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listVhdsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listVhdsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List disk images available for custom image creation. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVhdInner> object - */ - public Observable> listVhdsNextAsync(final String nextPageLink) { - return listVhdsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List disk images available for custom image creation. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVhdInner> object - */ - public Observable>> listVhdsNextWithServiceResponseAsync(final String nextPageLink) { - return listVhdsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listVhdsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List disk images available for custom image creation. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabVhdInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listVhdsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listVhdsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listVhdsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listVhdsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelFragmentInner.java deleted file mode 100644 index ef569c1bdc7..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelFragmentInner.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.EventFragment; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A notification. - */ -@JsonFlatten -public class NotificationChannelFragmentInner extends Resource { - /** - * The webhook URL to send notifications to. - */ - @JsonProperty(value = "properties.webHookUrl") - private String webHookUrl; - - /** - * Description of notification. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The list of event for which this notification is enabled. - */ - @JsonProperty(value = "properties.events") - private List events; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the webHookUrl value. - * - * @return the webHookUrl value - */ - public String webHookUrl() { - return this.webHookUrl; - } - - /** - * Set the webHookUrl value. - * - * @param webHookUrl the webHookUrl value to set - * @return the NotificationChannelFragmentInner object itself. - */ - public NotificationChannelFragmentInner withWebHookUrl(String webHookUrl) { - this.webHookUrl = webHookUrl; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the NotificationChannelFragmentInner object itself. - */ - public NotificationChannelFragmentInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the events value. - * - * @return the events value - */ - public List events() { - return this.events; - } - - /** - * Set the events value. - * - * @param events the events value to set - * @return the NotificationChannelFragmentInner object itself. - */ - public NotificationChannelFragmentInner withEvents(List events) { - this.events = events; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the NotificationChannelFragmentInner object itself. - */ - public NotificationChannelFragmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the NotificationChannelFragmentInner object itself. - */ - public NotificationChannelFragmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelInner.java deleted file mode 100644 index 6a1815f7094..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelInner.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.Event; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A notification. - */ -@JsonFlatten -public class NotificationChannelInner extends Resource { - /** - * The webhook URL to send notifications to. - */ - @JsonProperty(value = "properties.webHookUrl") - private String webHookUrl; - - /** - * Description of notification. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The list of event for which this notification is enabled. - */ - @JsonProperty(value = "properties.events") - private List events; - - /** - * The creation date of the notification channel. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the webHookUrl value. - * - * @return the webHookUrl value - */ - public String webHookUrl() { - return this.webHookUrl; - } - - /** - * Set the webHookUrl value. - * - * @param webHookUrl the webHookUrl value to set - * @return the NotificationChannelInner object itself. - */ - public NotificationChannelInner withWebHookUrl(String webHookUrl) { - this.webHookUrl = webHookUrl; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the NotificationChannelInner object itself. - */ - public NotificationChannelInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the events value. - * - * @return the events value - */ - public List events() { - return this.events; - } - - /** - * Set the events value. - * - * @param events the events value to set - * @return the NotificationChannelInner object itself. - */ - public NotificationChannelInner withEvents(List events) { - this.events = events; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the NotificationChannelInner object itself. - */ - public NotificationChannelInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the NotificationChannelInner object itself. - */ - public NotificationChannelInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelsInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelsInner.java deleted file mode 100644 index 134290796fc..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotificationChannelsInner.java +++ /dev/null @@ -1,1050 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in NotificationChannels. - */ -public class NotificationChannelsInner { - /** The Retrofit service to perform REST calls. */ - private NotificationChannelsService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of NotificationChannelsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NotificationChannelsInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(NotificationChannelsService.class); - this.client = client; - } - - /** - * The interface defining all the services for NotificationChannels to be - * used by Retrofit to perform actually REST calls. - */ - interface NotificationChannelsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.NotificationChannels list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.NotificationChannels get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.NotificationChannels createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body NotificationChannelInner notificationChannel, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.NotificationChannels delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.NotificationChannels update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body NotificationChannelFragmentInner notificationChannel, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.NotificationChannels notify" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}/notify") - Observable> notify(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body NotifyParametersInner notifyParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.NotificationChannels listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NotificationChannelInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationChannelInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationChannelInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NotificationChannelInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NotificationChannelInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationChannelInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List notificationchannels in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationChannelInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List notificationchannels in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NotificationChannelInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationChannelInner object if successful. - */ - public NotificationChannelInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationChannelInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, NotificationChannelInner>() { - @Override - public NotificationChannelInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationChannelInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationChannelInner object if successful. - */ - public NotificationChannelInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationChannelInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, NotificationChannelInner>() { - @Override - public NotificationChannelInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param expand Specify the $expand query. Example: 'properties($select=webHookUrl)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationChannelInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing notificationChannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notificationChannel A notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationChannelInner object if successful. - */ - public NotificationChannelInner createOrUpdate(String resourceGroupName, String labName, String name, NotificationChannelInner notificationChannel) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, notificationChannel).toBlocking().single().body(); - } - - /** - * Create or replace an existing notificationChannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notificationChannel A notification. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, NotificationChannelInner notificationChannel, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, notificationChannel), serviceCallback); - } - - /** - * Create or replace an existing notificationChannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notificationChannel A notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationChannelInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, NotificationChannelInner notificationChannel) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, notificationChannel).map(new Func1, NotificationChannelInner>() { - @Override - public NotificationChannelInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing notificationChannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notificationChannel A notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationChannelInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, NotificationChannelInner notificationChannel) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (notificationChannel == null) { - throw new IllegalArgumentException("Parameter notificationChannel is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(notificationChannel); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, notificationChannel, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete notificationchannel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of notificationchannels. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notificationChannel A notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationChannelInner object if successful. - */ - public NotificationChannelInner update(String resourceGroupName, String labName, String name, NotificationChannelFragmentInner notificationChannel) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, notificationChannel).toBlocking().single().body(); - } - - /** - * Modify properties of notificationchannels. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notificationChannel A notification. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String labName, String name, NotificationChannelFragmentInner notificationChannel, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, labName, name, notificationChannel), serviceCallback); - } - - /** - * Modify properties of notificationchannels. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notificationChannel A notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationChannelInner object - */ - public Observable updateAsync(String resourceGroupName, String labName, String name, NotificationChannelFragmentInner notificationChannel) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, notificationChannel).map(new Func1, NotificationChannelInner>() { - @Override - public NotificationChannelInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of notificationchannels. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notificationChannel A notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationChannelInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String labName, String name, NotificationChannelFragmentInner notificationChannel) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (notificationChannel == null) { - throw new IllegalArgumentException("Parameter notificationChannel is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(notificationChannel); - return service.update(this.client.subscriptionId(), resourceGroupName, labName, name, notificationChannel, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Send notification to provided channel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notifyParameters Properties for generating a Notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void notify(String resourceGroupName, String labName, String name, NotifyParametersInner notifyParameters) { - notifyWithServiceResponseAsync(resourceGroupName, labName, name, notifyParameters).toBlocking().single().body(); - } - - /** - * Send notification to provided channel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notifyParameters Properties for generating a Notification. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture notifyAsync(String resourceGroupName, String labName, String name, NotifyParametersInner notifyParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(notifyWithServiceResponseAsync(resourceGroupName, labName, name, notifyParameters), serviceCallback); - } - - /** - * Send notification to provided channel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notifyParameters Properties for generating a Notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable notifyAsync(String resourceGroupName, String labName, String name, NotifyParametersInner notifyParameters) { - return notifyWithServiceResponseAsync(resourceGroupName, labName, name, notifyParameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Send notification to provided channel. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the notificationChannel. - * @param notifyParameters Properties for generating a Notification. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> notifyWithServiceResponseAsync(String resourceGroupName, String labName, String name, NotifyParametersInner notifyParameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (notifyParameters == null) { - throw new IllegalArgumentException("Parameter notifyParameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(notifyParameters); - return service.notify(this.client.subscriptionId(), resourceGroupName, labName, name, notifyParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = notifyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse notifyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List notificationchannels in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NotificationChannelInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List notificationchannels in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List notificationchannels in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationChannelInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List notificationchannels in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationChannelInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List notificationchannels in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NotificationChannelInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotifyParametersInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotifyParametersInner.java deleted file mode 100644 index f75ea12b469..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/NotifyParametersInner.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.NotificationChannelEventType; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties for generating a Notification. - */ -public class NotifyParametersInner { - /** - * The type of event (i.e. AutoShutdown, Cost). Possible values include: - * 'AutoShutdown', 'Cost'. - */ - @JsonProperty(value = "eventName") - private NotificationChannelEventType eventName; - - /** - * Properties for the notification in json format. - */ - @JsonProperty(value = "jsonPayload") - private String jsonPayload; - - /** - * Get the eventName value. - * - * @return the eventName value - */ - public NotificationChannelEventType eventName() { - return this.eventName; - } - - /** - * Set the eventName value. - * - * @param eventName the eventName value to set - * @return the NotifyParametersInner object itself. - */ - public NotifyParametersInner withEventName(NotificationChannelEventType eventName) { - this.eventName = eventName; - return this; - } - - /** - * Get the jsonPayload value. - * - * @return the jsonPayload value - */ - public String jsonPayload() { - return this.jsonPayload; - } - - /** - * Set the jsonPayload value. - * - * @param jsonPayload the jsonPayload value to set - * @return the NotifyParametersInner object itself. - */ - public NotifyParametersInner withJsonPayload(String jsonPayload) { - this.jsonPayload = jsonPayload; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PageImpl.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PageImpl.java deleted file mode 100644 index 15a7e3e73ac..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PoliciesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PoliciesInner.java deleted file mode 100644 index 07ffe8af242..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PoliciesInner.java +++ /dev/null @@ -1,996 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Policies. - */ -public class PoliciesInner { - /** The Retrofit service to perform REST calls. */ - private PoliciesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of PoliciesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public PoliciesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(PoliciesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Policies to be - * used by Retrofit to perform actually REST calls. - */ - interface PoliciesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Policies list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("policySetName") String policySetName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Policies get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("policySetName") String policySetName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Policies createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("policySetName") String policySetName, @Path("name") String name, @Body PolicyInner policy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Policies delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("policySetName") String policySetName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Policies update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("policySetName") String policySetName, @Path("name") String name, @Body PolicyFragmentInner policy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Policies listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<PolicyInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String policySetName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, policySetName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String policySetName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, policySetName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PolicyInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String policySetName) { - return listWithServiceResponseAsync(resourceGroupName, labName, policySetName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PolicyInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String policySetName) { - return listSinglePageAsync(resourceGroupName, labName, policySetName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<PolicyInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String policySetName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (policySetName == null) { - throw new IllegalArgumentException("Parameter policySetName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, policySetName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<PolicyInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String policySetName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, policySetName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String policySetName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, policySetName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PolicyInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String policySetName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, policySetName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List policies in a given policy set. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PolicyInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String policySetName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, policySetName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List policies in a given policy set. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param policySetName The name of the policy set. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=description)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<PolicyInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String policySetName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (policySetName == null) { - throw new IllegalArgumentException("Parameter policySetName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, policySetName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyInner object if successful. - */ - public PolicyInner get(String resourceGroupName, String labName, String policySetName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, policySetName, name).toBlocking().single().body(); - } - - /** - * Get policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String policySetName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, policySetName, name), serviceCallback); - } - - /** - * Get policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String policySetName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, policySetName, name).map(new Func1, PolicyInner>() { - @Override - public PolicyInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String policySetName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (policySetName == null) { - throw new IllegalArgumentException("Parameter policySetName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, policySetName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyInner object if successful. - */ - public PolicyInner get(String resourceGroupName, String labName, String policySetName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, expand).toBlocking().single().body(); - } - - /** - * Get policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String policySetName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, expand), serviceCallback); - } - - /** - * Get policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String policySetName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, expand).map(new Func1, PolicyInner>() { - @Override - public PolicyInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param expand Specify the $expand query. Example: 'properties($select=description)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String policySetName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (policySetName == null) { - throw new IllegalArgumentException("Parameter policySetName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, policySetName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param policy A Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyInner object if successful. - */ - public PolicyInner createOrUpdate(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, policy).toBlocking().single().body(); - } - - /** - * Create or replace an existing policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param policy A Policy. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, policy), serviceCallback); - } - - /** - * Create or replace an existing policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param policy A Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, policy).map(new Func1, PolicyInner>() { - @Override - public PolicyInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param policy A Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (policySetName == null) { - throw new IllegalArgumentException("Parameter policySetName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (policy == null) { - throw new IllegalArgumentException("Parameter policy is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(policy); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, policySetName, name, policy, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String policySetName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, policySetName, name).toBlocking().single().body(); - } - - /** - * Delete policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String policySetName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, policySetName, name), serviceCallback); - } - - /** - * Delete policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String labName, String policySetName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, policySetName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String policySetName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (policySetName == null) { - throw new IllegalArgumentException("Parameter policySetName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, labName, policySetName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of policies. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param policy A Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PolicyInner object if successful. - */ - public PolicyInner update(String resourceGroupName, String labName, String policySetName, String name, PolicyFragmentInner policy) { - return updateWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, policy).toBlocking().single().body(); - } - - /** - * Modify properties of policies. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param policy A Policy. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String labName, String policySetName, String name, PolicyFragmentInner policy, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, policy), serviceCallback); - } - - /** - * Modify properties of policies. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param policy A Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyInner object - */ - public Observable updateAsync(String resourceGroupName, String labName, String policySetName, String name, PolicyFragmentInner policy) { - return updateWithServiceResponseAsync(resourceGroupName, labName, policySetName, name, policy).map(new Func1, PolicyInner>() { - @Override - public PolicyInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of policies. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param policySetName The name of the policy set. - * @param name The name of the policy. - * @param policy A Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PolicyInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String labName, String policySetName, String name, PolicyFragmentInner policy) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (policySetName == null) { - throw new IllegalArgumentException("Parameter policySetName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (policy == null) { - throw new IllegalArgumentException("Parameter policy is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(policy); - return service.update(this.client.subscriptionId(), resourceGroupName, labName, policySetName, name, policy, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List policies in a given policy set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<PolicyInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List policies in a given policy set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List policies in a given policy set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PolicyInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List policies in a given policy set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<PolicyInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List policies in a given policy set. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<PolicyInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicyFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicyFragmentInner.java deleted file mode 100644 index 9e3e5077b60..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicyFragmentInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.PolicyStatus; -import com.microsoft.azure.management.devtestlab.PolicyFactName; -import com.microsoft.azure.management.devtestlab.PolicyEvaluatorType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A Policy. - */ -@JsonFlatten -public class PolicyFragmentInner extends Resource { - /** - * The description of the policy. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The status of the policy. Possible values include: 'Enabled', - * 'Disabled'. - */ - @JsonProperty(value = "properties.status") - private PolicyStatus status; - - /** - * The fact name of the policy (e.g. LabVmCount, LabVmSize, - * MaxVmsAllowedPerLab, etc. Possible values include: - * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', - * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost'. - */ - @JsonProperty(value = "properties.factName") - private PolicyFactName factName; - - /** - * The fact data of the policy. - */ - @JsonProperty(value = "properties.factData") - private String factData; - - /** - * The threshold of the policy (i.e. a number for MaxValuePolicy, and a - * JSON array of values for AllowedValuesPolicy). - */ - @JsonProperty(value = "properties.threshold") - private String threshold; - - /** - * The evaluator type of the policy (i.e. AllowedValuesPolicy, - * MaxValuePolicy). Possible values include: 'AllowedValuesPolicy', - * 'MaxValuePolicy'. - */ - @JsonProperty(value = "properties.evaluatorType") - private PolicyEvaluatorType evaluatorType; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the PolicyFragmentInner object itself. - */ - public PolicyFragmentInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public PolicyStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the PolicyFragmentInner object itself. - */ - public PolicyFragmentInner withStatus(PolicyStatus status) { - this.status = status; - return this; - } - - /** - * Get the factName value. - * - * @return the factName value - */ - public PolicyFactName factName() { - return this.factName; - } - - /** - * Set the factName value. - * - * @param factName the factName value to set - * @return the PolicyFragmentInner object itself. - */ - public PolicyFragmentInner withFactName(PolicyFactName factName) { - this.factName = factName; - return this; - } - - /** - * Get the factData value. - * - * @return the factData value - */ - public String factData() { - return this.factData; - } - - /** - * Set the factData value. - * - * @param factData the factData value to set - * @return the PolicyFragmentInner object itself. - */ - public PolicyFragmentInner withFactData(String factData) { - this.factData = factData; - return this; - } - - /** - * Get the threshold value. - * - * @return the threshold value - */ - public String threshold() { - return this.threshold; - } - - /** - * Set the threshold value. - * - * @param threshold the threshold value to set - * @return the PolicyFragmentInner object itself. - */ - public PolicyFragmentInner withThreshold(String threshold) { - this.threshold = threshold; - return this; - } - - /** - * Get the evaluatorType value. - * - * @return the evaluatorType value - */ - public PolicyEvaluatorType evaluatorType() { - return this.evaluatorType; - } - - /** - * Set the evaluatorType value. - * - * @param evaluatorType the evaluatorType value to set - * @return the PolicyFragmentInner object itself. - */ - public PolicyFragmentInner withEvaluatorType(PolicyEvaluatorType evaluatorType) { - this.evaluatorType = evaluatorType; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the PolicyFragmentInner object itself. - */ - public PolicyFragmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the PolicyFragmentInner object itself. - */ - public PolicyFragmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicyInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicyInner.java deleted file mode 100644 index 93525834bf8..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicyInner.java +++ /dev/null @@ -1,255 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.PolicyStatus; -import com.microsoft.azure.management.devtestlab.PolicyFactName; -import com.microsoft.azure.management.devtestlab.PolicyEvaluatorType; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A Policy. - */ -@JsonFlatten -public class PolicyInner extends Resource { - /** - * The description of the policy. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The status of the policy. Possible values include: 'Enabled', - * 'Disabled'. - */ - @JsonProperty(value = "properties.status") - private PolicyStatus status; - - /** - * The fact name of the policy (e.g. LabVmCount, LabVmSize, - * MaxVmsAllowedPerLab, etc. Possible values include: - * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', - * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', - * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost'. - */ - @JsonProperty(value = "properties.factName") - private PolicyFactName factName; - - /** - * The fact data of the policy. - */ - @JsonProperty(value = "properties.factData") - private String factData; - - /** - * The threshold of the policy (i.e. a number for MaxValuePolicy, and a - * JSON array of values for AllowedValuesPolicy). - */ - @JsonProperty(value = "properties.threshold") - private String threshold; - - /** - * The evaluator type of the policy (i.e. AllowedValuesPolicy, - * MaxValuePolicy). Possible values include: 'AllowedValuesPolicy', - * 'MaxValuePolicy'. - */ - @JsonProperty(value = "properties.evaluatorType") - private PolicyEvaluatorType evaluatorType; - - /** - * The creation date of the policy. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the PolicyInner object itself. - */ - public PolicyInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public PolicyStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the PolicyInner object itself. - */ - public PolicyInner withStatus(PolicyStatus status) { - this.status = status; - return this; - } - - /** - * Get the factName value. - * - * @return the factName value - */ - public PolicyFactName factName() { - return this.factName; - } - - /** - * Set the factName value. - * - * @param factName the factName value to set - * @return the PolicyInner object itself. - */ - public PolicyInner withFactName(PolicyFactName factName) { - this.factName = factName; - return this; - } - - /** - * Get the factData value. - * - * @return the factData value - */ - public String factData() { - return this.factData; - } - - /** - * Set the factData value. - * - * @param factData the factData value to set - * @return the PolicyInner object itself. - */ - public PolicyInner withFactData(String factData) { - this.factData = factData; - return this; - } - - /** - * Get the threshold value. - * - * @return the threshold value - */ - public String threshold() { - return this.threshold; - } - - /** - * Set the threshold value. - * - * @param threshold the threshold value to set - * @return the PolicyInner object itself. - */ - public PolicyInner withThreshold(String threshold) { - this.threshold = threshold; - return this; - } - - /** - * Get the evaluatorType value. - * - * @return the evaluatorType value - */ - public PolicyEvaluatorType evaluatorType() { - return this.evaluatorType; - } - - /** - * Set the evaluatorType value. - * - * @param evaluatorType the evaluatorType value to set - * @return the PolicyInner object itself. - */ - public PolicyInner withEvaluatorType(PolicyEvaluatorType evaluatorType) { - this.evaluatorType = evaluatorType; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the PolicyInner object itself. - */ - public PolicyInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the PolicyInner object itself. - */ - public PolicyInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicySetsInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicySetsInner.java deleted file mode 100644 index 7392ae58026..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/PolicySetsInner.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.devtestlab.EvaluatePoliciesRequest; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in PolicySets. - */ -public class PolicySetsInner { - /** The Retrofit service to perform REST calls. */ - private PolicySetsService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of PolicySetsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public PolicySetsInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(PolicySetsService.class); - this.client = client; - } - - /** - * The interface defining all the services for PolicySets to be - * used by Retrofit to perform actually REST calls. - */ - interface PolicySetsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.PolicySets evaluatePolicies" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{name}/evaluatePolicies") - Observable> evaluatePolicies(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body EvaluatePoliciesRequest evaluatePoliciesRequest, @Header("User-Agent") String userAgent); - - } - - /** - * Evaluates lab policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the policy set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the EvaluatePoliciesResponseInner object if successful. - */ - public EvaluatePoliciesResponseInner evaluatePolicies(String resourceGroupName, String labName, String name) { - return evaluatePoliciesWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Evaluates lab policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the policy set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture evaluatePoliciesAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(evaluatePoliciesWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Evaluates lab policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the policy set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EvaluatePoliciesResponseInner object - */ - public Observable evaluatePoliciesAsync(String resourceGroupName, String labName, String name) { - return evaluatePoliciesWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, EvaluatePoliciesResponseInner>() { - @Override - public EvaluatePoliciesResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Evaluates lab policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the policy set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EvaluatePoliciesResponseInner object - */ - public Observable> evaluatePoliciesWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final List policies = null; - EvaluatePoliciesRequest evaluatePoliciesRequest = new EvaluatePoliciesRequest(); - evaluatePoliciesRequest.withPolicies(null); - return service.evaluatePolicies(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), evaluatePoliciesRequest, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = evaluatePoliciesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Evaluates lab policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the policy set. - * @param policies Policies to evaluate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the EvaluatePoliciesResponseInner object if successful. - */ - public EvaluatePoliciesResponseInner evaluatePolicies(String resourceGroupName, String labName, String name, List policies) { - return evaluatePoliciesWithServiceResponseAsync(resourceGroupName, labName, name, policies).toBlocking().single().body(); - } - - /** - * Evaluates lab policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the policy set. - * @param policies Policies to evaluate. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture evaluatePoliciesAsync(String resourceGroupName, String labName, String name, List policies, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(evaluatePoliciesWithServiceResponseAsync(resourceGroupName, labName, name, policies), serviceCallback); - } - - /** - * Evaluates lab policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the policy set. - * @param policies Policies to evaluate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EvaluatePoliciesResponseInner object - */ - public Observable evaluatePoliciesAsync(String resourceGroupName, String labName, String name, List policies) { - return evaluatePoliciesWithServiceResponseAsync(resourceGroupName, labName, name, policies).map(new Func1, EvaluatePoliciesResponseInner>() { - @Override - public EvaluatePoliciesResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Evaluates lab policy. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the policy set. - * @param policies Policies to evaluate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EvaluatePoliciesResponseInner object - */ - public Observable> evaluatePoliciesWithServiceResponseAsync(String resourceGroupName, String labName, String name, List policies) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(policies); - EvaluatePoliciesRequest evaluatePoliciesRequest = new EvaluatePoliciesRequest(); - evaluatePoliciesRequest.withPolicies(policies); - return service.evaluatePolicies(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), evaluatePoliciesRequest, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = evaluatePoliciesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse evaluatePoliciesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/RetargetSchedulePropertiesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/RetargetSchedulePropertiesInner.java deleted file mode 100644 index 08cafb8ab82..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/RetargetSchedulePropertiesInner.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties for retargeting a virtual machine schedule. - */ -public class RetargetSchedulePropertiesInner { - /** - * The resource Id of the virtual machine on which the schedule operates. - */ - @JsonProperty(value = "currentResourceId") - private String currentResourceId; - - /** - * The resource Id of the virtual machine that the schedule should be - * retargeted to. - */ - @JsonProperty(value = "targetResourceId") - private String targetResourceId; - - /** - * Get the currentResourceId value. - * - * @return the currentResourceId value - */ - public String currentResourceId() { - return this.currentResourceId; - } - - /** - * Set the currentResourceId value. - * - * @param currentResourceId the currentResourceId value to set - * @return the RetargetSchedulePropertiesInner object itself. - */ - public RetargetSchedulePropertiesInner withCurrentResourceId(String currentResourceId) { - this.currentResourceId = currentResourceId; - return this; - } - - /** - * Get the targetResourceId value. - * - * @return the targetResourceId value - */ - public String targetResourceId() { - return this.targetResourceId; - } - - /** - * Set the targetResourceId value. - * - * @param targetResourceId the targetResourceId value to set - * @return the RetargetSchedulePropertiesInner object itself. - */ - public RetargetSchedulePropertiesInner withTargetResourceId(String targetResourceId) { - this.targetResourceId = targetResourceId; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ScheduleFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ScheduleFragmentInner.java deleted file mode 100644 index 80e7dd5ef55..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ScheduleFragmentInner.java +++ /dev/null @@ -1,289 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.EnableStatus; -import com.microsoft.azure.management.devtestlab.WeekDetailsFragment; -import com.microsoft.azure.management.devtestlab.DayDetailsFragment; -import com.microsoft.azure.management.devtestlab.HourDetailsFragment; -import com.microsoft.azure.management.devtestlab.NotificationSettingsFragment; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A schedule. - */ -@JsonFlatten -public class ScheduleFragmentInner extends Resource { - /** - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled'. - */ - @JsonProperty(value = "properties.status") - private EnableStatus status; - - /** - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - */ - @JsonProperty(value = "properties.taskType") - private String taskType; - - /** - * If the schedule will occur only some days of the week, specify the - * weekly recurrence. - */ - @JsonProperty(value = "properties.weeklyRecurrence") - private WeekDetailsFragment weeklyRecurrence; - - /** - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - */ - @JsonProperty(value = "properties.dailyRecurrence") - private DayDetailsFragment dailyRecurrence; - - /** - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - */ - @JsonProperty(value = "properties.hourlyRecurrence") - private HourDetailsFragment hourlyRecurrence; - - /** - * The time zone ID (e.g. Pacific Standard time). - */ - @JsonProperty(value = "properties.timeZoneId") - private String timeZoneId; - - /** - * Notification settings. - */ - @JsonProperty(value = "properties.notificationSettings") - private NotificationSettingsFragment notificationSettings; - - /** - * The resource ID to which the schedule belongs. - */ - @JsonProperty(value = "properties.targetResourceId") - private String targetResourceId; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the status value. - * - * @return the status value - */ - public EnableStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withStatus(EnableStatus status) { - this.status = status; - return this; - } - - /** - * Get the taskType value. - * - * @return the taskType value - */ - public String taskType() { - return this.taskType; - } - - /** - * Set the taskType value. - * - * @param taskType the taskType value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withTaskType(String taskType) { - this.taskType = taskType; - return this; - } - - /** - * Get the weeklyRecurrence value. - * - * @return the weeklyRecurrence value - */ - public WeekDetailsFragment weeklyRecurrence() { - return this.weeklyRecurrence; - } - - /** - * Set the weeklyRecurrence value. - * - * @param weeklyRecurrence the weeklyRecurrence value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withWeeklyRecurrence(WeekDetailsFragment weeklyRecurrence) { - this.weeklyRecurrence = weeklyRecurrence; - return this; - } - - /** - * Get the dailyRecurrence value. - * - * @return the dailyRecurrence value - */ - public DayDetailsFragment dailyRecurrence() { - return this.dailyRecurrence; - } - - /** - * Set the dailyRecurrence value. - * - * @param dailyRecurrence the dailyRecurrence value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withDailyRecurrence(DayDetailsFragment dailyRecurrence) { - this.dailyRecurrence = dailyRecurrence; - return this; - } - - /** - * Get the hourlyRecurrence value. - * - * @return the hourlyRecurrence value - */ - public HourDetailsFragment hourlyRecurrence() { - return this.hourlyRecurrence; - } - - /** - * Set the hourlyRecurrence value. - * - * @param hourlyRecurrence the hourlyRecurrence value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withHourlyRecurrence(HourDetailsFragment hourlyRecurrence) { - this.hourlyRecurrence = hourlyRecurrence; - return this; - } - - /** - * Get the timeZoneId value. - * - * @return the timeZoneId value - */ - public String timeZoneId() { - return this.timeZoneId; - } - - /** - * Set the timeZoneId value. - * - * @param timeZoneId the timeZoneId value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withTimeZoneId(String timeZoneId) { - this.timeZoneId = timeZoneId; - return this; - } - - /** - * Get the notificationSettings value. - * - * @return the notificationSettings value - */ - public NotificationSettingsFragment notificationSettings() { - return this.notificationSettings; - } - - /** - * Set the notificationSettings value. - * - * @param notificationSettings the notificationSettings value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withNotificationSettings(NotificationSettingsFragment notificationSettings) { - this.notificationSettings = notificationSettings; - return this; - } - - /** - * Get the targetResourceId value. - * - * @return the targetResourceId value - */ - public String targetResourceId() { - return this.targetResourceId; - } - - /** - * Set the targetResourceId value. - * - * @param targetResourceId the targetResourceId value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withTargetResourceId(String targetResourceId) { - this.targetResourceId = targetResourceId; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the ScheduleFragmentInner object itself. - */ - public ScheduleFragmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ScheduleInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ScheduleInner.java deleted file mode 100644 index b9a614a21da..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ScheduleInner.java +++ /dev/null @@ -1,305 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.EnableStatus; -import com.microsoft.azure.management.devtestlab.WeekDetails; -import com.microsoft.azure.management.devtestlab.DayDetails; -import com.microsoft.azure.management.devtestlab.HourDetails; -import com.microsoft.azure.management.devtestlab.NotificationSettings; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A schedule. - */ -@JsonFlatten -public class ScheduleInner extends Resource { - /** - * The status of the schedule (i.e. Enabled, Disabled). Possible values - * include: 'Enabled', 'Disabled'. - */ - @JsonProperty(value = "properties.status") - private EnableStatus status; - - /** - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - */ - @JsonProperty(value = "properties.taskType") - private String taskType; - - /** - * If the schedule will occur only some days of the week, specify the - * weekly recurrence. - */ - @JsonProperty(value = "properties.weeklyRecurrence") - private WeekDetails weeklyRecurrence; - - /** - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - */ - @JsonProperty(value = "properties.dailyRecurrence") - private DayDetails dailyRecurrence; - - /** - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - */ - @JsonProperty(value = "properties.hourlyRecurrence") - private HourDetails hourlyRecurrence; - - /** - * The time zone ID (e.g. Pacific Standard time). - */ - @JsonProperty(value = "properties.timeZoneId") - private String timeZoneId; - - /** - * Notification settings. - */ - @JsonProperty(value = "properties.notificationSettings") - private NotificationSettings notificationSettings; - - /** - * The creation date of the schedule. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The resource ID to which the schedule belongs. - */ - @JsonProperty(value = "properties.targetResourceId") - private String targetResourceId; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the status value. - * - * @return the status value - */ - public EnableStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withStatus(EnableStatus status) { - this.status = status; - return this; - } - - /** - * Get the taskType value. - * - * @return the taskType value - */ - public String taskType() { - return this.taskType; - } - - /** - * Set the taskType value. - * - * @param taskType the taskType value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withTaskType(String taskType) { - this.taskType = taskType; - return this; - } - - /** - * Get the weeklyRecurrence value. - * - * @return the weeklyRecurrence value - */ - public WeekDetails weeklyRecurrence() { - return this.weeklyRecurrence; - } - - /** - * Set the weeklyRecurrence value. - * - * @param weeklyRecurrence the weeklyRecurrence value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withWeeklyRecurrence(WeekDetails weeklyRecurrence) { - this.weeklyRecurrence = weeklyRecurrence; - return this; - } - - /** - * Get the dailyRecurrence value. - * - * @return the dailyRecurrence value - */ - public DayDetails dailyRecurrence() { - return this.dailyRecurrence; - } - - /** - * Set the dailyRecurrence value. - * - * @param dailyRecurrence the dailyRecurrence value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withDailyRecurrence(DayDetails dailyRecurrence) { - this.dailyRecurrence = dailyRecurrence; - return this; - } - - /** - * Get the hourlyRecurrence value. - * - * @return the hourlyRecurrence value - */ - public HourDetails hourlyRecurrence() { - return this.hourlyRecurrence; - } - - /** - * Set the hourlyRecurrence value. - * - * @param hourlyRecurrence the hourlyRecurrence value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withHourlyRecurrence(HourDetails hourlyRecurrence) { - this.hourlyRecurrence = hourlyRecurrence; - return this; - } - - /** - * Get the timeZoneId value. - * - * @return the timeZoneId value - */ - public String timeZoneId() { - return this.timeZoneId; - } - - /** - * Set the timeZoneId value. - * - * @param timeZoneId the timeZoneId value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withTimeZoneId(String timeZoneId) { - this.timeZoneId = timeZoneId; - return this; - } - - /** - * Get the notificationSettings value. - * - * @return the notificationSettings value - */ - public NotificationSettings notificationSettings() { - return this.notificationSettings; - } - - /** - * Set the notificationSettings value. - * - * @param notificationSettings the notificationSettings value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withNotificationSettings(NotificationSettings notificationSettings) { - this.notificationSettings = notificationSettings; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the targetResourceId value. - * - * @return the targetResourceId value - */ - public String targetResourceId() { - return this.targetResourceId; - } - - /** - * Set the targetResourceId value. - * - * @param targetResourceId the targetResourceId value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withTargetResourceId(String targetResourceId) { - this.targetResourceId = targetResourceId; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the ScheduleInner object itself. - */ - public ScheduleInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SchedulesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SchedulesInner.java deleted file mode 100644 index 28c8b86d239..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SchedulesInner.java +++ /dev/null @@ -1,1372 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Schedules. - */ -public class SchedulesInner { - /** The Retrofit service to perform REST calls. */ - private SchedulesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of SchedulesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public SchedulesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(SchedulesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Schedules to be - * used by Retrofit to perform actually REST calls. - */ - interface SchedulesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body ScheduleInner schedule, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body ScheduleFragmentInner schedule, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules execute" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/execute") - Observable> execute(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules beginExecute" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/execute") - Observable> beginExecute(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules listApplicable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable") - Observable> listApplicable(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules listApplicableNext" }) - @GET - Observable> listApplicableNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=status)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner createOrUpdate(String resourceGroupName, String labName, String name, ScheduleInner schedule) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, schedule).toBlocking().single().body(); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param schedule A schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, ScheduleInner schedule, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, schedule), serviceCallback); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, ScheduleInner schedule) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, schedule).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, ScheduleInner schedule) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (schedule == null) { - throw new IllegalArgumentException("Parameter schedule is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(schedule); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, schedule, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner update(String resourceGroupName, String labName, String name, ScheduleFragmentInner schedule) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, schedule).toBlocking().single().body(); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param schedule A schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String labName, String name, ScheduleFragmentInner schedule, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, labName, name, schedule), serviceCallback); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable updateAsync(String resourceGroupName, String labName, String name, ScheduleFragmentInner schedule) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, schedule).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String labName, String name, ScheduleFragmentInner schedule) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (schedule == null) { - throw new IllegalArgumentException("Parameter schedule is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(schedule); - return service.update(this.client.subscriptionId(), resourceGroupName, labName, name, schedule, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void execute(String resourceGroupName, String labName, String name) { - executeWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture executeAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(executeWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable executeAsync(String resourceGroupName, String labName, String name) { - return executeWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> executeWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.execute(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginExecute(String resourceGroupName, String labName, String name) { - beginExecuteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginExecuteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginExecuteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginExecuteAsync(String resourceGroupName, String labName, String name) { - return beginExecuteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginExecuteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginExecute(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginExecuteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginExecuteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all applicable schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listApplicable(final String resourceGroupName, final String labName, final String name) { - ServiceResponse> response = listApplicableSinglePageAsync(resourceGroupName, labName, name).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listApplicableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all applicable schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listApplicableAsync(final String resourceGroupName, final String labName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listApplicableSinglePageAsync(resourceGroupName, labName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listApplicableNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all applicable schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listApplicableAsync(final String resourceGroupName, final String labName, final String name) { - return listApplicableWithServiceResponseAsync(resourceGroupName, labName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all applicable schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listApplicableWithServiceResponseAsync(final String resourceGroupName, final String labName, final String name) { - return listApplicableSinglePageAsync(resourceGroupName, labName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listApplicableNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all applicable schedules. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listApplicableSinglePageAsync(final String resourceGroupName, final String labName, final String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listApplicable(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listApplicableDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listApplicableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List schedules in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all applicable schedules. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listApplicableNext(final String nextPageLink) { - ServiceResponse> response = listApplicableNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listApplicableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all applicable schedules. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listApplicableNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listApplicableNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listApplicableNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all applicable schedules. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listApplicableNextAsync(final String nextPageLink) { - return listApplicableNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all applicable schedules. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listApplicableNextWithServiceResponseAsync(final String nextPageLink) { - return listApplicableNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listApplicableNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all applicable schedules. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listApplicableNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listApplicableNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listApplicableNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listApplicableNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SecretInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SecretInner.java deleted file mode 100644 index 7407952a5dd..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SecretInner.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A secret. - */ -@JsonFlatten -public class SecretInner extends Resource { - /** - * The value of the secret for secret creation. - */ - @JsonProperty(value = "properties.value") - private String value; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the SecretInner object itself. - */ - public SecretInner withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the SecretInner object itself. - */ - public SecretInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the SecretInner object itself. - */ - public SecretInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SecretsInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SecretsInner.java deleted file mode 100644 index 431b735eff9..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/SecretsInner.java +++ /dev/null @@ -1,883 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Secrets. - */ -public class SecretsInner { - /** The Retrofit service to perform REST calls. */ - private SecretsService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of SecretsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public SecretsInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(SecretsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Secrets to be - * used by Retrofit to perform actually REST calls. - */ - interface SecretsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Secrets list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Secrets get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Secrets createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Body SecretInner secret, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Secrets delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("userName") String userName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Secrets listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SecretInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String userName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, userName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String userName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, userName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SecretInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String userName) { - return listWithServiceResponseAsync(resourceGroupName, labName, userName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SecretInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String userName) { - return listSinglePageAsync(resourceGroupName, labName, userName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SecretInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String userName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, userName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=value)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SecretInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=value)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=value)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SecretInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, userName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List secrets in a given user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=value)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SecretInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, userName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List secrets in a given user profile. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param userName The name of the user profile. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=value)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SecretInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String userName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, userName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SecretInner object if successful. - */ - public SecretInner get(String resourceGroupName, String labName, String userName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().single().body(); - } - - /** - * Get secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Get secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SecretInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String userName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, SecretInner>() { - @Override - public SecretInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SecretInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, userName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param expand Specify the $expand query. Example: 'properties($select=value)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SecretInner object if successful. - */ - public SecretInner get(String resourceGroupName, String labName, String userName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand).toBlocking().single().body(); - } - - /** - * Get secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param expand Specify the $expand query. Example: 'properties($select=value)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String userName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand), serviceCallback); - } - - /** - * Get secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param expand Specify the $expand query. Example: 'properties($select=value)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SecretInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String userName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, userName, name, expand).map(new Func1, SecretInner>() { - @Override - public SecretInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param expand Specify the $expand query. Example: 'properties($select=value)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SecretInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, userName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param secret A secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SecretInner object if successful. - */ - public SecretInner createOrUpdate(String resourceGroupName, String labName, String userName, String name, SecretInner secret) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, secret).toBlocking().single().body(); - } - - /** - * Create or replace an existing secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param secret A secret. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, SecretInner secret, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, secret), serviceCallback); - } - - /** - * Create or replace an existing secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param secret A secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SecretInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String userName, String name, SecretInner secret) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, userName, name, secret).map(new Func1, SecretInner>() { - @Override - public SecretInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param secret A secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SecretInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name, SecretInner secret) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (secret == null) { - throw new IllegalArgumentException("Parameter secret is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(secret); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, userName, name, secret, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String userName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).toBlocking().single().body(); - } - - /** - * Delete secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String userName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name), serviceCallback); - } - - /** - * Delete secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String labName, String userName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, userName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete secret. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param userName The name of the user profile. - * @param name The name of the secret. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String userName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (userName == null) { - throw new IllegalArgumentException("Parameter userName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, labName, userName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List secrets in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SecretInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List secrets in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List secrets in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SecretInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List secrets in a given user profile. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SecretInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List secrets in a given user profile. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SecretInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ServiceRunnerInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ServiceRunnerInner.java deleted file mode 100644 index d44b331fec2..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ServiceRunnerInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.IdentityProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; - -/** - * A container for a managed identity to execute DevTest lab services. - */ -public class ServiceRunnerInner extends Resource { - /** - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private IdentityProperties identity; - - /** - * Get the identity value. - * - * @return the identity value - */ - public IdentityProperties identity() { - return this.identity; - } - - /** - * Set the identity value. - * - * @param identity the identity value to set - * @return the ServiceRunnerInner object itself. - */ - public ServiceRunnerInner withIdentity(IdentityProperties identity) { - this.identity = identity; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ServiceRunnersInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ServiceRunnersInner.java deleted file mode 100644 index 0b5de6a713f..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/ServiceRunnersInner.java +++ /dev/null @@ -1,742 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ServiceRunners. - */ -public class ServiceRunnersInner { - /** The Retrofit service to perform REST calls. */ - private ServiceRunnersService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of ServiceRunnersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ServiceRunnersInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(ServiceRunnersService.class); - this.client = client; - } - - /** - * The interface defining all the services for ServiceRunners to be - * used by Retrofit to perform actually REST calls. - */ - interface ServiceRunnersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ServiceRunners list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ServiceRunners get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ServiceRunners createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body ServiceRunnerInner serviceRunner, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ServiceRunners delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.ServiceRunners listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ServiceRunnerInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ServiceRunnerInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ServiceRunnerInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ServiceRunnerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ServiceRunnerInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ServiceRunnerInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List service runners in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ServiceRunnerInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List service runners in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ServiceRunnerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ServiceRunnerInner object if successful. - */ - public ServiceRunnerInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceRunnerInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, ServiceRunnerInner>() { - @Override - public ServiceRunnerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceRunnerInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing Service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @param serviceRunner A container for a managed identity to execute DevTest lab services. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ServiceRunnerInner object if successful. - */ - public ServiceRunnerInner createOrUpdate(String resourceGroupName, String labName, String name, ServiceRunnerInner serviceRunner) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, serviceRunner).toBlocking().single().body(); - } - - /** - * Create or replace an existing Service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @param serviceRunner A container for a managed identity to execute DevTest lab services. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, ServiceRunnerInner serviceRunner, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, serviceRunner), serviceCallback); - } - - /** - * Create or replace an existing Service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @param serviceRunner A container for a managed identity to execute DevTest lab services. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceRunnerInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, ServiceRunnerInner serviceRunner) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, serviceRunner).map(new Func1, ServiceRunnerInner>() { - @Override - public ServiceRunnerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing Service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @param serviceRunner A container for a managed identity to execute DevTest lab services. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceRunnerInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, ServiceRunnerInner serviceRunner) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (serviceRunner == null) { - throw new IllegalArgumentException("Parameter serviceRunner is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(serviceRunner); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, serviceRunner, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete service runner. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the service runner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List service runners in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ServiceRunnerInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List service runners in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List service runners in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ServiceRunnerInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List service runners in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ServiceRunnerInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List service runners in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ServiceRunnerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UserFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UserFragmentInner.java deleted file mode 100644 index 2385864febc..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UserFragmentInner.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.UserIdentityFragment; -import com.microsoft.azure.management.devtestlab.UserSecretStoreFragment; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Profile of a lab user. - */ -@JsonFlatten -public class UserFragmentInner extends Resource { - /** - * The identity of the user. - */ - @JsonProperty(value = "properties.identity") - private UserIdentityFragment identity; - - /** - * The secret store of the user. - */ - @JsonProperty(value = "properties.secretStore") - private UserSecretStoreFragment secretStore; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the identity value. - * - * @return the identity value - */ - public UserIdentityFragment identity() { - return this.identity; - } - - /** - * Set the identity value. - * - * @param identity the identity value to set - * @return the UserFragmentInner object itself. - */ - public UserFragmentInner withIdentity(UserIdentityFragment identity) { - this.identity = identity; - return this; - } - - /** - * Get the secretStore value. - * - * @return the secretStore value - */ - public UserSecretStoreFragment secretStore() { - return this.secretStore; - } - - /** - * Set the secretStore value. - * - * @param secretStore the secretStore value to set - * @return the UserFragmentInner object itself. - */ - public UserFragmentInner withSecretStore(UserSecretStoreFragment secretStore) { - this.secretStore = secretStore; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the UserFragmentInner object itself. - */ - public UserFragmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the UserFragmentInner object itself. - */ - public UserFragmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UserInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UserInner.java deleted file mode 100644 index 0679a325241..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UserInner.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import com.microsoft.azure.management.devtestlab.UserIdentity; -import com.microsoft.azure.management.devtestlab.UserSecretStore; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Profile of a lab user. - */ -@JsonFlatten -public class UserInner extends Resource { - /** - * The identity of the user. - */ - @JsonProperty(value = "properties.identity") - private UserIdentity identity; - - /** - * The secret store of the user. - */ - @JsonProperty(value = "properties.secretStore") - private UserSecretStore secretStore; - - /** - * The creation date of the user profile. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the identity value. - * - * @return the identity value - */ - public UserIdentity identity() { - return this.identity; - } - - /** - * Set the identity value. - * - * @param identity the identity value to set - * @return the UserInner object itself. - */ - public UserInner withIdentity(UserIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the secretStore value. - * - * @return the secretStore value - */ - public UserSecretStore secretStore() { - return this.secretStore; - } - - /** - * Set the secretStore value. - * - * @param secretStore the secretStore value to set - * @return the UserInner object itself. - */ - public UserInner withSecretStore(UserSecretStore secretStore) { - this.secretStore = secretStore; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the UserInner object itself. - */ - public UserInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the UserInner object itself. - */ - public UserInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UsersInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UsersInner.java deleted file mode 100644 index e4574d67d89..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/UsersInner.java +++ /dev/null @@ -1,1024 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Users. - */ -public class UsersInner { - /** The Retrofit service to perform REST calls. */ - private UsersService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of UsersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public UsersInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(UsersService.class); - this.client = client; - } - - /** - * The interface defining all the services for Users to be - * used by Retrofit to perform actually REST calls. - */ - interface UsersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Users list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Users get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Users createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body UserInner user, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Users delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Users beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Users update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body UserFragmentInner user, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Users listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=identity)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=identity)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=identity)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List user profiles in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($select=identity)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List user profiles in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=identity)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserInner object if successful. - */ - public UserInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, UserInner>() { - @Override - public UserInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=identity)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserInner object if successful. - */ - public UserInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=identity)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=identity)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, UserInner>() { - @Override - public UserInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param expand Specify the $expand query. Example: 'properties($select=identity)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param user Profile of a lab user. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserInner object if successful. - */ - public UserInner createOrUpdate(String resourceGroupName, String labName, String name, UserInner user) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, user).toBlocking().single().body(); - } - - /** - * Create or replace an existing user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param user Profile of a lab user. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, UserInner user, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, user), serviceCallback); - } - - /** - * Create or replace an existing user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param user Profile of a lab user. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, UserInner user) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, user).map(new Func1, UserInner>() { - @Override - public UserInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing user profile. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param user Profile of a lab user. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, UserInner user) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (user == null) { - throw new IllegalArgumentException("Parameter user is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(user); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, user, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete user profile. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Delete user profile. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete user profile. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete user profile. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete user profile. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String labName, String name) { - beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete user profile. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete user profile. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String labName, String name) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete user profile. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of user profiles. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param user Profile of a lab user. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the UserInner object if successful. - */ - public UserInner update(String resourceGroupName, String labName, String name, UserFragmentInner user) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, user).toBlocking().single().body(); - } - - /** - * Modify properties of user profiles. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param user Profile of a lab user. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String labName, String name, UserFragmentInner user, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, labName, name, user), serviceCallback); - } - - /** - * Modify properties of user profiles. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param user Profile of a lab user. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserInner object - */ - public Observable updateAsync(String resourceGroupName, String labName, String name, UserFragmentInner user) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, user).map(new Func1, UserInner>() { - @Override - public UserInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of user profiles. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the user profile. - * @param user Profile of a lab user. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UserInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String labName, String name, UserFragmentInner user) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (user == null) { - throw new IllegalArgumentException("Parameter user is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(user); - return service.update(this.client.subscriptionId(), resourceGroupName, labName, name, user, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List user profiles in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<UserInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List user profiles in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List user profiles in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List user profiles in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<UserInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List user profiles in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<UserInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualMachineSchedulesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualMachineSchedulesInner.java deleted file mode 100644 index addfc67022c..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualMachineSchedulesInner.java +++ /dev/null @@ -1,1187 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in VirtualMachineSchedules. - */ -public class VirtualMachineSchedulesInner { - /** The Retrofit service to perform REST calls. */ - private VirtualMachineSchedulesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of VirtualMachineSchedulesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public VirtualMachineSchedulesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(VirtualMachineSchedulesService.class); - this.client = client; - } - - /** - * The interface defining all the services for VirtualMachineSchedules to be - * used by Retrofit to perform actually REST calls. - */ - interface VirtualMachineSchedulesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("virtualMachineName") String virtualMachineName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("virtualMachineName") String virtualMachineName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("virtualMachineName") String virtualMachineName, @Path("name") String name, @Body ScheduleInner schedule, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("virtualMachineName") String virtualMachineName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("virtualMachineName") String virtualMachineName, @Path("name") String name, @Body ScheduleFragmentInner schedule, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules execute" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}/execute") - Observable> execute(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("virtualMachineName") String virtualMachineName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules beginExecute" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}/execute") - Observable> beginExecute(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("virtualMachineName") String virtualMachineName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String virtualMachineName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, virtualMachineName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String virtualMachineName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, virtualMachineName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String virtualMachineName) { - return listWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String virtualMachineName) { - return listSinglePageAsync(resourceGroupName, labName, virtualMachineName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String virtualMachineName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String virtualMachineName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String virtualMachineName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String virtualMachineName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a given virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String virtualMachineName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a given virtual machine. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param virtualMachineName The name of the virtual machine. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($select=status)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String virtualMachineName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner get(String resourceGroupName, String labName, String virtualMachineName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name).toBlocking().single().body(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String virtualMachineName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name), serviceCallback); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner get(String resourceGroupName, String labName, String virtualMachineName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, expand).toBlocking().single().body(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String virtualMachineName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, expand), serviceCallback); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String virtualMachineName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, expand).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param expand Specify the $expand query. Example: 'properties($select=status)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String virtualMachineName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner createOrUpdate(String resourceGroupName, String labName, String virtualMachineName, String name, ScheduleInner schedule) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, schedule).toBlocking().single().body(); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param schedule A schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String virtualMachineName, String name, ScheduleInner schedule, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, schedule), serviceCallback); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String virtualMachineName, String name, ScheduleInner schedule) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, schedule).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String virtualMachineName, String name, ScheduleInner schedule) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (schedule == null) { - throw new IllegalArgumentException("Parameter schedule is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(schedule); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, name, schedule, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String virtualMachineName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name).toBlocking().single().body(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String virtualMachineName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name), serviceCallback); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ScheduleInner object if successful. - */ - public ScheduleInner update(String resourceGroupName, String labName, String virtualMachineName, String name, ScheduleFragmentInner schedule) { - return updateWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, schedule).toBlocking().single().body(); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param schedule A schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String labName, String virtualMachineName, String name, ScheduleFragmentInner schedule, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, schedule), serviceCallback); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable updateAsync(String resourceGroupName, String labName, String virtualMachineName, String name, ScheduleFragmentInner schedule) { - return updateWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name, schedule).map(new Func1, ScheduleInner>() { - @Override - public ScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param schedule A schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ScheduleInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String labName, String virtualMachineName, String name, ScheduleFragmentInner schedule) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (schedule == null) { - throw new IllegalArgumentException("Parameter schedule is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(schedule); - return service.update(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, name, schedule, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void execute(String resourceGroupName, String labName, String virtualMachineName, String name) { - executeWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name).toBlocking().last().body(); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture executeAsync(String resourceGroupName, String labName, String virtualMachineName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(executeWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name), serviceCallback); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable executeAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { - return executeWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> executeWithServiceResponseAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.execute(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginExecute(String resourceGroupName, String labName, String virtualMachineName, String name) { - beginExecuteWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name).toBlocking().single().body(); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginExecuteAsync(String resourceGroupName, String labName, String virtualMachineName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginExecuteWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name), serviceCallback); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginExecuteAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { - return beginExecuteWithServiceResponseAsync(resourceGroupName, labName, virtualMachineName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Execute a schedule. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param virtualMachineName The name of the virtual machine. - * @param name The name of the schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginExecuteWithServiceResponseAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (virtualMachineName == null) { - throw new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginExecute(this.client.subscriptionId(), resourceGroupName, labName, virtualMachineName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginExecuteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginExecuteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List schedules in a given virtual machine. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ScheduleInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List schedules in a given virtual machine. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List schedules in a given virtual machine. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List schedules in a given virtual machine. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ScheduleInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List schedules in a given virtual machine. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualMachinesInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualMachinesInner.java deleted file mode 100644 index b7f02a56311..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualMachinesInner.java +++ /dev/null @@ -1,2640 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.devtestlab.ApplyArtifactsRequest; -import com.microsoft.azure.management.devtestlab.DetachDataDiskProperties; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in VirtualMachines. - */ -public class VirtualMachinesInner { - /** The Retrofit service to perform REST calls. */ - private VirtualMachinesService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of VirtualMachinesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public VirtualMachinesInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(VirtualMachinesService.class); - this.client = client; - } - - /** - * The interface defining all the services for VirtualMachines to be - * used by Retrofit to perform actually REST calls. - */ - interface VirtualMachinesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body LabVirtualMachineInner labVirtualMachine, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}") - Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body LabVirtualMachineInner labVirtualMachine, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body LabVirtualMachineFragmentInner labVirtualMachine, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines addDataDisk" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/addDataDisk") - Observable> addDataDisk(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body DataDiskPropertiesInner dataDiskProperties, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines beginAddDataDisk" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/addDataDisk") - Observable> beginAddDataDisk(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body DataDiskPropertiesInner dataDiskProperties, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines applyArtifacts" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts") - Observable> applyArtifacts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ApplyArtifactsRequest applyArtifactsRequest, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines beginApplyArtifacts" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts") - Observable> beginApplyArtifacts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ApplyArtifactsRequest applyArtifactsRequest, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines claim" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/claim") - Observable> claim(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines beginClaim" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/claim") - Observable> beginClaim(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines detachDataDisk" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/detachDataDisk") - Observable> detachDataDisk(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DetachDataDiskProperties detachDataDiskProperties, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines beginDetachDataDisk" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/detachDataDisk") - Observable> beginDetachDataDisk(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DetachDataDiskProperties detachDataDiskProperties, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines listApplicableSchedules" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/listApplicableSchedules") - Observable> listApplicableSchedules(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines start" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/start") - Observable> start(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines beginStart" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/start") - Observable> beginStart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines stop" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/stop") - Observable> stop(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines beginStop" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/stop") - Observable> beginStop(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachines listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabVirtualMachineInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVirtualMachineInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVirtualMachineInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabVirtualMachineInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabVirtualMachineInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVirtualMachineInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List virtual machines in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVirtualMachineInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List virtual machines in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabVirtualMachineInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabVirtualMachineInner object if successful. - */ - public LabVirtualMachineInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabVirtualMachineInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, LabVirtualMachineInner>() { - @Override - public LabVirtualMachineInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabVirtualMachineInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabVirtualMachineInner object if successful. - */ - public LabVirtualMachineInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabVirtualMachineInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, LabVirtualMachineInner>() { - @Override - public LabVirtualMachineInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param expand Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabVirtualMachineInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing Virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabVirtualMachineInner object if successful. - */ - public LabVirtualMachineInner createOrUpdate(String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine).toBlocking().last().body(); - } - - /** - * Create or replace an existing Virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine), serviceCallback); - } - - /** - * Create or replace an existing Virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine).map(new Func1, LabVirtualMachineInner>() { - @Override - public LabVirtualMachineInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing Virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (labVirtualMachine == null) { - throw new IllegalArgumentException("Parameter labVirtualMachine is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(labVirtualMachine); - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, labVirtualMachine, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or replace an existing Virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabVirtualMachineInner object if successful. - */ - public LabVirtualMachineInner beginCreateOrUpdate(String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine).toBlocking().single().body(); - } - - /** - * Create or replace an existing Virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine), serviceCallback); - } - - /** - * Create or replace an existing Virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabVirtualMachineInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine).map(new Func1, LabVirtualMachineInner>() { - @Override - public LabVirtualMachineInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing Virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabVirtualMachineInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (labVirtualMachine == null) { - throw new IllegalArgumentException("Parameter labVirtualMachine is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(labVirtualMachine); - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, labVirtualMachine, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Delete virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String labName, String name) { - beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String labName, String name) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of virtual machines. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LabVirtualMachineInner object if successful. - */ - public LabVirtualMachineInner update(String resourceGroupName, String labName, String name, LabVirtualMachineFragmentInner labVirtualMachine) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine).toBlocking().single().body(); - } - - /** - * Modify properties of virtual machines. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String labName, String name, LabVirtualMachineFragmentInner labVirtualMachine, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine), serviceCallback); - } - - /** - * Modify properties of virtual machines. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabVirtualMachineInner object - */ - public Observable updateAsync(String resourceGroupName, String labName, String name, LabVirtualMachineFragmentInner labVirtualMachine) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, labVirtualMachine).map(new Func1, LabVirtualMachineInner>() { - @Override - public LabVirtualMachineInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of virtual machines. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param labVirtualMachine A virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LabVirtualMachineInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String labName, String name, LabVirtualMachineFragmentInner labVirtualMachine) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (labVirtualMachine == null) { - throw new IllegalArgumentException("Parameter labVirtualMachine is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(labVirtualMachine); - return service.update(this.client.subscriptionId(), resourceGroupName, labName, name, labVirtualMachine, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void addDataDisk(String resourceGroupName, String labName, String name, DataDiskPropertiesInner dataDiskProperties) { - addDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, dataDiskProperties).toBlocking().last().body(); - } - - /** - * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture addDataDiskAsync(String resourceGroupName, String labName, String name, DataDiskPropertiesInner dataDiskProperties, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(addDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, dataDiskProperties), serviceCallback); - } - - /** - * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable addDataDiskAsync(String resourceGroupName, String labName, String name, DataDiskPropertiesInner dataDiskProperties) { - return addDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, dataDiskProperties).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> addDataDiskWithServiceResponseAsync(String resourceGroupName, String labName, String name, DataDiskPropertiesInner dataDiskProperties) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (dataDiskProperties == null) { - throw new IllegalArgumentException("Parameter dataDiskProperties is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(dataDiskProperties); - Observable> observable = service.addDataDisk(this.client.subscriptionId(), resourceGroupName, labName, name, dataDiskProperties, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginAddDataDisk(String resourceGroupName, String labName, String name, DataDiskPropertiesInner dataDiskProperties) { - beginAddDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, dataDiskProperties).toBlocking().single().body(); - } - - /** - * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginAddDataDiskAsync(String resourceGroupName, String labName, String name, DataDiskPropertiesInner dataDiskProperties, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginAddDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, dataDiskProperties), serviceCallback); - } - - /** - * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginAddDataDiskAsync(String resourceGroupName, String labName, String name, DataDiskPropertiesInner dataDiskProperties) { - return beginAddDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, dataDiskProperties).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param dataDiskProperties Request body for adding a new or existing data disk to a virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginAddDataDiskWithServiceResponseAsync(String resourceGroupName, String labName, String name, DataDiskPropertiesInner dataDiskProperties) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (dataDiskProperties == null) { - throw new IllegalArgumentException("Parameter dataDiskProperties is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(dataDiskProperties); - return service.beginAddDataDisk(this.client.subscriptionId(), resourceGroupName, labName, name, dataDiskProperties, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginAddDataDiskDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginAddDataDiskDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void applyArtifacts(String resourceGroupName, String labName, String name) { - applyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture applyArtifactsAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(applyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable applyArtifactsAsync(String resourceGroupName, String labName, String name) { - return applyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> applyArtifactsWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String artifactsConverted = null; - ApplyArtifactsRequest applyArtifactsRequest = new ApplyArtifactsRequest(); - applyArtifactsRequest.withArtifacts(null); - Observable> observable = service.applyArtifacts(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), applyArtifactsRequest, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param artifacts The list of artifacts to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void applyArtifacts(String resourceGroupName, String labName, String name, List artifacts) { - applyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name, artifacts).toBlocking().last().body(); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param artifacts The list of artifacts to apply. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture applyArtifactsAsync(String resourceGroupName, String labName, String name, List artifacts, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(applyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name, artifacts), serviceCallback); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param artifacts The list of artifacts to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable applyArtifactsAsync(String resourceGroupName, String labName, String name, List artifacts) { - return applyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name, artifacts).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param artifacts The list of artifacts to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> applyArtifactsWithServiceResponseAsync(String resourceGroupName, String labName, String name, List artifacts) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(artifacts); - ApplyArtifactsRequest applyArtifactsRequest = new ApplyArtifactsRequest(); - applyArtifactsRequest.withArtifacts(artifacts); - Observable> observable = service.applyArtifacts(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), applyArtifactsRequest, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginApplyArtifacts(String resourceGroupName, String labName, String name) { - beginApplyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginApplyArtifactsAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginApplyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginApplyArtifactsAsync(String resourceGroupName, String labName, String name) { - return beginApplyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginApplyArtifactsWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final List artifacts = null; - ApplyArtifactsRequest applyArtifactsRequest = new ApplyArtifactsRequest(); - applyArtifactsRequest.withArtifacts(null); - return service.beginApplyArtifacts(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), applyArtifactsRequest, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginApplyArtifactsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param artifacts The list of artifacts to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginApplyArtifacts(String resourceGroupName, String labName, String name, List artifacts) { - beginApplyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name, artifacts).toBlocking().single().body(); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param artifacts The list of artifacts to apply. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginApplyArtifactsAsync(String resourceGroupName, String labName, String name, List artifacts, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginApplyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name, artifacts), serviceCallback); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param artifacts The list of artifacts to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginApplyArtifactsAsync(String resourceGroupName, String labName, String name, List artifacts) { - return beginApplyArtifactsWithServiceResponseAsync(resourceGroupName, labName, name, artifacts).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Apply artifacts to virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param artifacts The list of artifacts to apply. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginApplyArtifactsWithServiceResponseAsync(String resourceGroupName, String labName, String name, List artifacts) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(artifacts); - ApplyArtifactsRequest applyArtifactsRequest = new ApplyArtifactsRequest(); - applyArtifactsRequest.withArtifacts(artifacts); - return service.beginApplyArtifacts(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), applyArtifactsRequest, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginApplyArtifactsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginApplyArtifactsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Take ownership of an existing virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void claim(String resourceGroupName, String labName, String name) { - claimWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Take ownership of an existing virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture claimAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(claimWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Take ownership of an existing virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable claimAsync(String resourceGroupName, String labName, String name) { - return claimWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Take ownership of an existing virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> claimWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.claim(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Take ownership of an existing virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginClaim(String resourceGroupName, String labName, String name) { - beginClaimWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Take ownership of an existing virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginClaimAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginClaimWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Take ownership of an existing virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginClaimAsync(String resourceGroupName, String labName, String name) { - return beginClaimWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Take ownership of an existing virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginClaimWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginClaim(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginClaimDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginClaimDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void detachDataDisk(String resourceGroupName, String labName, String name) { - detachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture detachDataDiskAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(detachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable detachDataDiskAsync(String resourceGroupName, String labName, String name) { - return detachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> detachDataDiskWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String existingLabDiskId = null; - DetachDataDiskProperties detachDataDiskProperties = new DetachDataDiskProperties(); - detachDataDiskProperties.withExistingLabDiskId(null); - Observable> observable = service.detachDataDisk(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), detachDataDiskProperties, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param existingLabDiskId Specifies the disk resource ID to detach from virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void detachDataDisk(String resourceGroupName, String labName, String name, String existingLabDiskId) { - detachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, existingLabDiskId).toBlocking().last().body(); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param existingLabDiskId Specifies the disk resource ID to detach from virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture detachDataDiskAsync(String resourceGroupName, String labName, String name, String existingLabDiskId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(detachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, existingLabDiskId), serviceCallback); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param existingLabDiskId Specifies the disk resource ID to detach from virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable detachDataDiskAsync(String resourceGroupName, String labName, String name, String existingLabDiskId) { - return detachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, existingLabDiskId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param existingLabDiskId Specifies the disk resource ID to detach from virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> detachDataDiskWithServiceResponseAsync(String resourceGroupName, String labName, String name, String existingLabDiskId) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - DetachDataDiskProperties detachDataDiskProperties = new DetachDataDiskProperties(); - detachDataDiskProperties.withExistingLabDiskId(existingLabDiskId); - Observable> observable = service.detachDataDisk(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), detachDataDiskProperties, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDetachDataDisk(String resourceGroupName, String labName, String name) { - beginDetachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDetachDataDiskAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDetachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDetachDataDiskAsync(String resourceGroupName, String labName, String name) { - return beginDetachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDetachDataDiskWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String existingLabDiskId = null; - DetachDataDiskProperties detachDataDiskProperties = new DetachDataDiskProperties(); - detachDataDiskProperties.withExistingLabDiskId(null); - return service.beginDetachDataDisk(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), detachDataDiskProperties, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDetachDataDiskDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param existingLabDiskId Specifies the disk resource ID to detach from virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDetachDataDisk(String resourceGroupName, String labName, String name, String existingLabDiskId) { - beginDetachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, existingLabDiskId).toBlocking().single().body(); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param existingLabDiskId Specifies the disk resource ID to detach from virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDetachDataDiskAsync(String resourceGroupName, String labName, String name, String existingLabDiskId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDetachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, existingLabDiskId), serviceCallback); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param existingLabDiskId Specifies the disk resource ID to detach from virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDetachDataDiskAsync(String resourceGroupName, String labName, String name, String existingLabDiskId) { - return beginDetachDataDiskWithServiceResponseAsync(resourceGroupName, labName, name, existingLabDiskId).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Detach the specified disk from the virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param existingLabDiskId Specifies the disk resource ID to detach from virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDetachDataDiskWithServiceResponseAsync(String resourceGroupName, String labName, String name, String existingLabDiskId) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - DetachDataDiskProperties detachDataDiskProperties = new DetachDataDiskProperties(); - detachDataDiskProperties.withExistingLabDiskId(existingLabDiskId); - return service.beginDetachDataDisk(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), detachDataDiskProperties, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDetachDataDiskDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDetachDataDiskDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all applicable schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApplicableScheduleInner object if successful. - */ - public ApplicableScheduleInner listApplicableSchedules(String resourceGroupName, String labName, String name) { - return listApplicableSchedulesWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Lists all applicable schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listApplicableSchedulesAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listApplicableSchedulesWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Lists all applicable schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicableScheduleInner object - */ - public Observable listApplicableSchedulesAsync(String resourceGroupName, String labName, String name) { - return listApplicableSchedulesWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, ApplicableScheduleInner>() { - @Override - public ApplicableScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists all applicable schedules. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicableScheduleInner object - */ - public Observable> listApplicableSchedulesWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listApplicableSchedules(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listApplicableSchedulesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listApplicableSchedulesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Start a virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void start(String resourceGroupName, String labName, String name) { - startWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Start a virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture startAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Start a virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable startAsync(String resourceGroupName, String labName, String name) { - return startWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Start a virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> startWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.start(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Start a virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginStart(String resourceGroupName, String labName, String name) { - beginStartWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Start a virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginStartAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Start a virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginStartAsync(String resourceGroupName, String labName, String name) { - return beginStartWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Start a virtual machine. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginStart(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginStartDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Stop a virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void stop(String resourceGroupName, String labName, String name) { - stopWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Stop a virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture stopAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Stop a virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable stopAsync(String resourceGroupName, String labName, String name) { - return stopWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Stop a virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> stopWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.stop(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Stop a virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginStop(String resourceGroupName, String labName, String name) { - beginStopWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Stop a virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginStopAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Stop a virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginStopAsync(String resourceGroupName, String labName, String name) { - return beginStopWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Stop a virtual machine This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginStop(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginStopDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginStopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List virtual machines in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<LabVirtualMachineInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List virtual machines in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List virtual machines in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVirtualMachineInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List virtual machines in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<LabVirtualMachineInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List virtual machines in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<LabVirtualMachineInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkFragmentInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkFragmentInner.java deleted file mode 100644 index bca93bee029..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkFragmentInner.java +++ /dev/null @@ -1,206 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.SubnetFragment; -import com.microsoft.azure.management.devtestlab.ExternalSubnetFragment; -import com.microsoft.azure.management.devtestlab.SubnetOverrideFragment; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A virtual network. - */ -@JsonFlatten -public class VirtualNetworkFragmentInner extends Resource { - /** - * The allowed subnets of the virtual network. - */ - @JsonProperty(value = "properties.allowedSubnets") - private List allowedSubnets; - - /** - * The description of the virtual network. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The Microsoft.Network resource identifier of the virtual network. - */ - @JsonProperty(value = "properties.externalProviderResourceId") - private String externalProviderResourceId; - - /** - * The external subnet properties. - */ - @JsonProperty(value = "properties.externalSubnets") - private List externalSubnets; - - /** - * The subnet overrides of the virtual network. - */ - @JsonProperty(value = "properties.subnetOverrides") - private List subnetOverrides; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the allowedSubnets value. - * - * @return the allowedSubnets value - */ - public List allowedSubnets() { - return this.allowedSubnets; - } - - /** - * Set the allowedSubnets value. - * - * @param allowedSubnets the allowedSubnets value to set - * @return the VirtualNetworkFragmentInner object itself. - */ - public VirtualNetworkFragmentInner withAllowedSubnets(List allowedSubnets) { - this.allowedSubnets = allowedSubnets; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the VirtualNetworkFragmentInner object itself. - */ - public VirtualNetworkFragmentInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the externalProviderResourceId value. - * - * @return the externalProviderResourceId value - */ - public String externalProviderResourceId() { - return this.externalProviderResourceId; - } - - /** - * Set the externalProviderResourceId value. - * - * @param externalProviderResourceId the externalProviderResourceId value to set - * @return the VirtualNetworkFragmentInner object itself. - */ - public VirtualNetworkFragmentInner withExternalProviderResourceId(String externalProviderResourceId) { - this.externalProviderResourceId = externalProviderResourceId; - return this; - } - - /** - * Get the externalSubnets value. - * - * @return the externalSubnets value - */ - public List externalSubnets() { - return this.externalSubnets; - } - - /** - * Set the externalSubnets value. - * - * @param externalSubnets the externalSubnets value to set - * @return the VirtualNetworkFragmentInner object itself. - */ - public VirtualNetworkFragmentInner withExternalSubnets(List externalSubnets) { - this.externalSubnets = externalSubnets; - return this; - } - - /** - * Get the subnetOverrides value. - * - * @return the subnetOverrides value - */ - public List subnetOverrides() { - return this.subnetOverrides; - } - - /** - * Set the subnetOverrides value. - * - * @param subnetOverrides the subnetOverrides value to set - * @return the VirtualNetworkFragmentInner object itself. - */ - public VirtualNetworkFragmentInner withSubnetOverrides(List subnetOverrides) { - this.subnetOverrides = subnetOverrides; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the VirtualNetworkFragmentInner object itself. - */ - public VirtualNetworkFragmentInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the VirtualNetworkFragmentInner object itself. - */ - public VirtualNetworkFragmentInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkInner.java deleted file mode 100644 index 0aa94bda2cf..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkInner.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import java.util.List; -import com.microsoft.azure.management.devtestlab.Subnet; -import com.microsoft.azure.management.devtestlab.ExternalSubnet; -import com.microsoft.azure.management.devtestlab.SubnetOverride; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A virtual network. - */ -@JsonFlatten -public class VirtualNetworkInner extends Resource { - /** - * The allowed subnets of the virtual network. - */ - @JsonProperty(value = "properties.allowedSubnets") - private List allowedSubnets; - - /** - * The description of the virtual network. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * The Microsoft.Network resource identifier of the virtual network. - */ - @JsonProperty(value = "properties.externalProviderResourceId") - private String externalProviderResourceId; - - /** - * The external subnet properties. - */ - @JsonProperty(value = "properties.externalSubnets") - private List externalSubnets; - - /** - * The subnet overrides of the virtual network. - */ - @JsonProperty(value = "properties.subnetOverrides") - private List subnetOverrides; - - /** - * The creation date of the virtual network. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier") - private String uniqueIdentifier; - - /** - * Get the allowedSubnets value. - * - * @return the allowedSubnets value - */ - public List allowedSubnets() { - return this.allowedSubnets; - } - - /** - * Set the allowedSubnets value. - * - * @param allowedSubnets the allowedSubnets value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withAllowedSubnets(List allowedSubnets) { - this.allowedSubnets = allowedSubnets; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the externalProviderResourceId value. - * - * @return the externalProviderResourceId value - */ - public String externalProviderResourceId() { - return this.externalProviderResourceId; - } - - /** - * Set the externalProviderResourceId value. - * - * @param externalProviderResourceId the externalProviderResourceId value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withExternalProviderResourceId(String externalProviderResourceId) { - this.externalProviderResourceId = externalProviderResourceId; - return this; - } - - /** - * Get the externalSubnets value. - * - * @return the externalSubnets value - */ - public List externalSubnets() { - return this.externalSubnets; - } - - /** - * Set the externalSubnets value. - * - * @param externalSubnets the externalSubnets value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withExternalSubnets(List externalSubnets) { - this.externalSubnets = externalSubnets; - return this; - } - - /** - * Get the subnetOverrides value. - * - * @return the subnetOverrides value - */ - public List subnetOverrides() { - return this.subnetOverrides; - } - - /** - * Set the subnetOverrides value. - * - * @param subnetOverrides the subnetOverrides value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withSubnetOverrides(List subnetOverrides) { - this.subnetOverrides = subnetOverrides; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the uniqueIdentifier value. - * - * @return the uniqueIdentifier value - */ - public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** - * Set the uniqueIdentifier value. - * - * @param uniqueIdentifier the uniqueIdentifier value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withUniqueIdentifier(String uniqueIdentifier) { - this.uniqueIdentifier = uniqueIdentifier; - return this; - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworksInner.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworksInner.java deleted file mode 100644 index 7c94afdbcb7..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworksInner.java +++ /dev/null @@ -1,1112 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.devtestlab.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in VirtualNetworks. - */ -public class VirtualNetworksInner { - /** The Retrofit service to perform REST calls. */ - private VirtualNetworksService service; - /** The service client containing this operation class. */ - private DevTestLabsClientImpl client; - - /** - * Initializes an instance of VirtualNetworksInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public VirtualNetworksInner(Retrofit retrofit, DevTestLabsClientImpl client) { - this.service = retrofit.create(VirtualNetworksService.class); - this.client = client; - } - - /** - * The interface defining all the services for VirtualNetworks to be - * used by Retrofit to perform actually REST calls. - */ - interface VirtualNetworksService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualNetworks list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualNetworks get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualNetworks createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body VirtualNetworkInner virtualNetwork, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualNetworks beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}") - Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body VirtualNetworkInner virtualNetwork, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualNetworks delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualNetworks beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualNetworks update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Body VirtualNetworkFragmentInner virtualNetwork, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualNetworks listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<VirtualNetworkInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName) { - return listWithServiceResponseAsync(resourceGroupName, labName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName) { - return listSinglePageAsync(resourceGroupName, labName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<VirtualNetworkInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - final String filter = null; - final Integer top = null; - final String orderby = null; - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<VirtualNetworkInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listWithServiceResponseAsync(resourceGroupName, labName, expand, filter, top, orderby) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List virtual networks in a given lab. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - * @param filter The filter to apply to the operation. - * @param top The maximum number of resources to return from the operation. - * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - return listSinglePageAsync(resourceGroupName, labName, expand, filter, top, orderby) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List virtual networks in a given lab. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param labName The name of the lab. - ServiceResponse> * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - ServiceResponse> * @param filter The filter to apply to the operation. - ServiceResponse> * @param top The maximum number of resources to return from the operation. - ServiceResponse> * @param orderby The ordering expression for the results, using OData notation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<VirtualNetworkInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, labName, expand, filter, top, orderby, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get virtual network. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner get(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Get virtual network. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Get virtual network. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name) { - return getWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get virtual network. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String expand = null; - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get virtual network. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner get(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).toBlocking().single().body(); - } - - /** - * Get virtual network. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String labName, String name, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name, expand), serviceCallback); - } - - /** - * Get virtual network. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable getAsync(String resourceGroupName, String labName, String name, String expand) { - return getWithServiceResponseAsync(resourceGroupName, labName, name, expand).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get virtual network. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param expand Specify the $expand query. Example: 'properties($expand=externalSubnets)' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, labName, name, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace an existing virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner createOrUpdate(String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork).toBlocking().last().body(); - } - - /** - * Create or replace an existing virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork), serviceCallback); - } - - /** - * Create or replace an existing virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (virtualNetwork == null) { - throw new IllegalArgumentException("Parameter virtualNetwork is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(virtualNetwork); - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, virtualNetwork, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or replace an existing virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner beginCreateOrUpdate(String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork).toBlocking().single().body(); - } - - /** - * Create or replace an existing virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork), serviceCallback); - } - - /** - * Create or replace an existing virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace an existing virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (virtualNetwork == null) { - throw new IllegalArgumentException("Parameter virtualNetwork is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(virtualNetwork); - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, labName, name, virtualNetwork, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String labName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().last().body(); - } - - /** - * Delete virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String labName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String labName, String name) { - beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name).toBlocking().single().body(); - } - - /** - * Delete virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String labName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); - } - - /** - * Delete virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String labName, String name) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, labName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete virtual network. This operation can take a while to complete. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String labName, String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, labName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modify properties of virtual networks. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner update(String resourceGroupName, String labName, String name, VirtualNetworkFragmentInner virtualNetwork) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork).toBlocking().single().body(); - } - - /** - * Modify properties of virtual networks. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String labName, String name, VirtualNetworkFragmentInner virtualNetwork, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork), serviceCallback); - } - - /** - * Modify properties of virtual networks. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable updateAsync(String resourceGroupName, String labName, String name, VirtualNetworkFragmentInner virtualNetwork) { - return updateWithServiceResponseAsync(resourceGroupName, labName, name, virtualNetwork).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modify properties of virtual networks. - * - * @param resourceGroupName The name of the resource group. - * @param labName The name of the lab. - * @param name The name of the virtual network. - * @param virtualNetwork A virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String labName, String name, VirtualNetworkFragmentInner virtualNetwork) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (labName == null) { - throw new IllegalArgumentException("Parameter labName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (virtualNetwork == null) { - throw new IllegalArgumentException("Parameter virtualNetwork is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(virtualNetwork); - return service.update(this.client.subscriptionId(), resourceGroupName, labName, name, virtualNetwork, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List virtual networks in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<VirtualNetworkInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List virtual networks in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List virtual networks in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List virtual networks in a given lab. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List virtual networks in a given lab. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<VirtualNetworkInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/package-info.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/package-info.java deleted file mode 100644 index 6fdd745c14c..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for DevTestLabsClient. - * The DevTest Labs Client. - */ -package com.microsoft.azure.management.devtestlab.implementation; diff --git a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/package-info.java b/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/package-info.java deleted file mode 100644 index e5246fc890f..00000000000 --- a/azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for DevTestLabsClient. - * The DevTest Labs Client. - */ -package com.microsoft.azure.management.devtestlab; diff --git a/azure-mgmt-insights/pom.xml b/azure-mgmt-insights/pom.xml deleted file mode 100644 index 5c4393815b2..00000000000 --- a/azure-mgmt-insights/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-insights - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for Insights Management - This package contains Microsoft Insights Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/AutoscaleNotification.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/AutoscaleNotification.java deleted file mode 100644 index fcd7df9a8c0..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/AutoscaleNotification.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Autoscale notification. - */ -public class AutoscaleNotification { - /** - * the operation associated with the notification and its value must be - * "scale". - */ - @JsonProperty(value = "operation", required = true) - private String operation; - - /** - * the email notification. - */ - @JsonProperty(value = "email") - private EmailNotification email; - - /** - * the collection of webhook notifications. - */ - @JsonProperty(value = "webhooks") - private List webhooks; - - /** - * Creates an instance of AutoscaleNotification class. - */ - public AutoscaleNotification() { - operation = "Scale"; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the AutoscaleNotification object itself. - */ - public AutoscaleNotification withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the email value. - * - * @return the email value - */ - public EmailNotification email() { - return this.email; - } - - /** - * Set the email value. - * - * @param email the email value to set - * @return the AutoscaleNotification object itself. - */ - public AutoscaleNotification withEmail(EmailNotification email) { - this.email = email; - return this; - } - - /** - * Get the webhooks value. - * - * @return the webhooks value - */ - public List webhooks() { - return this.webhooks; - } - - /** - * Set the webhooks value. - * - * @param webhooks the webhooks value to set - * @return the AutoscaleNotification object itself. - */ - public AutoscaleNotification withWebhooks(List webhooks) { - this.webhooks = webhooks; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/AutoscaleProfile.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/AutoscaleProfile.java deleted file mode 100644 index 9da1912be88..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/AutoscaleProfile.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Autoscale profile. - */ -public class AutoscaleProfile { - /** - * the name of the profile. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * the number of instances that can be used during this profile. - */ - @JsonProperty(value = "capacity", required = true) - private ScaleCapacity capacity; - - /** - * the collection of rules that provide the triggers and parameters for the - * scaling action. A maximum of 10 rules can be specified. - */ - @JsonProperty(value = "rules", required = true) - private List rules; - - /** - * the specific date-time for the profile. This element is not used if the - * Recurrence element is used. - */ - @JsonProperty(value = "fixedDate") - private TimeWindow fixedDate; - - /** - * the repeating times at which this profile begins. This element is not - * used if the FixedDate element is used. - */ - @JsonProperty(value = "recurrence") - private Recurrence recurrence; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withName(String name) { - this.name = name; - return this; - } - - /** - * Get the capacity value. - * - * @return the capacity value - */ - public ScaleCapacity capacity() { - return this.capacity; - } - - /** - * Set the capacity value. - * - * @param capacity the capacity value to set - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withCapacity(ScaleCapacity capacity) { - this.capacity = capacity; - return this; - } - - /** - * Get the rules value. - * - * @return the rules value - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules value. - * - * @param rules the rules value to set - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * Get the fixedDate value. - * - * @return the fixedDate value - */ - public TimeWindow fixedDate() { - return this.fixedDate; - } - - /** - * Set the fixedDate value. - * - * @param fixedDate the fixedDate value to set - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withFixedDate(TimeWindow fixedDate) { - this.fixedDate = fixedDate; - return this; - } - - /** - * Get the recurrence value. - * - * @return the recurrence value - */ - public Recurrence recurrence() { - return this.recurrence; - } - - /** - * Set the recurrence value. - * - * @param recurrence the recurrence value to set - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withRecurrence(Recurrence recurrence) { - this.recurrence = recurrence; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ComparisonOperationType.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ComparisonOperationType.java deleted file mode 100644 index 45f71862a0e..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ComparisonOperationType.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ComparisonOperationType. - */ -public enum ComparisonOperationType { - /** Enum value Equals. */ - EQUALS("Equals"), - - /** Enum value NotEquals. */ - NOT_EQUALS("NotEquals"), - - /** Enum value GreaterThan. */ - GREATER_THAN("GreaterThan"), - - /** Enum value GreaterThanOrEqual. */ - GREATER_THAN_OR_EQUAL("GreaterThanOrEqual"), - - /** Enum value LessThan. */ - LESS_THAN("LessThan"), - - /** Enum value LessThanOrEqual. */ - LESS_THAN_OR_EQUAL("LessThanOrEqual"); - - /** The actual serialized value for a ComparisonOperationType instance. */ - private String value; - - ComparisonOperationType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ComparisonOperationType instance. - * - * @param value the serialized value to parse. - * @return the parsed ComparisonOperationType object, or null if unable to parse. - */ - @JsonCreator - public static ComparisonOperationType fromString(String value) { - ComparisonOperationType[] items = ComparisonOperationType.values(); - for (ComparisonOperationType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ConditionOperator.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ConditionOperator.java deleted file mode 100644 index 92bd3998393..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ConditionOperator.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ConditionOperator. - */ -public enum ConditionOperator { - /** Enum value GreaterThan. */ - GREATER_THAN("GreaterThan"), - - /** Enum value GreaterThanOrEqual. */ - GREATER_THAN_OR_EQUAL("GreaterThanOrEqual"), - - /** Enum value LessThan. */ - LESS_THAN("LessThan"), - - /** Enum value LessThanOrEqual. */ - LESS_THAN_OR_EQUAL("LessThanOrEqual"); - - /** The actual serialized value for a ConditionOperator instance. */ - private String value; - - ConditionOperator(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ConditionOperator instance. - * - * @param value the serialized value to parse. - * @return the parsed ConditionOperator object, or null if unable to parse. - */ - @JsonCreator - public static ConditionOperator fromString(String value) { - ConditionOperator[] items = ConditionOperator.values(); - for (ConditionOperator item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/EmailNotification.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/EmailNotification.java deleted file mode 100644 index 8eff1088f24..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/EmailNotification.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Email notification of an autoscale event. - */ -public class EmailNotification { - /** - * a value indicating whether to send email to subscription administrator. - */ - @JsonProperty(value = "sendToSubscriptionAdministrator") - private Boolean sendToSubscriptionAdministrator; - - /** - * a value indicating whether to send email to subscription - * co-administrators. - */ - @JsonProperty(value = "sendToSubscriptionCoAdministrators") - private Boolean sendToSubscriptionCoAdministrators; - - /** - * the custom e-mails list. This value can be null or empty, in which case - * this attribute will be ignored. - */ - @JsonProperty(value = "customEmails") - private List customEmails; - - /** - * Get the sendToSubscriptionAdministrator value. - * - * @return the sendToSubscriptionAdministrator value - */ - public Boolean sendToSubscriptionAdministrator() { - return this.sendToSubscriptionAdministrator; - } - - /** - * Set the sendToSubscriptionAdministrator value. - * - * @param sendToSubscriptionAdministrator the sendToSubscriptionAdministrator value to set - * @return the EmailNotification object itself. - */ - public EmailNotification withSendToSubscriptionAdministrator(Boolean sendToSubscriptionAdministrator) { - this.sendToSubscriptionAdministrator = sendToSubscriptionAdministrator; - return this; - } - - /** - * Get the sendToSubscriptionCoAdministrators value. - * - * @return the sendToSubscriptionCoAdministrators value - */ - public Boolean sendToSubscriptionCoAdministrators() { - return this.sendToSubscriptionCoAdministrators; - } - - /** - * Set the sendToSubscriptionCoAdministrators value. - * - * @param sendToSubscriptionCoAdministrators the sendToSubscriptionCoAdministrators value to set - * @return the EmailNotification object itself. - */ - public EmailNotification withSendToSubscriptionCoAdministrators(Boolean sendToSubscriptionCoAdministrators) { - this.sendToSubscriptionCoAdministrators = sendToSubscriptionCoAdministrators; - return this; - } - - /** - * Get the customEmails value. - * - * @return the customEmails value - */ - public List customEmails() { - return this.customEmails; - } - - /** - * Set the customEmails value. - * - * @param customEmails the customEmails value to set - * @return the EmailNotification object itself. - */ - public EmailNotification withCustomEmails(List customEmails) { - this.customEmails = customEmails; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/LocationThresholdRuleCondition.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/LocationThresholdRuleCondition.java deleted file mode 100644 index 16b7bdecafd..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/LocationThresholdRuleCondition.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * A rule condition based on a certain number of locations failing. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition") -public class LocationThresholdRuleCondition extends RuleCondition { - /** - * the resource from which the rule collects its data. For this type - * dataSource will always be of type RuleMetricDataSource. - */ - @JsonProperty(value = "dataSource") - private RuleDataSource dataSource; - - /** - * the period of time (in ISO 8601 duration format) that is used to monitor - * alert activity based on the threshold. If specified then it must be - * between 5 minutes and 1 day. - */ - @JsonProperty(value = "windowSize") - private Period windowSize; - - /** - * the number of locations that must fail to activate the alert. - */ - @JsonProperty(value = "failedLocationCount", required = true) - private int failedLocationCount; - - /** - * Get the dataSource value. - * - * @return the dataSource value - */ - public RuleDataSource dataSource() { - return this.dataSource; - } - - /** - * Set the dataSource value. - * - * @param dataSource the dataSource value to set - * @return the LocationThresholdRuleCondition object itself. - */ - public LocationThresholdRuleCondition withDataSource(RuleDataSource dataSource) { - this.dataSource = dataSource; - return this; - } - - /** - * Get the windowSize value. - * - * @return the windowSize value - */ - public Period windowSize() { - return this.windowSize; - } - - /** - * Set the windowSize value. - * - * @param windowSize the windowSize value to set - * @return the LocationThresholdRuleCondition object itself. - */ - public LocationThresholdRuleCondition withWindowSize(Period windowSize) { - this.windowSize = windowSize; - return this; - } - - /** - * Get the failedLocationCount value. - * - * @return the failedLocationCount value - */ - public int failedLocationCount() { - return this.failedLocationCount; - } - - /** - * Set the failedLocationCount value. - * - * @param failedLocationCount the failedLocationCount value to set - * @return the LocationThresholdRuleCondition object itself. - */ - public LocationThresholdRuleCondition withFailedLocationCount(int failedLocationCount) { - this.failedLocationCount = failedLocationCount; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/LogSettings.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/LogSettings.java deleted file mode 100644 index 7969e7afc9b..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/LogSettings.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Part of MultiTenantDiagnosticSettings. Specifies the settings for a - * particular log. - */ -public class LogSettings { - /** - * Name of a Diagnostic Log category for a resource type this setting is - * applied to. To obtain the list of Diagnostic Log categories for a - * resource, first perform a GET diagnostic settings operation. - */ - @JsonProperty(value = "category") - private String category; - - /** - * a value indicating whether this log is enabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /** - * the retention policy for this log. - */ - @JsonProperty(value = "retentionPolicy") - private RetentionPolicy retentionPolicy; - - /** - * Get the category value. - * - * @return the category value - */ - public String category() { - return this.category; - } - - /** - * Set the category value. - * - * @param category the category value to set - * @return the LogSettings object itself. - */ - public LogSettings withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the LogSettings object itself. - */ - public LogSettings withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the retentionPolicy value. - * - * @return the retentionPolicy value - */ - public RetentionPolicy retentionPolicy() { - return this.retentionPolicy; - } - - /** - * Set the retentionPolicy value. - * - * @param retentionPolicy the retentionPolicy value to set - * @return the LogSettings object itself. - */ - public LogSettings withRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ManagementEventAggregationCondition.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ManagementEventAggregationCondition.java deleted file mode 100644 index b9cf219891f..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ManagementEventAggregationCondition.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * How the data that is collected should be combined over time. - */ -public class ManagementEventAggregationCondition { - /** - * the condition operator. Possible values include: 'GreaterThan', - * 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'. - */ - @JsonProperty(value = "operator") - private ConditionOperator operator; - - /** - * The threshold value that activates the alert. - */ - @JsonProperty(value = "threshold") - private Double threshold; - - /** - * the period of time (in ISO 8601 duration format) that is used to monitor - * alert activity based on the threshold. If specified then it must be - * between 5 minutes and 1 day. - */ - @JsonProperty(value = "windowSize") - private Period windowSize; - - /** - * Get the operator value. - * - * @return the operator value - */ - public ConditionOperator operator() { - return this.operator; - } - - /** - * Set the operator value. - * - * @param operator the operator value to set - * @return the ManagementEventAggregationCondition object itself. - */ - public ManagementEventAggregationCondition withOperator(ConditionOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the threshold value. - * - * @return the threshold value - */ - public Double threshold() { - return this.threshold; - } - - /** - * Set the threshold value. - * - * @param threshold the threshold value to set - * @return the ManagementEventAggregationCondition object itself. - */ - public ManagementEventAggregationCondition withThreshold(Double threshold) { - this.threshold = threshold; - return this; - } - - /** - * Get the windowSize value. - * - * @return the windowSize value - */ - public Period windowSize() { - return this.windowSize; - } - - /** - * Set the windowSize value. - * - * @param windowSize the windowSize value to set - * @return the ManagementEventAggregationCondition object itself. - */ - public ManagementEventAggregationCondition withWindowSize(Period windowSize) { - this.windowSize = windowSize; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ManagementEventRuleCondition.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ManagementEventRuleCondition.java deleted file mode 100644 index fd449c19220..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ManagementEventRuleCondition.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * A management event rule condition. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition") -public class ManagementEventRuleCondition extends RuleCondition { - /** - * the resource from which the rule collects its data. For this type - * dataSource will always be of type RuleManagementEventDataSource. - */ - @JsonProperty(value = "dataSource") - private RuleDataSource dataSource; - - /** - * How the data that is collected should be combined over time and when the - * alert is activated. Note that for management event alerts aggregation is - * optional – if it is not provided then any event will cause the alert to - * activate. - */ - @JsonProperty(value = "aggregation") - private ManagementEventAggregationCondition aggregation; - - /** - * Get the dataSource value. - * - * @return the dataSource value - */ - public RuleDataSource dataSource() { - return this.dataSource; - } - - /** - * Set the dataSource value. - * - * @param dataSource the dataSource value to set - * @return the ManagementEventRuleCondition object itself. - */ - public ManagementEventRuleCondition withDataSource(RuleDataSource dataSource) { - this.dataSource = dataSource; - return this; - } - - /** - * Get the aggregation value. - * - * @return the aggregation value - */ - public ManagementEventAggregationCondition aggregation() { - return this.aggregation; - } - - /** - * Set the aggregation value. - * - * @param aggregation the aggregation value to set - * @return the ManagementEventRuleCondition object itself. - */ - public ManagementEventRuleCondition withAggregation(ManagementEventAggregationCondition aggregation) { - this.aggregation = aggregation; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricSettings.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricSettings.java deleted file mode 100644 index ea606588a7a..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricSettings.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Part of MultiTenantDiagnosticSettings. Specifies the settings for a - * particular metric. - */ -public class MetricSettings { - /** - * the timegrain of the metric in ISO8601 format. - */ - @JsonProperty(value = "timeGrain", required = true) - private Period timeGrain; - - /** - * a value indicating whether this timegrain is enabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /** - * the retention policy for this timegrain. - */ - @JsonProperty(value = "retentionPolicy") - private RetentionPolicy retentionPolicy; - - /** - * Get the timeGrain value. - * - * @return the timeGrain value - */ - public Period timeGrain() { - return this.timeGrain; - } - - /** - * Set the timeGrain value. - * - * @param timeGrain the timeGrain value to set - * @return the MetricSettings object itself. - */ - public MetricSettings withTimeGrain(Period timeGrain) { - this.timeGrain = timeGrain; - return this; - } - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the MetricSettings object itself. - */ - public MetricSettings withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the retentionPolicy value. - * - * @return the retentionPolicy value - */ - public RetentionPolicy retentionPolicy() { - return this.retentionPolicy; - } - - /** - * Set the retentionPolicy value. - * - * @param retentionPolicy the retentionPolicy value to set - * @return the MetricSettings object itself. - */ - public MetricSettings withRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricStatisticType.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricStatisticType.java deleted file mode 100644 index 1e86cec137d..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricStatisticType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for MetricStatisticType. - */ -public enum MetricStatisticType { - /** Enum value Average. */ - AVERAGE("Average"), - - /** Enum value Min. */ - MIN("Min"), - - /** Enum value Max. */ - MAX("Max"), - - /** Enum value Sum. */ - SUM("Sum"); - - /** The actual serialized value for a MetricStatisticType instance. */ - private String value; - - MetricStatisticType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a MetricStatisticType instance. - * - * @param value the serialized value to parse. - * @return the parsed MetricStatisticType object, or null if unable to parse. - */ - @JsonCreator - public static MetricStatisticType fromString(String value) { - MetricStatisticType[] items = MetricStatisticType.values(); - for (MetricStatisticType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricTrigger.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricTrigger.java deleted file mode 100644 index 8362990409a..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/MetricTrigger.java +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The trigger that results in a scaling action. - */ -public class MetricTrigger { - /** - * the name of the metric that defines what the rule monitors. - */ - @JsonProperty(value = "metricName", required = true) - private String metricName; - - /** - * the resource identifier of the resource the rule monitors. - */ - @JsonProperty(value = "metricResourceUri", required = true) - private String metricResourceUri; - - /** - * the granularity of metrics the rule monitors. Must be one of the - * predefined values returned from metric definitions for the metric. Must - * be between 12 hours and 1 minute. - */ - @JsonProperty(value = "timeGrain", required = true) - private Period timeGrain; - - /** - * the metric statistic type. How the metrics from multiple instances are - * combined. Possible values include: 'Average', 'Min', 'Max', 'Sum'. - */ - @JsonProperty(value = "statistic", required = true) - private MetricStatisticType statistic; - - /** - * the range of time in which instance data is collected. This value must - * be greater than the delay in metric collection, which can vary from - * resource-to-resource. Must be between 12 hours and 5 minutes. - */ - @JsonProperty(value = "timeWindow", required = true) - private Period timeWindow; - - /** - * time aggregation type. How the data that is collected should be combined - * over time. The default value is Average. Possible values include: - * 'Average', 'Minimum', 'Maximum', 'Total', 'Count'. - */ - @JsonProperty(value = "timeAggregation", required = true) - private TimeAggregationType timeAggregation; - - /** - * the operator that is used to compare the metric data and the threshold. - * Possible values include: 'Equals', 'NotEquals', 'GreaterThan', - * 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'. - */ - @JsonProperty(value = "operator", required = true) - private ComparisonOperationType operator; - - /** - * the threshold of the metric that triggers the scale action. - */ - @JsonProperty(value = "threshold", required = true) - private double threshold; - - /** - * Get the metricName value. - * - * @return the metricName value - */ - public String metricName() { - return this.metricName; - } - - /** - * Set the metricName value. - * - * @param metricName the metricName value to set - * @return the MetricTrigger object itself. - */ - public MetricTrigger withMetricName(String metricName) { - this.metricName = metricName; - return this; - } - - /** - * Get the metricResourceUri value. - * - * @return the metricResourceUri value - */ - public String metricResourceUri() { - return this.metricResourceUri; - } - - /** - * Set the metricResourceUri value. - * - * @param metricResourceUri the metricResourceUri value to set - * @return the MetricTrigger object itself. - */ - public MetricTrigger withMetricResourceUri(String metricResourceUri) { - this.metricResourceUri = metricResourceUri; - return this; - } - - /** - * Get the timeGrain value. - * - * @return the timeGrain value - */ - public Period timeGrain() { - return this.timeGrain; - } - - /** - * Set the timeGrain value. - * - * @param timeGrain the timeGrain value to set - * @return the MetricTrigger object itself. - */ - public MetricTrigger withTimeGrain(Period timeGrain) { - this.timeGrain = timeGrain; - return this; - } - - /** - * Get the statistic value. - * - * @return the statistic value - */ - public MetricStatisticType statistic() { - return this.statistic; - } - - /** - * Set the statistic value. - * - * @param statistic the statistic value to set - * @return the MetricTrigger object itself. - */ - public MetricTrigger withStatistic(MetricStatisticType statistic) { - this.statistic = statistic; - return this; - } - - /** - * Get the timeWindow value. - * - * @return the timeWindow value - */ - public Period timeWindow() { - return this.timeWindow; - } - - /** - * Set the timeWindow value. - * - * @param timeWindow the timeWindow value to set - * @return the MetricTrigger object itself. - */ - public MetricTrigger withTimeWindow(Period timeWindow) { - this.timeWindow = timeWindow; - return this; - } - - /** - * Get the timeAggregation value. - * - * @return the timeAggregation value - */ - public TimeAggregationType timeAggregation() { - return this.timeAggregation; - } - - /** - * Set the timeAggregation value. - * - * @param timeAggregation the timeAggregation value to set - * @return the MetricTrigger object itself. - */ - public MetricTrigger withTimeAggregation(TimeAggregationType timeAggregation) { - this.timeAggregation = timeAggregation; - return this; - } - - /** - * Get the operator value. - * - * @return the operator value - */ - public ComparisonOperationType operator() { - return this.operator; - } - - /** - * Set the operator value. - * - * @param operator the operator value to set - * @return the MetricTrigger object itself. - */ - public MetricTrigger withOperator(ComparisonOperationType operator) { - this.operator = operator; - return this; - } - - /** - * Get the threshold value. - * - * @return the threshold value - */ - public double threshold() { - return this.threshold; - } - - /** - * Set the threshold value. - * - * @param threshold the threshold value to set - * @return the MetricTrigger object itself. - */ - public MetricTrigger withThreshold(double threshold) { - this.threshold = threshold; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/Recurrence.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/Recurrence.java deleted file mode 100644 index 882e016882c..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/Recurrence.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The repeating times at which this profile begins. This element is not used - * if the FixedDate element is used. - */ -public class Recurrence { - /** - * the recurrence frequency. How often the schedule profile should take - * effect. This value must be Week, meaning each week will have the same - * set of profiles. Possible values include: 'None', 'Second', 'Minute', - * 'Hour', 'Day', 'Week', 'Month', 'Year'. - */ - @JsonProperty(value = "frequency", required = true) - private RecurrenceFrequency frequency; - - /** - * the scheduling constraints for when the profile begins. - */ - @JsonProperty(value = "schedule", required = true) - private RecurrentSchedule schedule; - - /** - * Get the frequency value. - * - * @return the frequency value - */ - public RecurrenceFrequency frequency() { - return this.frequency; - } - - /** - * Set the frequency value. - * - * @param frequency the frequency value to set - * @return the Recurrence object itself. - */ - public Recurrence withFrequency(RecurrenceFrequency frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the schedule value. - * - * @return the schedule value - */ - public RecurrentSchedule schedule() { - return this.schedule; - } - - /** - * Set the schedule value. - * - * @param schedule the schedule value to set - * @return the Recurrence object itself. - */ - public Recurrence withSchedule(RecurrentSchedule schedule) { - this.schedule = schedule; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrenceFrequency.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrenceFrequency.java deleted file mode 100644 index 6ebabca4c3f..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrenceFrequency.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for RecurrenceFrequency. - */ -public enum RecurrenceFrequency { - /** Enum value None. */ - NONE("None"), - - /** Enum value Second. */ - SECOND("Second"), - - /** Enum value Minute. */ - MINUTE("Minute"), - - /** Enum value Hour. */ - HOUR("Hour"), - - /** Enum value Day. */ - DAY("Day"), - - /** Enum value Week. */ - WEEK("Week"), - - /** Enum value Month. */ - MONTH("Month"), - - /** Enum value Year. */ - YEAR("Year"); - - /** The actual serialized value for a RecurrenceFrequency instance. */ - private String value; - - RecurrenceFrequency(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a RecurrenceFrequency instance. - * - * @param value the serialized value to parse. - * @return the parsed RecurrenceFrequency object, or null if unable to parse. - */ - @JsonCreator - public static RecurrenceFrequency fromString(String value) { - RecurrenceFrequency[] items = RecurrenceFrequency.values(); - for (RecurrenceFrequency item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrentSchedule.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrentSchedule.java deleted file mode 100644 index 72d1fa88b4a..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrentSchedule.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The scheduling constraints for when the profile begins. - */ -public class RecurrentSchedule { - /** - * the timezone for the hours of the profile. Some examples of valid - * timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, - * Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard - * Time, US Mountain Standard Time, Mountain Standard Time (Mexico), - * Mountain Standard Time, Central America Standard Time, Central Standard - * Time, Central Standard Time (Mexico), Canada Central Standard Time, SA - * Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, - * Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, - * Central Brazilian Standard Time, SA Western Standard Time, Pacific SA - * Standard Time, Newfoundland Standard Time, E. South America Standard - * Time, Argentina Standard Time, SA Eastern Standard Time, Greenland - * Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, - * Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard - * Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard - * Time, W. Europe Standard Time, Central Europe Standard Time, Romance - * Standard Time, Central European Standard Time, W. Central Africa - * Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard - * Time, Middle East Standard Time, Egypt Standard Time, Syria Standard - * Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard - * Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard - * Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, - * Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, - * Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, - * Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, - * Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard - * Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard - * Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia - * Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, - * Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, - * China Standard Time, North Asia East Standard Time, Singapore Standard - * Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar - * Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk - * Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, - * E. Australia Standard Time, AUS Eastern Standard Time, West Pacific - * Standard Time, Tasmania Standard Time, Magadan Standard Time, - * Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard - * Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji - * Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa - * Standard Time, Line Islands Standard Time. - */ - @JsonProperty(value = "timeZone", required = true) - private String timeZone; - - /** - * the collection of days that the profile takes effect on. Possible values - * are Sunday through Saturday. - */ - @JsonProperty(value = "days", required = true) - private List days; - - /** - * A collection of hours that the profile takes effect on. Values supported - * are 0 to 23 on the 24-hour clock (AM/PM times are not supported). - */ - @JsonProperty(value = "hours", required = true) - private List hours; - - /** - * A collection of minutes at which the profile takes effect at. - */ - @JsonProperty(value = "minutes", required = true) - private List minutes; - - /** - * Get the timeZone value. - * - * @return the timeZone value - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone value. - * - * @param timeZone the timeZone value to set - * @return the RecurrentSchedule object itself. - */ - public RecurrentSchedule withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Get the days value. - * - * @return the days value - */ - public List days() { - return this.days; - } - - /** - * Set the days value. - * - * @param days the days value to set - * @return the RecurrentSchedule object itself. - */ - public RecurrentSchedule withDays(List days) { - this.days = days; - return this; - } - - /** - * Get the hours value. - * - * @return the hours value - */ - public List hours() { - return this.hours; - } - - /** - * Set the hours value. - * - * @param hours the hours value to set - * @return the RecurrentSchedule object itself. - */ - public RecurrentSchedule withHours(List hours) { - this.hours = hours; - return this; - } - - /** - * Get the minutes value. - * - * @return the minutes value - */ - public List minutes() { - return this.minutes; - } - - /** - * Set the minutes value. - * - * @param minutes the minutes value to set - * @return the RecurrentSchedule object itself. - */ - public RecurrentSchedule withMinutes(List minutes) { - this.minutes = minutes; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RetentionPolicy.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RetentionPolicy.java deleted file mode 100644 index 1484d57838c..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RetentionPolicy.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Specifies the retention policy for the log. - */ -public class RetentionPolicy { - /** - * a value indicating whether the retention policy is enabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /** - * the number of days for the retention in days. A value of 0 will retain - * the events indefinitely. - */ - @JsonProperty(value = "days", required = true) - private int days; - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the RetentionPolicy object itself. - */ - public RetentionPolicy withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the days value. - * - * @return the days value - */ - public int days() { - return this.days; - } - - /** - * Set the days value. - * - * @param days the days value to set - * @return the RetentionPolicy object itself. - */ - public RetentionPolicy withDays(int days) { - this.days = days; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleAction.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleAction.java deleted file mode 100644 index 08f30f3182b..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleAction.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * The action that is performed when the alert rule becomes active, and when an - * alert condition is resolved. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("RuleAction") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", value = RuleEmailAction.class), - @JsonSubTypes.Type(name = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", value = RuleWebhookAction.class) -}) -public class RuleAction { -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleCondition.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleCondition.java deleted file mode 100644 index 4ea18cce3b5..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleCondition.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * The condition that results in the alert rule being activated. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("RuleCondition") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", value = ThresholdRuleCondition.class), - @JsonSubTypes.Type(name = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition", value = LocationThresholdRuleCondition.class), - @JsonSubTypes.Type(name = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition", value = ManagementEventRuleCondition.class) -}) -public class RuleCondition { -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleDataSource.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleDataSource.java deleted file mode 100644 index e26fa55dfb3..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleDataSource.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * The resource from which the rule collects its data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("RuleDataSource") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", value = RuleMetricDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource", value = RuleManagementEventDataSource.class) -}) -public class RuleDataSource { -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleEmailAction.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleEmailAction.java deleted file mode 100644 index 92c12024c7d..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleEmailAction.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Specifies the action to send email when the rule condition is evaluated. The - * discriminator is always RuleEmailAction in this case. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("Microsoft.Azure.Management.Insights.Models.RuleEmailAction") -public class RuleEmailAction extends RuleAction { - /** - * Whether the administrators (service and co-adiminstrators) of the - * service should be notified when the alert is activated. - */ - @JsonProperty(value = "sendToServiceOwners") - private Boolean sendToServiceOwners; - - /** - * the list of administrator's custom email addresses notifiy of the - * activation of the alert. - */ - @JsonProperty(value = "customEmails") - private List customEmails; - - /** - * Get the sendToServiceOwners value. - * - * @return the sendToServiceOwners value - */ - public Boolean sendToServiceOwners() { - return this.sendToServiceOwners; - } - - /** - * Set the sendToServiceOwners value. - * - * @param sendToServiceOwners the sendToServiceOwners value to set - * @return the RuleEmailAction object itself. - */ - public RuleEmailAction withSendToServiceOwners(Boolean sendToServiceOwners) { - this.sendToServiceOwners = sendToServiceOwners; - return this; - } - - /** - * Get the customEmails value. - * - * @return the customEmails value - */ - public List customEmails() { - return this.customEmails; - } - - /** - * Set the customEmails value. - * - * @param customEmails the customEmails value to set - * @return the RuleEmailAction object itself. - */ - public RuleEmailAction withCustomEmails(List customEmails) { - this.customEmails = customEmails; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleManagementEventClaimsDataSource.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleManagementEventClaimsDataSource.java deleted file mode 100644 index e7dd328abe1..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleManagementEventClaimsDataSource.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The claims for a rule management event data source. - */ -public class RuleManagementEventClaimsDataSource { - /** - * the email address. - */ - @JsonProperty(value = "emailAddress") - private String emailAddress; - - /** - * Get the emailAddress value. - * - * @return the emailAddress value - */ - public String emailAddress() { - return this.emailAddress; - } - - /** - * Set the emailAddress value. - * - * @param emailAddress the emailAddress value to set - * @return the RuleManagementEventClaimsDataSource object itself. - */ - public RuleManagementEventClaimsDataSource withEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleManagementEventDataSource.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleManagementEventDataSource.java deleted file mode 100644 index 233a72dc463..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleManagementEventDataSource.java +++ /dev/null @@ -1,284 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * A rule management event data source. The discriminator fields is always - * RuleManagementEventDataSource in this case. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource") -public class RuleManagementEventDataSource extends RuleDataSource { - /** - * the event name. - */ - @JsonProperty(value = "eventName") - private String eventName; - - /** - * the event source. - */ - @JsonProperty(value = "eventSource") - private String eventSource; - - /** - * the level. - */ - @JsonProperty(value = "level") - private String level; - - /** - * The name of the operation that should be checked for. If no name is - * provided, any operation will match. - */ - @JsonProperty(value = "operationName") - private String operationName; - - /** - * the resource group name. - */ - @JsonProperty(value = "resourceGroupName") - private String resourceGroupName; - - /** - * the resource provider name. - */ - @JsonProperty(value = "resourceProviderName") - private String resourceProviderName; - - /** - * the resource uri. - */ - @JsonProperty(value = "resourceUri") - private String resourceUri; - - /** - * The status of the operation that should be checked for. If no status is - * provided, any status will match. - */ - @JsonProperty(value = "status") - private String status; - - /** - * the substatus. - */ - @JsonProperty(value = "subStatus") - private String subStatus; - - /** - * the claims. - */ - @JsonProperty(value = "claims") - private RuleManagementEventClaimsDataSource claims; - - /** - * Get the eventName value. - * - * @return the eventName value - */ - public String eventName() { - return this.eventName; - } - - /** - * Set the eventName value. - * - * @param eventName the eventName value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Get the eventSource value. - * - * @return the eventSource value - */ - public String eventSource() { - return this.eventSource; - } - - /** - * Set the eventSource value. - * - * @param eventSource the eventSource value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withEventSource(String eventSource) { - this.eventSource = eventSource; - return this; - } - - /** - * Get the level value. - * - * @return the level value - */ - public String level() { - return this.level; - } - - /** - * Set the level value. - * - * @param level the level value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withLevel(String level) { - this.level = level; - return this; - } - - /** - * Get the operationName value. - * - * @return the operationName value - */ - public String operationName() { - return this.operationName; - } - - /** - * Set the operationName value. - * - * @param operationName the operationName value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withOperationName(String operationName) { - this.operationName = operationName; - return this; - } - - /** - * Get the resourceGroupName value. - * - * @return the resourceGroupName value - */ - public String resourceGroupName() { - return this.resourceGroupName; - } - - /** - * Set the resourceGroupName value. - * - * @param resourceGroupName the resourceGroupName value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withResourceGroupName(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - /** - * Get the resourceProviderName value. - * - * @return the resourceProviderName value - */ - public String resourceProviderName() { - return this.resourceProviderName; - } - - /** - * Set the resourceProviderName value. - * - * @param resourceProviderName the resourceProviderName value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withResourceProviderName(String resourceProviderName) { - this.resourceProviderName = resourceProviderName; - return this; - } - - /** - * Get the resourceUri value. - * - * @return the resourceUri value - */ - public String resourceUri() { - return this.resourceUri; - } - - /** - * Set the resourceUri value. - * - * @param resourceUri the resourceUri value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withResourceUri(String resourceUri) { - this.resourceUri = resourceUri; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public String status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the subStatus value. - * - * @return the subStatus value - */ - public String subStatus() { - return this.subStatus; - } - - /** - * Set the subStatus value. - * - * @param subStatus the subStatus value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withSubStatus(String subStatus) { - this.subStatus = subStatus; - return this; - } - - /** - * Get the claims value. - * - * @return the claims value - */ - public RuleManagementEventClaimsDataSource claims() { - return this.claims; - } - - /** - * Set the claims value. - * - * @param claims the claims value to set - * @return the RuleManagementEventDataSource object itself. - */ - public RuleManagementEventDataSource withClaims(RuleManagementEventClaimsDataSource claims) { - this.claims = claims; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleMetricDataSource.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleMetricDataSource.java deleted file mode 100644 index 25ea880e677..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleMetricDataSource.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * A rule metric data source. The discriminator value is always - * RuleMetricDataSource in this case. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource") -public class RuleMetricDataSource extends RuleDataSource { - /** - * the resource identifier of the resource the rule monitors. - */ - @JsonProperty(value = "resourceUri") - private String resourceUri; - - /** - * the name of the metric that defines what the rule monitors. - */ - @JsonProperty(value = "metricName") - private String metricName; - - /** - * Get the resourceUri value. - * - * @return the resourceUri value - */ - public String resourceUri() { - return this.resourceUri; - } - - /** - * Set the resourceUri value. - * - * @param resourceUri the resourceUri value to set - * @return the RuleMetricDataSource object itself. - */ - public RuleMetricDataSource withResourceUri(String resourceUri) { - this.resourceUri = resourceUri; - return this; - } - - /** - * Get the metricName value. - * - * @return the metricName value - */ - public String metricName() { - return this.metricName; - } - - /** - * Set the metricName value. - * - * @param metricName the metricName value to set - * @return the RuleMetricDataSource object itself. - */ - public RuleMetricDataSource withMetricName(String metricName) { - this.metricName = metricName; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleWebhookAction.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleWebhookAction.java deleted file mode 100644 index 4a7071dc5d4..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RuleWebhookAction.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Specifies the action to post to service when the rule condition is - * evaluated. The discriminator is always RuleWebhookAction in this case. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("Microsoft.Azure.Management.Insights.Models.RuleWebhookAction") -public class RuleWebhookAction extends RuleAction { - /** - * the service uri to Post the notitication when the alert activates or - * resolves. - */ - @JsonProperty(value = "serviceUri") - private String serviceUri; - - /** - * the dictionary of custom properties to include with the post operation. - * These data are appended to the webhook payload. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the serviceUri value. - * - * @return the serviceUri value - */ - public String serviceUri() { - return this.serviceUri; - } - - /** - * Set the serviceUri value. - * - * @param serviceUri the serviceUri value to set - * @return the RuleWebhookAction object itself. - */ - public RuleWebhookAction withServiceUri(String serviceUri) { - this.serviceUri = serviceUri; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the RuleWebhookAction object itself. - */ - public RuleWebhookAction withProperties(Map properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleAction.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleAction.java deleted file mode 100644 index 57b6d6e79b1..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleAction.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The parameters for the scaling action. - */ -public class ScaleAction { - /** - * the scale direction. Whether the scaling action increases or decreases - * the number of instances. Possible values include: 'None', 'Increase', - * 'Decrease'. - */ - @JsonProperty(value = "direction", required = true) - private ScaleDirection direction; - - /** - * the type of action that should occur when the scale rule fires. Possible - * values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount'. - */ - @JsonProperty(value = "type", required = true) - private ScaleType type; - - /** - * the number of instances that are involved in the scaling action. This - * value must be 1 or greater. The default value is 1. - */ - @JsonProperty(value = "value") - private String value; - - /** - * the amount of time to wait since the last scaling action before this - * action occurs. It must be between 1 week and 1 minute in ISO 8601 - * format. - */ - @JsonProperty(value = "cooldown", required = true) - private Period cooldown; - - /** - * Get the direction value. - * - * @return the direction value - */ - public ScaleDirection direction() { - return this.direction; - } - - /** - * Set the direction value. - * - * @param direction the direction value to set - * @return the ScaleAction object itself. - */ - public ScaleAction withDirection(ScaleDirection direction) { - this.direction = direction; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public ScaleType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ScaleAction object itself. - */ - public ScaleAction withType(ScaleType type) { - this.type = type; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the ScaleAction object itself. - */ - public ScaleAction withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the cooldown value. - * - * @return the cooldown value - */ - public Period cooldown() { - return this.cooldown; - } - - /** - * Set the cooldown value. - * - * @param cooldown the cooldown value to set - * @return the ScaleAction object itself. - */ - public ScaleAction withCooldown(Period cooldown) { - this.cooldown = cooldown; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleCapacity.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleCapacity.java deleted file mode 100644 index 9481998a7fd..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleCapacity.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The number of instances that can be used during this profile. - */ -public class ScaleCapacity { - /** - * the minimum number of instances for the resource. - */ - @JsonProperty(value = "minimum", required = true) - private String minimum; - - /** - * the maximum number of instances for the resource. The actual maximum - * number of instances is limited by the cores that are available in the - * subscription. - */ - @JsonProperty(value = "maximum", required = true) - private String maximum; - - /** - * the number of instances that will be set if metrics are not available - * for evaluation. The default is only used if the current instance count - * is lower than the default. - */ - @JsonProperty(value = "default", required = true) - private String defaultProperty; - - /** - * Get the minimum value. - * - * @return the minimum value - */ - public String minimum() { - return this.minimum; - } - - /** - * Set the minimum value. - * - * @param minimum the minimum value to set - * @return the ScaleCapacity object itself. - */ - public ScaleCapacity withMinimum(String minimum) { - this.minimum = minimum; - return this; - } - - /** - * Get the maximum value. - * - * @return the maximum value - */ - public String maximum() { - return this.maximum; - } - - /** - * Set the maximum value. - * - * @param maximum the maximum value to set - * @return the ScaleCapacity object itself. - */ - public ScaleCapacity withMaximum(String maximum) { - this.maximum = maximum; - return this; - } - - /** - * Get the defaultProperty value. - * - * @return the defaultProperty value - */ - public String defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty value. - * - * @param defaultProperty the defaultProperty value to set - * @return the ScaleCapacity object itself. - */ - public ScaleCapacity withDefaultProperty(String defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleDirection.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleDirection.java deleted file mode 100644 index eb3813b4ff5..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleDirection.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ScaleDirection. - */ -public enum ScaleDirection { - /** Enum value None. */ - NONE("None"), - - /** Enum value Increase. */ - INCREASE("Increase"), - - /** Enum value Decrease. */ - DECREASE("Decrease"); - - /** The actual serialized value for a ScaleDirection instance. */ - private String value; - - ScaleDirection(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ScaleDirection instance. - * - * @param value the serialized value to parse. - * @return the parsed ScaleDirection object, or null if unable to parse. - */ - @JsonCreator - public static ScaleDirection fromString(String value) { - ScaleDirection[] items = ScaleDirection.values(); - for (ScaleDirection item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleRule.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleRule.java deleted file mode 100644 index 2775b3e17f9..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleRule.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A rule that provide the triggers and parameters for the scaling action. - */ -public class ScaleRule { - /** - * the trigger that results in a scaling action. - */ - @JsonProperty(value = "metricTrigger", required = true) - private MetricTrigger metricTrigger; - - /** - * the parameters for the scaling action. - */ - @JsonProperty(value = "scaleAction", required = true) - private ScaleAction scaleAction; - - /** - * Get the metricTrigger value. - * - * @return the metricTrigger value - */ - public MetricTrigger metricTrigger() { - return this.metricTrigger; - } - - /** - * Set the metricTrigger value. - * - * @param metricTrigger the metricTrigger value to set - * @return the ScaleRule object itself. - */ - public ScaleRule withMetricTrigger(MetricTrigger metricTrigger) { - this.metricTrigger = metricTrigger; - return this; - } - - /** - * Get the scaleAction value. - * - * @return the scaleAction value - */ - public ScaleAction scaleAction() { - return this.scaleAction; - } - - /** - * Set the scaleAction value. - * - * @param scaleAction the scaleAction value to set - * @return the ScaleRule object itself. - */ - public ScaleRule withScaleAction(ScaleAction scaleAction) { - this.scaleAction = scaleAction; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleType.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleType.java deleted file mode 100644 index 544940e2683..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ScaleType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ScaleType. - */ -public enum ScaleType { - /** Enum value ChangeCount. */ - CHANGE_COUNT("ChangeCount"), - - /** Enum value PercentChangeCount. */ - PERCENT_CHANGE_COUNT("PercentChangeCount"), - - /** Enum value ExactCount. */ - EXACT_COUNT("ExactCount"); - - /** The actual serialized value for a ScaleType instance. */ - private String value; - - ScaleType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ScaleType instance. - * - * @param value the serialized value to parse. - * @return the parsed ScaleType object, or null if unable to parse. - */ - @JsonCreator - public static ScaleType fromString(String value) { - ScaleType[] items = ScaleType.values(); - for (ScaleType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ThresholdRuleCondition.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ThresholdRuleCondition.java deleted file mode 100644 index 99ffc427ecf..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/ThresholdRuleCondition.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * A rule condition based on a metric crossing a threshold. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") -@JsonTypeName("Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition") -public class ThresholdRuleCondition extends RuleCondition { - /** - * the resource from which the rule collects its data. For this type - * dataSource will always be of type RuleMetricDataSource. - */ - @JsonProperty(value = "dataSource") - private RuleDataSource dataSource; - - /** - * the operator used to compare the data and the threshold. Possible values - * include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', - * 'LessThanOrEqual'. - */ - @JsonProperty(value = "operator", required = true) - private ConditionOperator operator; - - /** - * the threshold value that activates the alert. - */ - @JsonProperty(value = "threshold", required = true) - private double threshold; - - /** - * the period of time (in ISO 8601 duration format) that is used to monitor - * alert activity based on the threshold. If specified then it must be - * between 5 minutes and 1 day. - */ - @JsonProperty(value = "windowSize") - private Period windowSize; - - /** - * the time aggregation operator. How the data that are collected should be - * combined over time. The default value is the PrimaryAggregationType of - * the Metric. Possible values include: 'Average', 'Minimum', 'Maximum', - * 'Total', 'Last'. - */ - @JsonProperty(value = "timeAggregation") - private TimeAggregationOperator timeAggregation; - - /** - * Get the dataSource value. - * - * @return the dataSource value - */ - public RuleDataSource dataSource() { - return this.dataSource; - } - - /** - * Set the dataSource value. - * - * @param dataSource the dataSource value to set - * @return the ThresholdRuleCondition object itself. - */ - public ThresholdRuleCondition withDataSource(RuleDataSource dataSource) { - this.dataSource = dataSource; - return this; - } - - /** - * Get the operator value. - * - * @return the operator value - */ - public ConditionOperator operator() { - return this.operator; - } - - /** - * Set the operator value. - * - * @param operator the operator value to set - * @return the ThresholdRuleCondition object itself. - */ - public ThresholdRuleCondition withOperator(ConditionOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the threshold value. - * - * @return the threshold value - */ - public double threshold() { - return this.threshold; - } - - /** - * Set the threshold value. - * - * @param threshold the threshold value to set - * @return the ThresholdRuleCondition object itself. - */ - public ThresholdRuleCondition withThreshold(double threshold) { - this.threshold = threshold; - return this; - } - - /** - * Get the windowSize value. - * - * @return the windowSize value - */ - public Period windowSize() { - return this.windowSize; - } - - /** - * Set the windowSize value. - * - * @param windowSize the windowSize value to set - * @return the ThresholdRuleCondition object itself. - */ - public ThresholdRuleCondition withWindowSize(Period windowSize) { - this.windowSize = windowSize; - return this; - } - - /** - * Get the timeAggregation value. - * - * @return the timeAggregation value - */ - public TimeAggregationOperator timeAggregation() { - return this.timeAggregation; - } - - /** - * Set the timeAggregation value. - * - * @param timeAggregation the timeAggregation value to set - * @return the ThresholdRuleCondition object itself. - */ - public ThresholdRuleCondition withTimeAggregation(TimeAggregationOperator timeAggregation) { - this.timeAggregation = timeAggregation; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeAggregationOperator.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeAggregationOperator.java deleted file mode 100644 index c36c286bb0f..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeAggregationOperator.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for TimeAggregationOperator. - */ -public enum TimeAggregationOperator { - /** Enum value Average. */ - AVERAGE("Average"), - - /** Enum value Minimum. */ - MINIMUM("Minimum"), - - /** Enum value Maximum. */ - MAXIMUM("Maximum"), - - /** Enum value Total. */ - TOTAL("Total"), - - /** Enum value Last. */ - LAST("Last"); - - /** The actual serialized value for a TimeAggregationOperator instance. */ - private String value; - - TimeAggregationOperator(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a TimeAggregationOperator instance. - * - * @param value the serialized value to parse. - * @return the parsed TimeAggregationOperator object, or null if unable to parse. - */ - @JsonCreator - public static TimeAggregationOperator fromString(String value) { - TimeAggregationOperator[] items = TimeAggregationOperator.values(); - for (TimeAggregationOperator item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeAggregationType.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeAggregationType.java deleted file mode 100644 index 0a874ad5dfa..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeAggregationType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for TimeAggregationType. - */ -public enum TimeAggregationType { - /** Enum value Average. */ - AVERAGE("Average"), - - /** Enum value Minimum. */ - MINIMUM("Minimum"), - - /** Enum value Maximum. */ - MAXIMUM("Maximum"), - - /** Enum value Total. */ - TOTAL("Total"), - - /** Enum value Count. */ - COUNT("Count"); - - /** The actual serialized value for a TimeAggregationType instance. */ - private String value; - - TimeAggregationType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a TimeAggregationType instance. - * - * @param value the serialized value to parse. - * @return the parsed TimeAggregationType object, or null if unable to parse. - */ - @JsonCreator - public static TimeAggregationType fromString(String value) { - TimeAggregationType[] items = TimeAggregationType.values(); - for (TimeAggregationType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeWindow.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeWindow.java deleted file mode 100644 index 3674a9a12b4..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/TimeWindow.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A specific date-time for the profile. - */ -public class TimeWindow { - /** - * the timezone of the start and end times for the profile. Some examples - * of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian - * Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), - * Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time - * (Mexico), Mountain Standard Time, Central America Standard Time, Central - * Standard Time, Central Standard Time (Mexico), Canada Central Standard - * Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern - * Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic - * Standard Time, Central Brazilian Standard Time, SA Western Standard - * Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South - * America Standard Time, Argentina Standard Time, SA Eastern Standard - * Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard - * Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape - * Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, - * Greenwich Standard Time, W. Europe Standard Time, Central Europe - * Standard Time, Romance Standard Time, Central European Standard Time, W. - * Central Africa Standard Time, Namibia Standard Time, Jordan Standard - * Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, - * Syria Standard Time, E. Europe Standard Time, South Africa Standard - * Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, - * Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, - * Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. - * Africa Standard Time, Iran Standard Time, Arabian Standard Time, - * Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, - * Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard - * Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan - * Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal - * Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. - * Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard - * Time, North Asia Standard Time, China Standard Time, North Asia East - * Standard Time, Singapore Standard Time, W. Australia Standard Time, - * Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, - * Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard - * Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern - * Standard Time, West Pacific Standard Time, Tasmania Standard Time, - * Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, - * Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard - * Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga - * Standard Time, Samoa Standard Time, Line Islands Standard Time. - */ - @JsonProperty(value = "timeZone") - private String timeZone; - - /** - * the start time for the profile in ISO 8601 format. - */ - @JsonProperty(value = "start", required = true) - private DateTime start; - - /** - * the end time for the profile in ISO 8601 format. - */ - @JsonProperty(value = "end", required = true) - private DateTime end; - - /** - * Get the timeZone value. - * - * @return the timeZone value - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone value. - * - * @param timeZone the timeZone value to set - * @return the TimeWindow object itself. - */ - public TimeWindow withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Get the start value. - * - * @return the start value - */ - public DateTime start() { - return this.start; - } - - /** - * Set the start value. - * - * @param start the start value to set - * @return the TimeWindow object itself. - */ - public TimeWindow withStart(DateTime start) { - this.start = start; - return this; - } - - /** - * Get the end value. - * - * @return the end value - */ - public DateTime end() { - return this.end; - } - - /** - * Set the end value. - * - * @param end the end value to set - * @return the TimeWindow object itself. - */ - public TimeWindow withEnd(DateTime end) { - this.end = end; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/WebhookNotification.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/WebhookNotification.java deleted file mode 100644 index 567cf112c44..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/WebhookNotification.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Webhook notification of an autoscale event. - */ -public class WebhookNotification { - /** - * the service address to receive the notification. - */ - @JsonProperty(value = "serviceUri") - private String serviceUri; - - /** - * a property bag of settings. This value can be empty. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the serviceUri value. - * - * @return the serviceUri value - */ - public String serviceUri() { - return this.serviceUri; - } - - /** - * Set the serviceUri value. - * - * @param serviceUri the serviceUri value to set - * @return the WebhookNotification object itself. - */ - public WebhookNotification withServiceUri(String serviceUri) { - this.serviceUri = serviceUri; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the WebhookNotification object itself. - */ - public WebhookNotification withProperties(Map properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRuleIncidentsInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRuleIncidentsInner.java deleted file mode 100644 index 3fd47683f24..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRuleIncidentsInner.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in AlertRuleIncidents. - */ -public class AlertRuleIncidentsInner { - /** The Retrofit service to perform REST calls. */ - private AlertRuleIncidentsService service; - /** The service client containing this operation class. */ - private InsightsManagementClientImpl client; - - /** - * Initializes an instance of AlertRuleIncidentsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public AlertRuleIncidentsInner(Retrofit retrofit, InsightsManagementClientImpl client) { - this.service = retrofit.create(AlertRuleIncidentsService.class); - this.client = client; - } - - /** - * The interface defining all the services for AlertRuleIncidents to be - * used by Retrofit to perform actually REST calls. - */ - interface AlertRuleIncidentsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AlertRuleIncidents get" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents/{incidentName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Path("incidentName") String incidentName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AlertRuleIncidents listByAlertRule" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents") - Observable> listByAlertRule(@Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets an incident associated to an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IncidentInner object if successful. - */ - public IncidentInner get(String resourceGroupName, String ruleName, String incidentName) { - return getWithServiceResponseAsync(resourceGroupName, ruleName, incidentName).toBlocking().single().body(); - } - - /** - * Gets an incident associated to an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String ruleName, String incidentName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, ruleName, incidentName), serviceCallback); - } - - /** - * Gets an incident associated to an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IncidentInner object - */ - public Observable getAsync(String resourceGroupName, String ruleName, String incidentName) { - return getWithServiceResponseAsync(resourceGroupName, ruleName, incidentName).map(new Func1, IncidentInner>() { - @Override - public IncidentInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an incident associated to an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IncidentInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String ruleName, String incidentName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ruleName == null) { - throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); - } - if (incidentName == null) { - throw new IllegalArgumentException("Parameter incidentName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.get(resourceGroupName, ruleName, incidentName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of incidents associated to an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<IncidentInner> object if successful. - */ - public List listByAlertRule(String resourceGroupName, String ruleName) { - return listByAlertRuleWithServiceResponseAsync(resourceGroupName, ruleName).toBlocking().single().body(); - } - - /** - * Gets a list of incidents associated to an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByAlertRuleAsync(String resourceGroupName, String ruleName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByAlertRuleWithServiceResponseAsync(resourceGroupName, ruleName), serviceCallback); - } - - /** - * Gets a list of incidents associated to an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<IncidentInner> object - */ - public Observable> listByAlertRuleAsync(String resourceGroupName, String ruleName) { - return listByAlertRuleWithServiceResponseAsync(resourceGroupName, ruleName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of incidents associated to an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<IncidentInner> object - */ - public Observable>> listByAlertRuleWithServiceResponseAsync(String resourceGroupName, String ruleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ruleName == null) { - throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.listByAlertRule(resourceGroupName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByAlertRuleDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByAlertRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRuleResourceInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRuleResourceInner.java deleted file mode 100644 index 7fbbcdff327..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRuleResourceInner.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import com.microsoft.azure.management.gallery.RuleCondition; -import java.util.List; -import com.microsoft.azure.management.gallery.RuleAction; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The alert rule resource. - */ -@JsonFlatten -public class AlertRuleResourceInner extends Resource { - /** - * the name of the alert rule. - */ - @JsonProperty(value = "properties.name", required = true) - private String alertRuleResourceName; - - /** - * the description of the alert rule that will be included in the alert - * email. - */ - @JsonProperty(value = "properties.description") - private String description; - - /** - * the flag that indicates whether the alert rule is enabled. - */ - @JsonProperty(value = "properties.isEnabled", required = true) - private boolean isEnabled; - - /** - * the condition that results in the alert rule being activated. - */ - @JsonProperty(value = "properties.condition") - private RuleCondition condition; - - /** - * the array of actions that are performed when the alert rule becomes - * active, and when an alert condition is resolved. - */ - @JsonProperty(value = "properties.actions") - private List actions; - - /** - * Last time the rule was updated in ISO8601 format. - */ - @JsonProperty(value = "properties.lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastUpdatedTime; - - /** - * Get the alertRuleResourceName value. - * - * @return the alertRuleResourceName value - */ - public String alertRuleResourceName() { - return this.alertRuleResourceName; - } - - /** - * Set the alertRuleResourceName value. - * - * @param alertRuleResourceName the alertRuleResourceName value to set - * @return the AlertRuleResourceInner object itself. - */ - public AlertRuleResourceInner withAlertRuleResourceName(String alertRuleResourceName) { - this.alertRuleResourceName = alertRuleResourceName; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the AlertRuleResourceInner object itself. - */ - public AlertRuleResourceInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the isEnabled value. - * - * @return the isEnabled value - */ - public boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled value. - * - * @param isEnabled the isEnabled value to set - * @return the AlertRuleResourceInner object itself. - */ - public AlertRuleResourceInner withIsEnabled(boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Get the condition value. - * - * @return the condition value - */ - public RuleCondition condition() { - return this.condition; - } - - /** - * Set the condition value. - * - * @param condition the condition value to set - * @return the AlertRuleResourceInner object itself. - */ - public AlertRuleResourceInner withCondition(RuleCondition condition) { - this.condition = condition; - return this; - } - - /** - * Get the actions value. - * - * @return the actions value - */ - public List actions() { - return this.actions; - } - - /** - * Set the actions value. - * - * @param actions the actions value to set - * @return the AlertRuleResourceInner object itself. - */ - public AlertRuleResourceInner withActions(List actions) { - this.actions = actions; - return this; - } - - /** - * Get the lastUpdatedTime value. - * - * @return the lastUpdatedTime value - */ - public DateTime lastUpdatedTime() { - return this.lastUpdatedTime; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRulesInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRulesInner.java deleted file mode 100644 index a5ade526937..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AlertRulesInner.java +++ /dev/null @@ -1,498 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in AlertRules. - */ -public class AlertRulesInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private AlertRulesService service; - /** The service client containing this operation class. */ - private InsightsManagementClientImpl client; - - /** - * Initializes an instance of AlertRulesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public AlertRulesInner(Retrofit retrofit, InsightsManagementClientImpl client) { - this.service = retrofit.create(AlertRulesService.class); - this.client = client; - } - - /** - * The interface defining all the services for AlertRules to be - * used by Retrofit to perform actually REST calls. - */ - interface AlertRulesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AlertRules createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body AlertRuleResourceInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AlertRules delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AlertRules getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AlertRules listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates or updates an alert rule. - Request method: PUT Request URI: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.insights/alertRules/{alert-rule-name}?api-version={api-version}. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AlertRuleResourceInner object if successful. - */ - public AlertRuleResourceInner createOrUpdate(String resourceGroupName, String ruleName, AlertRuleResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, ruleName, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates an alert rule. - Request method: PUT Request URI: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.insights/alertRules/{alert-rule-name}?api-version={api-version}. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String ruleName, AlertRuleResourceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, ruleName, parameters), serviceCallback); - } - - /** - * Creates or updates an alert rule. - Request method: PUT Request URI: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.insights/alertRules/{alert-rule-name}?api-version={api-version}. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AlertRuleResourceInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String ruleName, AlertRuleResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, ruleName, parameters).map(new Func1, AlertRuleResourceInner>() { - @Override - public AlertRuleResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an alert rule. - Request method: PUT Request URI: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.insights/alertRules/{alert-rule-name}?api-version={api-version}. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AlertRuleResourceInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ruleName, AlertRuleResourceInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ruleName == null) { - throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - final String apiVersion = "2016-03-01"; - return service.createOrUpdate(resourceGroupName, ruleName, this.client.subscriptionId(), apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String ruleName) { - deleteWithServiceResponseAsync(resourceGroupName, ruleName).toBlocking().single().body(); - } - - /** - * Deletes an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String ruleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, ruleName), serviceCallback); - } - - /** - * Deletes an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String ruleName) { - return deleteWithServiceResponseAsync(resourceGroupName, ruleName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String ruleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ruleName == null) { - throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.delete(resourceGroupName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AlertRuleResourceInner object if successful. - */ - public AlertRuleResourceInner getByResourceGroup(String resourceGroupName, String ruleName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ruleName).toBlocking().single().body(); - } - - /** - * Gets an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String ruleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ruleName), serviceCallback); - } - - /** - * Gets an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AlertRuleResourceInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String ruleName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ruleName).map(new Func1, AlertRuleResourceInner>() { - @Override - public AlertRuleResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an alert rule. - * - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AlertRuleResourceInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ruleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ruleName == null) { - throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.getByResourceGroup(resourceGroupName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List the alert rules within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<AlertRuleResourceInner> object if successful. - */ - public List listByResourceGroup(String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body(); - } - - /** - * List the alert rules within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); - } - - /** - * List the alert rules within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<AlertRuleResourceInner> object - */ - public Observable> listByResourceGroupAsync(String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List the alert rules within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<AlertRuleResourceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final String filter = null; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List the alert rules within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<AlertRuleResourceInner> object if successful. - */ - public List listByResourceGroup(String resourceGroupName, String filter) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter).toBlocking().single().body(); - } - - /** - * List the alert rules within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, String filter, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter), serviceCallback); - } - - /** - * List the alert rules within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<AlertRuleResourceInner> object - */ - public Observable> listByResourceGroupAsync(String resourceGroupName, String filter) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List the alert rules within a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<AlertRuleResourceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName, String filter) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AutoscaleSettingResourceInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AutoscaleSettingResourceInner.java deleted file mode 100644 index 9e73ebb2e40..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AutoscaleSettingResourceInner.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import java.util.List; -import com.microsoft.azure.management.gallery.AutoscaleProfile; -import com.microsoft.azure.management.gallery.AutoscaleNotification; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The autoscale setting resource. - */ -@JsonFlatten -public class AutoscaleSettingResourceInner extends Resource { - /** - * the collection of automatic scaling profiles that specify different - * scaling parameters for different time periods. A maximum of 20 profiles - * can be specified. - */ - @JsonProperty(value = "properties.profiles", required = true) - private List profiles; - - /** - * the collection of notifications. - */ - @JsonProperty(value = "properties.notifications") - private List notifications; - - /** - * the enabled flag. Specifies whether automatic scaling is enabled for the - * resource. The default value is 'true'. - */ - @JsonProperty(value = "properties.enabled") - private Boolean enabled; - - /** - * the name of the autoscale setting. - */ - @JsonProperty(value = "properties.name", required = true) - private String autoscaleSettingResourceName; - - /** - * the resource identifier of the resource that the autoscale setting - * should be added to. - */ - @JsonProperty(value = "properties.targetResourceUri") - private String targetResourceUri; - - /** - * Get the profiles value. - * - * @return the profiles value - */ - public List profiles() { - return this.profiles; - } - - /** - * Set the profiles value. - * - * @param profiles the profiles value to set - * @return the AutoscaleSettingResourceInner object itself. - */ - public AutoscaleSettingResourceInner withProfiles(List profiles) { - this.profiles = profiles; - return this; - } - - /** - * Get the notifications value. - * - * @return the notifications value - */ - public List notifications() { - return this.notifications; - } - - /** - * Set the notifications value. - * - * @param notifications the notifications value to set - * @return the AutoscaleSettingResourceInner object itself. - */ - public AutoscaleSettingResourceInner withNotifications(List notifications) { - this.notifications = notifications; - return this; - } - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the AutoscaleSettingResourceInner object itself. - */ - public AutoscaleSettingResourceInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the autoscaleSettingResourceName value. - * - * @return the autoscaleSettingResourceName value - */ - public String autoscaleSettingResourceName() { - return this.autoscaleSettingResourceName; - } - - /** - * Set the autoscaleSettingResourceName value. - * - * @param autoscaleSettingResourceName the autoscaleSettingResourceName value to set - * @return the AutoscaleSettingResourceInner object itself. - */ - public AutoscaleSettingResourceInner withAutoscaleSettingResourceName(String autoscaleSettingResourceName) { - this.autoscaleSettingResourceName = autoscaleSettingResourceName; - return this; - } - - /** - * Get the targetResourceUri value. - * - * @return the targetResourceUri value - */ - public String targetResourceUri() { - return this.targetResourceUri; - } - - /** - * Set the targetResourceUri value. - * - * @param targetResourceUri the targetResourceUri value to set - * @return the AutoscaleSettingResourceInner object itself. - */ - public AutoscaleSettingResourceInner withTargetResourceUri(String targetResourceUri) { - this.targetResourceUri = targetResourceUri; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AutoscaleSettingsInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AutoscaleSettingsInner.java deleted file mode 100644 index b36f59c9775..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/AutoscaleSettingsInner.java +++ /dev/null @@ -1,685 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in AutoscaleSettings. - */ -public class AutoscaleSettingsInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private AutoscaleSettingsService service; - /** The service client containing this operation class. */ - private InsightsManagementClientImpl client; - - /** - * Initializes an instance of AutoscaleSettingsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public AutoscaleSettingsInner(Retrofit retrofit, InsightsManagementClientImpl client) { - this.service = retrofit.create(AutoscaleSettingsService.class); - this.client = client; - } - - /** - * The interface defining all the services for AutoscaleSettings to be - * used by Retrofit to perform actually REST calls. - */ - interface AutoscaleSettingsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AutoscaleSettings listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AutoscaleSettings createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("autoscaleSettingName") String autoscaleSettingName, @Path("subscriptionId") String subscriptionId, @Body AutoscaleSettingResourceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AutoscaleSettings delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("autoscaleSettingName") String autoscaleSettingName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AutoscaleSettings getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("autoscaleSettingName") String autoscaleSettingName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.AutoscaleSettings listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AutoscaleSettingResourceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AutoscaleSettingResourceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AutoscaleSettingResourceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AutoscaleSettingResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2015-04-01"; - final String filter = null; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AutoscaleSettingResourceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName, final String filter) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AutoscaleSettingResourceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AutoscaleSettingResourceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter) { - return listByResourceGroupSinglePageAsync(resourceGroupName, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the autoscale settings for a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param filter The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AutoscaleSettingResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2015-04-01"; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AutoscaleSettingResourceInner object if successful. - */ - public AutoscaleSettingResourceInner createOrUpdate(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, autoscaleSettingName, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates an autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, autoscaleSettingName, parameters), serviceCallback); - } - - /** - * Creates or updates an autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AutoscaleSettingResourceInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, autoscaleSettingName, parameters).map(new Func1, AutoscaleSettingResourceInner>() { - @Override - public AutoscaleSettingResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AutoscaleSettingResourceInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourceInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (autoscaleSettingName == null) { - throw new IllegalArgumentException("Parameter autoscaleSettingName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - final String apiVersion = "2015-04-01"; - return service.createOrUpdate(resourceGroupName, autoscaleSettingName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes and autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String autoscaleSettingName) { - deleteWithServiceResponseAsync(resourceGroupName, autoscaleSettingName).toBlocking().single().body(); - } - - /** - * Deletes and autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String autoscaleSettingName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, autoscaleSettingName), serviceCallback); - } - - /** - * Deletes and autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String autoscaleSettingName) { - return deleteWithServiceResponseAsync(resourceGroupName, autoscaleSettingName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes and autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String autoscaleSettingName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (autoscaleSettingName == null) { - throw new IllegalArgumentException("Parameter autoscaleSettingName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2015-04-01"; - return service.delete(resourceGroupName, autoscaleSettingName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AutoscaleSettingResourceInner object if successful. - */ - public AutoscaleSettingResourceInner getByResourceGroup(String resourceGroupName, String autoscaleSettingName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, autoscaleSettingName).toBlocking().single().body(); - } - - /** - * Gets an autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String autoscaleSettingName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, autoscaleSettingName), serviceCallback); - } - - /** - * Gets an autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AutoscaleSettingResourceInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String autoscaleSettingName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, autoscaleSettingName).map(new Func1, AutoscaleSettingResourceInner>() { - @Override - public AutoscaleSettingResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an autoscale setting. - * - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AutoscaleSettingResourceInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String autoscaleSettingName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (autoscaleSettingName == null) { - throw new IllegalArgumentException("Parameter autoscaleSettingName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2015-04-01"; - return service.getByResourceGroup(resourceGroupName, autoscaleSettingName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AutoscaleSettingResourceInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AutoscaleSettingResourceInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the autoscale settings for a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AutoscaleSettingResourceInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the autoscale settings for a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AutoscaleSettingResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/IncidentInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/IncidentInner.java deleted file mode 100644 index 47033309e74..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/IncidentInner.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * An alert incident indicates the activation status of an alert rule. - */ -public class IncidentInner { - /** - * Incident name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Rule name that is associated with the incident. - */ - @JsonProperty(value = "ruleName", access = JsonProperty.Access.WRITE_ONLY) - private String ruleName; - - /** - * A boolean to indicate whether the incident is active or resolved. - */ - @JsonProperty(value = "isActive", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isActive; - - /** - * The time at which the incident was activated in ISO8601 format. - */ - @JsonProperty(value = "activatedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime activatedTime; - - /** - * The time at which the incident was resolved in ISO8601 format. If null, - * it means the incident is still active. - */ - @JsonProperty(value = "resolvedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime resolvedTime; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the ruleName value. - * - * @return the ruleName value - */ - public String ruleName() { - return this.ruleName; - } - - /** - * Get the isActive value. - * - * @return the isActive value - */ - public Boolean isActive() { - return this.isActive; - } - - /** - * Get the activatedTime value. - * - * @return the activatedTime value - */ - public DateTime activatedTime() { - return this.activatedTime; - } - - /** - * Get the resolvedTime value. - * - * @return the resolvedTime value - */ - public DateTime resolvedTime() { - return this.resolvedTime; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/InsightsManagementClientImpl.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/InsightsManagementClientImpl.java deleted file mode 100644 index b6fce6bd80c..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/InsightsManagementClientImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the InsightsManagementClientImpl class. - */ -public class InsightsManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** The Azure subscription Id. */ - private String subscriptionId; - - /** - * Gets The Azure subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets The Azure subscription Id. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public InsightsManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public InsightsManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public InsightsManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public InsightsManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The AutoscaleSettingsInner object to access its operations. - */ - private AutoscaleSettingsInner autoscaleSettings; - - /** - * Gets the AutoscaleSettingsInner object to access its operations. - * @return the AutoscaleSettingsInner object. - */ - public AutoscaleSettingsInner autoscaleSettings() { - return this.autoscaleSettings; - } - - /** - * The ServiceDiagnosticSettingsInner object to access its operations. - */ - private ServiceDiagnosticSettingsInner serviceDiagnosticSettings; - - /** - * Gets the ServiceDiagnosticSettingsInner object to access its operations. - * @return the ServiceDiagnosticSettingsInner object. - */ - public ServiceDiagnosticSettingsInner serviceDiagnosticSettings() { - return this.serviceDiagnosticSettings; - } - - /** - * The AlertRulesInner object to access its operations. - */ - private AlertRulesInner alertRules; - - /** - * Gets the AlertRulesInner object to access its operations. - * @return the AlertRulesInner object. - */ - public AlertRulesInner alertRules() { - return this.alertRules; - } - - /** - * The AlertRuleIncidentsInner object to access its operations. - */ - private AlertRuleIncidentsInner alertRuleIncidents; - - /** - * Gets the AlertRuleIncidentsInner object to access its operations. - * @return the AlertRuleIncidentsInner object. - */ - public AlertRuleIncidentsInner alertRuleIncidents() { - return this.alertRuleIncidents; - } - - /** - * The LogProfilesInner object to access its operations. - */ - private LogProfilesInner logProfiles; - - /** - * Gets the LogProfilesInner object to access its operations. - * @return the LogProfilesInner object. - */ - public LogProfilesInner logProfiles() { - return this.logProfiles; - } - - /** - * Initializes an instance of InsightsManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public InsightsManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of InsightsManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public InsightsManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of InsightsManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public InsightsManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.autoscaleSettings = new AutoscaleSettingsInner(restClient().retrofit(), this); - this.serviceDiagnosticSettings = new ServiceDiagnosticSettingsInner(restClient().retrofit(), this); - this.alertRules = new AlertRulesInner(restClient().retrofit(), this); - this.alertRuleIncidents = new AlertRuleIncidentsInner(restClient().retrofit(), this); - this.logProfiles = new LogProfilesInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s)", super.userAgent(), "InsightsManagementClient"); - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/InsightsManager.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/InsightsManager.java deleted file mode 100644 index 953d1c536c8..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/InsightsManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure Insights resource management. - */ -@Beta(Beta.SinceVersion.V1_2_0) -public final class InsightsManager extends Manager { - /** - * Get a Configurable instance that can be used to create InsightsManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new InsightsManager.ConfigurableImpl(); - } - /** - * Creates an instance of InsightsManager that exposes Insights resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the InsightsManager - */ - public static InsightsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new InsightsManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of InsightsManager that exposes Insights resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the InsightsManager - */ - public static InsightsManager authenticate(RestClient restClient, String subscriptionId) { - return new InsightsManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of InsightsManager that exposes Insights management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing Insights management API entry points that work across subscriptions - */ - InsightsManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public InsightsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return InsightsManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private InsightsManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new InsightsManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/LogProfileResourceInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/LogProfileResourceInner.java deleted file mode 100644 index f156ffcc477..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/LogProfileResourceInner.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import java.util.List; -import com.microsoft.azure.management.gallery.RetentionPolicy; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The log profile resource. - */ -@JsonFlatten -public class LogProfileResourceInner extends Resource { - /** - * the resource id of the storage account to which you would like to send - * the Activity Log. - */ - @JsonProperty(value = "properties.storageAccountId") - private String storageAccountId; - - /** - * The service bus rule ID of the service bus namespace in which you would - * like to have Event Hubs created for streaming the Activity Log. The rule - * ID is of the format: '{service bus resource ID}/authorizationrules/{key - * name}'. - */ - @JsonProperty(value = "properties.serviceBusRuleId") - private String serviceBusRuleId; - - /** - * List of regions for which Activity Log events should be stored or - * streamed. It is a comma separated list of valid ARM locations including - * the 'global' location. - */ - @JsonProperty(value = "properties.locations", required = true) - private List locations; - - /** - * the categories of the logs. These categories are created as is - * convenient to the user. Some values are: 'Write', 'Delete', and/or - * 'Action.'. - */ - @JsonProperty(value = "properties.categories") - private List categories; - - /** - * the retention policy for the events in the log. - */ - @JsonProperty(value = "properties.retentionPolicy") - private RetentionPolicy retentionPolicy; - - /** - * Get the storageAccountId value. - * - * @return the storageAccountId value - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Set the storageAccountId value. - * - * @param storageAccountId the storageAccountId value to set - * @return the LogProfileResourceInner object itself. - */ - public LogProfileResourceInner withStorageAccountId(String storageAccountId) { - this.storageAccountId = storageAccountId; - return this; - } - - /** - * Get the serviceBusRuleId value. - * - * @return the serviceBusRuleId value - */ - public String serviceBusRuleId() { - return this.serviceBusRuleId; - } - - /** - * Set the serviceBusRuleId value. - * - * @param serviceBusRuleId the serviceBusRuleId value to set - * @return the LogProfileResourceInner object itself. - */ - public LogProfileResourceInner withServiceBusRuleId(String serviceBusRuleId) { - this.serviceBusRuleId = serviceBusRuleId; - return this; - } - - /** - * Get the locations value. - * - * @return the locations value - */ - public List locations() { - return this.locations; - } - - /** - * Set the locations value. - * - * @param locations the locations value to set - * @return the LogProfileResourceInner object itself. - */ - public LogProfileResourceInner withLocations(List locations) { - this.locations = locations; - return this; - } - - /** - * Get the categories value. - * - * @return the categories value - */ - public List categories() { - return this.categories; - } - - /** - * Set the categories value. - * - * @param categories the categories value to set - * @return the LogProfileResourceInner object itself. - */ - public LogProfileResourceInner withCategories(List categories) { - this.categories = categories; - return this; - } - - /** - * Get the retentionPolicy value. - * - * @return the retentionPolicy value - */ - public RetentionPolicy retentionPolicy() { - return this.retentionPolicy; - } - - /** - * Set the retentionPolicy value. - * - * @param retentionPolicy the retentionPolicy value to set - * @return the LogProfileResourceInner object itself. - */ - public LogProfileResourceInner withRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/LogProfilesInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/LogProfilesInner.java deleted file mode 100644 index 01fbe4ea05c..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/LogProfilesInner.java +++ /dev/null @@ -1,386 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in LogProfiles. - */ -public class LogProfilesInner { - /** The Retrofit service to perform REST calls. */ - private LogProfilesService service; - /** The service client containing this operation class. */ - private InsightsManagementClientImpl client; - - /** - * Initializes an instance of LogProfilesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public LogProfilesInner(Retrofit retrofit, InsightsManagementClientImpl client) { - this.service = retrofit.create(LogProfilesService.class); - this.client = client; - } - - /** - * The interface defining all the services for LogProfiles to be - * used by Retrofit to perform actually REST calls. - */ - interface LogProfilesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.LogProfiles delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("logProfileName") String logProfileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.LogProfiles get" }) - @GET("subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}") - Observable> get(@Path("logProfileName") String logProfileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.LogProfiles createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}") - Observable> createOrUpdate(@Path("logProfileName") String logProfileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body LogProfileResourceInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.LogProfiles list" }) - @GET("subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Deletes the log profile. - * - * @param logProfileName The name of the log profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String logProfileName) { - deleteWithServiceResponseAsync(logProfileName).toBlocking().single().body(); - } - - /** - * Deletes the log profile. - * - * @param logProfileName The name of the log profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String logProfileName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(logProfileName), serviceCallback); - } - - /** - * Deletes the log profile. - * - * @param logProfileName The name of the log profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String logProfileName) { - return deleteWithServiceResponseAsync(logProfileName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the log profile. - * - * @param logProfileName The name of the log profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String logProfileName) { - if (logProfileName == null) { - throw new IllegalArgumentException("Parameter logProfileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.delete(logProfileName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the log profile. - * - * @param logProfileName The name of the log profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LogProfileResourceInner object if successful. - */ - public LogProfileResourceInner get(String logProfileName) { - return getWithServiceResponseAsync(logProfileName).toBlocking().single().body(); - } - - /** - * Gets the log profile. - * - * @param logProfileName The name of the log profile. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String logProfileName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(logProfileName), serviceCallback); - } - - /** - * Gets the log profile. - * - * @param logProfileName The name of the log profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LogProfileResourceInner object - */ - public Observable getAsync(String logProfileName) { - return getWithServiceResponseAsync(logProfileName).map(new Func1, LogProfileResourceInner>() { - @Override - public LogProfileResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the log profile. - * - * @param logProfileName The name of the log profile. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LogProfileResourceInner object - */ - public Observable> getWithServiceResponseAsync(String logProfileName) { - if (logProfileName == null) { - throw new IllegalArgumentException("Parameter logProfileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.get(logProfileName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or update a log profile in Azure Monitoring REST API. - * - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the LogProfileResourceInner object if successful. - */ - public LogProfileResourceInner createOrUpdate(String logProfileName, LogProfileResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(logProfileName, parameters).toBlocking().single().body(); - } - - /** - * Create or update a log profile in Azure Monitoring REST API. - * - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String logProfileName, LogProfileResourceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(logProfileName, parameters), serviceCallback); - } - - /** - * Create or update a log profile in Azure Monitoring REST API. - * - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LogProfileResourceInner object - */ - public Observable createOrUpdateAsync(String logProfileName, LogProfileResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(logProfileName, parameters).map(new Func1, LogProfileResourceInner>() { - @Override - public LogProfileResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update a log profile in Azure Monitoring REST API. - * - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LogProfileResourceInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String logProfileName, LogProfileResourceInner parameters) { - if (logProfileName == null) { - throw new IllegalArgumentException("Parameter logProfileName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - final String apiVersion = "2016-03-01"; - return service.createOrUpdate(logProfileName, this.client.subscriptionId(), apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List the log profiles. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<LogProfileResourceInner> object if successful. - */ - public List list() { - return listWithServiceResponseAsync().toBlocking().single().body(); - } - - /** - * List the log profiles. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); - } - - /** - * List the log profiles. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<LogProfileResourceInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync().map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List the log profiles. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<LogProfileResourceInner> object - */ - public Observable>> listWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/PageImpl.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/PageImpl.java deleted file mode 100644 index c26c0972f37..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/PageImpl1.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/PageImpl1.java deleted file mode 100644 index 0f828d4c548..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/PageImpl1.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl1 implements Page { - /** - * The link to the next page. - */ - @JsonProperty("") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl1 setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl1 setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/ServiceDiagnosticSettingsInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/ServiceDiagnosticSettingsInner.java deleted file mode 100644 index 07377205617..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/ServiceDiagnosticSettingsInner.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ServiceDiagnosticSettings. - */ -public class ServiceDiagnosticSettingsInner { - /** The Retrofit service to perform REST calls. */ - private ServiceDiagnosticSettingsService service; - /** The service client containing this operation class. */ - private InsightsManagementClientImpl client; - - /** - * Initializes an instance of ServiceDiagnosticSettingsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ServiceDiagnosticSettingsInner(Retrofit retrofit, InsightsManagementClientImpl client) { - this.service = retrofit.create(ServiceDiagnosticSettingsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ServiceDiagnosticSettings to be - * used by Retrofit to perform actually REST calls. - */ - interface ServiceDiagnosticSettingsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.ServiceDiagnosticSettings get" }) - @GET("{resourceUri}/providers/microsoft.insights/diagnosticSettings/service") - Observable> get(@Path("resourceUri") String resourceUri, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.gallery.ServiceDiagnosticSettings createOrUpdate" }) - @PUT("{resourceUri}/providers/microsoft.insights/diagnosticSettings/service") - Observable> createOrUpdate(@Path("resourceUri") String resourceUri, @Query("api-version") String apiVersion, @Body ServiceDiagnosticSettingsResourceInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the active diagnostic settings for the specified resource. - * - * @param resourceUri The identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ServiceDiagnosticSettingsResourceInner object if successful. - */ - public ServiceDiagnosticSettingsResourceInner get(String resourceUri) { - return getWithServiceResponseAsync(resourceUri).toBlocking().single().body(); - } - - /** - * Gets the active diagnostic settings for the specified resource. - * - * @param resourceUri The identifier of the resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceUri, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceUri), serviceCallback); - } - - /** - * Gets the active diagnostic settings for the specified resource. - * - * @param resourceUri The identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceDiagnosticSettingsResourceInner object - */ - public Observable getAsync(String resourceUri) { - return getWithServiceResponseAsync(resourceUri).map(new Func1, ServiceDiagnosticSettingsResourceInner>() { - @Override - public ServiceDiagnosticSettingsResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the active diagnostic settings for the specified resource. - * - * @param resourceUri The identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceDiagnosticSettingsResourceInner object - */ - public Observable> getWithServiceResponseAsync(String resourceUri) { - if (resourceUri == null) { - throw new IllegalArgumentException("Parameter resourceUri is required and cannot be null."); - } - final String apiVersion = "2015-07-01"; - return service.get(resourceUri, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or update new diagnostic settings for the specified resource. - * - * @param resourceUri The identifier of the resource. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ServiceDiagnosticSettingsResourceInner object if successful. - */ - public ServiceDiagnosticSettingsResourceInner createOrUpdate(String resourceUri, ServiceDiagnosticSettingsResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceUri, parameters).toBlocking().single().body(); - } - - /** - * Create or update new diagnostic settings for the specified resource. - * - * @param resourceUri The identifier of the resource. - * @param parameters Parameters supplied to the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceUri, ServiceDiagnosticSettingsResourceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceUri, parameters), serviceCallback); - } - - /** - * Create or update new diagnostic settings for the specified resource. - * - * @param resourceUri The identifier of the resource. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceDiagnosticSettingsResourceInner object - */ - public Observable createOrUpdateAsync(String resourceUri, ServiceDiagnosticSettingsResourceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceUri, parameters).map(new Func1, ServiceDiagnosticSettingsResourceInner>() { - @Override - public ServiceDiagnosticSettingsResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update new diagnostic settings for the specified resource. - * - * @param resourceUri The identifier of the resource. - * @param parameters Parameters supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceDiagnosticSettingsResourceInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceUri, ServiceDiagnosticSettingsResourceInner parameters) { - if (resourceUri == null) { - throw new IllegalArgumentException("Parameter resourceUri is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - final String apiVersion = "2015-07-01"; - return service.createOrUpdate(resourceUri, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/ServiceDiagnosticSettingsResourceInner.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/ServiceDiagnosticSettingsResourceInner.java deleted file mode 100644 index aa86b9bc625..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/ServiceDiagnosticSettingsResourceInner.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.gallery.implementation; - -import java.util.List; -import com.microsoft.azure.management.gallery.MetricSettings; -import com.microsoft.azure.management.gallery.LogSettings; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of a service diagnostic setting. - */ -@JsonFlatten -public class ServiceDiagnosticSettingsResourceInner extends Resource { - /** - * The resource ID of the storage account to which you would like to send - * Diagnostic Logs. - */ - @JsonProperty(value = "properties.storageAccountId") - private String storageAccountId; - - /** - * The service bus rule ID of the service bus namespace in which you would - * like to have Event Hubs created for streaming Diagnostic Logs. The rule - * ID is of the format: '{service bus resource ID}/authorizationrules/{key - * name}'. - */ - @JsonProperty(value = "properties.serviceBusRuleId") - private String serviceBusRuleId; - - /** - * the list of metric settings. - */ - @JsonProperty(value = "properties.metrics") - private List metrics; - - /** - * the list of logs settings. - */ - @JsonProperty(value = "properties.logs") - private List logs; - - /** - * The workspace ID (resource ID of a Log Analytics workspace) for a Log - * Analytics workspace to which you would like to send Diagnostic Logs. - * Example: - * /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. - */ - @JsonProperty(value = "properties.workspaceId") - private String workspaceId; - - /** - * Get the storageAccountId value. - * - * @return the storageAccountId value - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Set the storageAccountId value. - * - * @param storageAccountId the storageAccountId value to set - * @return the ServiceDiagnosticSettingsResourceInner object itself. - */ - public ServiceDiagnosticSettingsResourceInner withStorageAccountId(String storageAccountId) { - this.storageAccountId = storageAccountId; - return this; - } - - /** - * Get the serviceBusRuleId value. - * - * @return the serviceBusRuleId value - */ - public String serviceBusRuleId() { - return this.serviceBusRuleId; - } - - /** - * Set the serviceBusRuleId value. - * - * @param serviceBusRuleId the serviceBusRuleId value to set - * @return the ServiceDiagnosticSettingsResourceInner object itself. - */ - public ServiceDiagnosticSettingsResourceInner withServiceBusRuleId(String serviceBusRuleId) { - this.serviceBusRuleId = serviceBusRuleId; - return this; - } - - /** - * Get the metrics value. - * - * @return the metrics value - */ - public List metrics() { - return this.metrics; - } - - /** - * Set the metrics value. - * - * @param metrics the metrics value to set - * @return the ServiceDiagnosticSettingsResourceInner object itself. - */ - public ServiceDiagnosticSettingsResourceInner withMetrics(List metrics) { - this.metrics = metrics; - return this; - } - - /** - * Get the logs value. - * - * @return the logs value - */ - public List logs() { - return this.logs; - } - - /** - * Set the logs value. - * - * @param logs the logs value to set - * @return the ServiceDiagnosticSettingsResourceInner object itself. - */ - public ServiceDiagnosticSettingsResourceInner withLogs(List logs) { - this.logs = logs; - return this; - } - - /** - * Get the workspaceId value. - * - * @return the workspaceId value - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Set the workspaceId value. - * - * @param workspaceId the workspaceId value to set - * @return the ServiceDiagnosticSettingsResourceInner object itself. - */ - public ServiceDiagnosticSettingsResourceInner withWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - return this; - } - -} diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/package-info.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/package-info.java deleted file mode 100644 index 52856c3af28..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for InsightsManagementClient. - * Composite Swagger for Insights Management Client. - */ -package com.microsoft.azure.management.gallery.implementation; diff --git a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/package-info.java b/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/package-info.java deleted file mode 100644 index 4bd3b264dfb..00000000000 --- a/azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for InsightsManagementClient. - * Composite Swagger for Insights Management Client. - */ -package com.microsoft.azure.management.gallery; diff --git a/azure-mgmt-logic/pom.xml b/azure-mgmt-logic/pom.xml deleted file mode 100755 index 70b51ed359c..00000000000 --- a/azure-mgmt-logic/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-logic - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for Logic Management - This package contains Microsoft Logic Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AcknowledgementConnectionSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AcknowledgementConnectionSettings.java deleted file mode 100755 index 4a195cd729d..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AcknowledgementConnectionSettings.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AS2 agreement acknowledegment connection settings. - */ -public class AS2AcknowledgementConnectionSettings { - /** - * The value indicating whether to ignore mismatch in certificate name. - */ - @JsonProperty(value = "ignoreCertificateNameMismatch", required = true) - private boolean ignoreCertificateNameMismatch; - - /** - * The value indicating whether to support HTTP status code 'CONTINUE'. - */ - @JsonProperty(value = "supportHttpStatusCodeContinue", required = true) - private boolean supportHttpStatusCodeContinue; - - /** - * The value indicating whether to keep the connection alive. - */ - @JsonProperty(value = "keepHttpConnectionAlive", required = true) - private boolean keepHttpConnectionAlive; - - /** - * The value indicating whether to unfold the HTTP headers. - */ - @JsonProperty(value = "unfoldHttpHeaders", required = true) - private boolean unfoldHttpHeaders; - - /** - * Get the ignoreCertificateNameMismatch value. - * - * @return the ignoreCertificateNameMismatch value - */ - public boolean ignoreCertificateNameMismatch() { - return this.ignoreCertificateNameMismatch; - } - - /** - * Set the ignoreCertificateNameMismatch value. - * - * @param ignoreCertificateNameMismatch the ignoreCertificateNameMismatch value to set - * @return the AS2AcknowledgementConnectionSettings object itself. - */ - public AS2AcknowledgementConnectionSettings withIgnoreCertificateNameMismatch(boolean ignoreCertificateNameMismatch) { - this.ignoreCertificateNameMismatch = ignoreCertificateNameMismatch; - return this; - } - - /** - * Get the supportHttpStatusCodeContinue value. - * - * @return the supportHttpStatusCodeContinue value - */ - public boolean supportHttpStatusCodeContinue() { - return this.supportHttpStatusCodeContinue; - } - - /** - * Set the supportHttpStatusCodeContinue value. - * - * @param supportHttpStatusCodeContinue the supportHttpStatusCodeContinue value to set - * @return the AS2AcknowledgementConnectionSettings object itself. - */ - public AS2AcknowledgementConnectionSettings withSupportHttpStatusCodeContinue(boolean supportHttpStatusCodeContinue) { - this.supportHttpStatusCodeContinue = supportHttpStatusCodeContinue; - return this; - } - - /** - * Get the keepHttpConnectionAlive value. - * - * @return the keepHttpConnectionAlive value - */ - public boolean keepHttpConnectionAlive() { - return this.keepHttpConnectionAlive; - } - - /** - * Set the keepHttpConnectionAlive value. - * - * @param keepHttpConnectionAlive the keepHttpConnectionAlive value to set - * @return the AS2AcknowledgementConnectionSettings object itself. - */ - public AS2AcknowledgementConnectionSettings withKeepHttpConnectionAlive(boolean keepHttpConnectionAlive) { - this.keepHttpConnectionAlive = keepHttpConnectionAlive; - return this; - } - - /** - * Get the unfoldHttpHeaders value. - * - * @return the unfoldHttpHeaders value - */ - public boolean unfoldHttpHeaders() { - return this.unfoldHttpHeaders; - } - - /** - * Set the unfoldHttpHeaders value. - * - * @param unfoldHttpHeaders the unfoldHttpHeaders value to set - * @return the AS2AcknowledgementConnectionSettings object itself. - */ - public AS2AcknowledgementConnectionSettings withUnfoldHttpHeaders(boolean unfoldHttpHeaders) { - this.unfoldHttpHeaders = unfoldHttpHeaders; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AgreementContent.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AgreementContent.java deleted file mode 100755 index ae5c6e887f7..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AgreementContent.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account AS2 agreement content. - */ -public class AS2AgreementContent { - /** - * The AS2 one-way receive agreement. - */ - @JsonProperty(value = "receiveAgreement", required = true) - private AS2OneWayAgreement receiveAgreement; - - /** - * The AS2 one-way send agreement. - */ - @JsonProperty(value = "sendAgreement", required = true) - private AS2OneWayAgreement sendAgreement; - - /** - * Get the receiveAgreement value. - * - * @return the receiveAgreement value - */ - public AS2OneWayAgreement receiveAgreement() { - return this.receiveAgreement; - } - - /** - * Set the receiveAgreement value. - * - * @param receiveAgreement the receiveAgreement value to set - * @return the AS2AgreementContent object itself. - */ - public AS2AgreementContent withReceiveAgreement(AS2OneWayAgreement receiveAgreement) { - this.receiveAgreement = receiveAgreement; - return this; - } - - /** - * Get the sendAgreement value. - * - * @return the sendAgreement value - */ - public AS2OneWayAgreement sendAgreement() { - return this.sendAgreement; - } - - /** - * Set the sendAgreement value. - * - * @param sendAgreement the sendAgreement value to set - * @return the AS2AgreementContent object itself. - */ - public AS2AgreementContent withSendAgreement(AS2OneWayAgreement sendAgreement) { - this.sendAgreement = sendAgreement; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2EnvelopeSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2EnvelopeSettings.java deleted file mode 100755 index 080dfadb60f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2EnvelopeSettings.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AS2 agreement envelope settings. - */ -public class AS2EnvelopeSettings { - /** - * The message content type. - */ - @JsonProperty(value = "messageContentType", required = true) - private String messageContentType; - - /** - * The value indicating whether to transmit file name in mime header. - */ - @JsonProperty(value = "transmitFileNameInMimeHeader", required = true) - private boolean transmitFileNameInMimeHeader; - - /** - * The template for file name. - */ - @JsonProperty(value = "fileNameTemplate", required = true) - private String fileNameTemplate; - - /** - * The value indicating whether to suspend message on file name generation - * error. - */ - @JsonProperty(value = "suspendMessageOnFileNameGenerationError", required = true) - private boolean suspendMessageOnFileNameGenerationError; - - /** - * The value indicating whether to auto generate file name. - */ - @JsonProperty(value = "autogenerateFileName", required = true) - private boolean autogenerateFileName; - - /** - * Get the messageContentType value. - * - * @return the messageContentType value - */ - public String messageContentType() { - return this.messageContentType; - } - - /** - * Set the messageContentType value. - * - * @param messageContentType the messageContentType value to set - * @return the AS2EnvelopeSettings object itself. - */ - public AS2EnvelopeSettings withMessageContentType(String messageContentType) { - this.messageContentType = messageContentType; - return this; - } - - /** - * Get the transmitFileNameInMimeHeader value. - * - * @return the transmitFileNameInMimeHeader value - */ - public boolean transmitFileNameInMimeHeader() { - return this.transmitFileNameInMimeHeader; - } - - /** - * Set the transmitFileNameInMimeHeader value. - * - * @param transmitFileNameInMimeHeader the transmitFileNameInMimeHeader value to set - * @return the AS2EnvelopeSettings object itself. - */ - public AS2EnvelopeSettings withTransmitFileNameInMimeHeader(boolean transmitFileNameInMimeHeader) { - this.transmitFileNameInMimeHeader = transmitFileNameInMimeHeader; - return this; - } - - /** - * Get the fileNameTemplate value. - * - * @return the fileNameTemplate value - */ - public String fileNameTemplate() { - return this.fileNameTemplate; - } - - /** - * Set the fileNameTemplate value. - * - * @param fileNameTemplate the fileNameTemplate value to set - * @return the AS2EnvelopeSettings object itself. - */ - public AS2EnvelopeSettings withFileNameTemplate(String fileNameTemplate) { - this.fileNameTemplate = fileNameTemplate; - return this; - } - - /** - * Get the suspendMessageOnFileNameGenerationError value. - * - * @return the suspendMessageOnFileNameGenerationError value - */ - public boolean suspendMessageOnFileNameGenerationError() { - return this.suspendMessageOnFileNameGenerationError; - } - - /** - * Set the suspendMessageOnFileNameGenerationError value. - * - * @param suspendMessageOnFileNameGenerationError the suspendMessageOnFileNameGenerationError value to set - * @return the AS2EnvelopeSettings object itself. - */ - public AS2EnvelopeSettings withSuspendMessageOnFileNameGenerationError(boolean suspendMessageOnFileNameGenerationError) { - this.suspendMessageOnFileNameGenerationError = suspendMessageOnFileNameGenerationError; - return this; - } - - /** - * Get the autogenerateFileName value. - * - * @return the autogenerateFileName value - */ - public boolean autogenerateFileName() { - return this.autogenerateFileName; - } - - /** - * Set the autogenerateFileName value. - * - * @param autogenerateFileName the autogenerateFileName value to set - * @return the AS2EnvelopeSettings object itself. - */ - public AS2EnvelopeSettings withAutogenerateFileName(boolean autogenerateFileName) { - this.autogenerateFileName = autogenerateFileName; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ErrorSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ErrorSettings.java deleted file mode 100755 index 5563dbeb6af..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ErrorSettings.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AS2 agreement error settings. - */ -public class AS2ErrorSettings { - /** - * The value indicating whether to suspend duplicate message. - */ - @JsonProperty(value = "suspendDuplicateMessage", required = true) - private boolean suspendDuplicateMessage; - - /** - * The value indicating whether to resend message If MDN is not received. - */ - @JsonProperty(value = "resendIfMdnNotReceived", required = true) - private boolean resendIfMdnNotReceived; - - /** - * Get the suspendDuplicateMessage value. - * - * @return the suspendDuplicateMessage value - */ - public boolean suspendDuplicateMessage() { - return this.suspendDuplicateMessage; - } - - /** - * Set the suspendDuplicateMessage value. - * - * @param suspendDuplicateMessage the suspendDuplicateMessage value to set - * @return the AS2ErrorSettings object itself. - */ - public AS2ErrorSettings withSuspendDuplicateMessage(boolean suspendDuplicateMessage) { - this.suspendDuplicateMessage = suspendDuplicateMessage; - return this; - } - - /** - * Get the resendIfMdnNotReceived value. - * - * @return the resendIfMdnNotReceived value - */ - public boolean resendIfMdnNotReceived() { - return this.resendIfMdnNotReceived; - } - - /** - * Set the resendIfMdnNotReceived value. - * - * @param resendIfMdnNotReceived the resendIfMdnNotReceived value to set - * @return the AS2ErrorSettings object itself. - */ - public AS2ErrorSettings withResendIfMdnNotReceived(boolean resendIfMdnNotReceived) { - this.resendIfMdnNotReceived = resendIfMdnNotReceived; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2MdnSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2MdnSettings.java deleted file mode 100755 index d956ffc9c8e..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2MdnSettings.java +++ /dev/null @@ -1,252 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AS2 agreement mdn settings. - */ -public class AS2MdnSettings { - /** - * The value indicating whether to send or request a MDN. - */ - @JsonProperty(value = "needMdn", required = true) - private boolean needMdn; - - /** - * The value indicating whether the MDN needs to be signed or not. - */ - @JsonProperty(value = "signMdn", required = true) - private boolean signMdn; - - /** - * The value indicating whether to send the asynchronous MDN. - */ - @JsonProperty(value = "sendMdnAsynchronously", required = true) - private boolean sendMdnAsynchronously; - - /** - * The receipt delivery URL. - */ - @JsonProperty(value = "receiptDeliveryUrl") - private String receiptDeliveryUrl; - - /** - * The disposition notification to header value. - */ - @JsonProperty(value = "dispositionNotificationTo") - private String dispositionNotificationTo; - - /** - * The value indicating whether to sign the outbound MDN if optional. - */ - @JsonProperty(value = "signOutboundMdnIfOptional", required = true) - private boolean signOutboundMdnIfOptional; - - /** - * The MDN text. - */ - @JsonProperty(value = "mdnText") - private String mdnText; - - /** - * The value indicating whether to send inbound MDN to message box. - */ - @JsonProperty(value = "sendInboundMdnToMessageBox", required = true) - private boolean sendInboundMdnToMessageBox; - - /** - * The signing or hashing algorithm. Possible values include: - * 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512'. - */ - @JsonProperty(value = "micHashingAlgorithm", required = true) - private HashingAlgorithm micHashingAlgorithm; - - /** - * Get the needMdn value. - * - * @return the needMdn value - */ - public boolean needMdn() { - return this.needMdn; - } - - /** - * Set the needMdn value. - * - * @param needMdn the needMdn value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withNeedMdn(boolean needMdn) { - this.needMdn = needMdn; - return this; - } - - /** - * Get the signMdn value. - * - * @return the signMdn value - */ - public boolean signMdn() { - return this.signMdn; - } - - /** - * Set the signMdn value. - * - * @param signMdn the signMdn value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withSignMdn(boolean signMdn) { - this.signMdn = signMdn; - return this; - } - - /** - * Get the sendMdnAsynchronously value. - * - * @return the sendMdnAsynchronously value - */ - public boolean sendMdnAsynchronously() { - return this.sendMdnAsynchronously; - } - - /** - * Set the sendMdnAsynchronously value. - * - * @param sendMdnAsynchronously the sendMdnAsynchronously value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withSendMdnAsynchronously(boolean sendMdnAsynchronously) { - this.sendMdnAsynchronously = sendMdnAsynchronously; - return this; - } - - /** - * Get the receiptDeliveryUrl value. - * - * @return the receiptDeliveryUrl value - */ - public String receiptDeliveryUrl() { - return this.receiptDeliveryUrl; - } - - /** - * Set the receiptDeliveryUrl value. - * - * @param receiptDeliveryUrl the receiptDeliveryUrl value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withReceiptDeliveryUrl(String receiptDeliveryUrl) { - this.receiptDeliveryUrl = receiptDeliveryUrl; - return this; - } - - /** - * Get the dispositionNotificationTo value. - * - * @return the dispositionNotificationTo value - */ - public String dispositionNotificationTo() { - return this.dispositionNotificationTo; - } - - /** - * Set the dispositionNotificationTo value. - * - * @param dispositionNotificationTo the dispositionNotificationTo value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withDispositionNotificationTo(String dispositionNotificationTo) { - this.dispositionNotificationTo = dispositionNotificationTo; - return this; - } - - /** - * Get the signOutboundMdnIfOptional value. - * - * @return the signOutboundMdnIfOptional value - */ - public boolean signOutboundMdnIfOptional() { - return this.signOutboundMdnIfOptional; - } - - /** - * Set the signOutboundMdnIfOptional value. - * - * @param signOutboundMdnIfOptional the signOutboundMdnIfOptional value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withSignOutboundMdnIfOptional(boolean signOutboundMdnIfOptional) { - this.signOutboundMdnIfOptional = signOutboundMdnIfOptional; - return this; - } - - /** - * Get the mdnText value. - * - * @return the mdnText value - */ - public String mdnText() { - return this.mdnText; - } - - /** - * Set the mdnText value. - * - * @param mdnText the mdnText value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withMdnText(String mdnText) { - this.mdnText = mdnText; - return this; - } - - /** - * Get the sendInboundMdnToMessageBox value. - * - * @return the sendInboundMdnToMessageBox value - */ - public boolean sendInboundMdnToMessageBox() { - return this.sendInboundMdnToMessageBox; - } - - /** - * Set the sendInboundMdnToMessageBox value. - * - * @param sendInboundMdnToMessageBox the sendInboundMdnToMessageBox value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withSendInboundMdnToMessageBox(boolean sendInboundMdnToMessageBox) { - this.sendInboundMdnToMessageBox = sendInboundMdnToMessageBox; - return this; - } - - /** - * Get the micHashingAlgorithm value. - * - * @return the micHashingAlgorithm value - */ - public HashingAlgorithm micHashingAlgorithm() { - return this.micHashingAlgorithm; - } - - /** - * Set the micHashingAlgorithm value. - * - * @param micHashingAlgorithm the micHashingAlgorithm value to set - * @return the AS2MdnSettings object itself. - */ - public AS2MdnSettings withMicHashingAlgorithm(HashingAlgorithm micHashingAlgorithm) { - this.micHashingAlgorithm = micHashingAlgorithm; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2MessageConnectionSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2MessageConnectionSettings.java deleted file mode 100755 index 2c405a8273d..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2MessageConnectionSettings.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AS2 agreement message connection settings. - */ -public class AS2MessageConnectionSettings { - /** - * The value indicating whether to ignore mismatch in certificate name. - */ - @JsonProperty(value = "ignoreCertificateNameMismatch", required = true) - private boolean ignoreCertificateNameMismatch; - - /** - * The value indicating whether to support HTTP status code 'CONTINUE'. - */ - @JsonProperty(value = "supportHttpStatusCodeContinue", required = true) - private boolean supportHttpStatusCodeContinue; - - /** - * The value indicating whether to keep the connection alive. - */ - @JsonProperty(value = "keepHttpConnectionAlive", required = true) - private boolean keepHttpConnectionAlive; - - /** - * The value indicating whether to unfold the HTTP headers. - */ - @JsonProperty(value = "unfoldHttpHeaders", required = true) - private boolean unfoldHttpHeaders; - - /** - * Get the ignoreCertificateNameMismatch value. - * - * @return the ignoreCertificateNameMismatch value - */ - public boolean ignoreCertificateNameMismatch() { - return this.ignoreCertificateNameMismatch; - } - - /** - * Set the ignoreCertificateNameMismatch value. - * - * @param ignoreCertificateNameMismatch the ignoreCertificateNameMismatch value to set - * @return the AS2MessageConnectionSettings object itself. - */ - public AS2MessageConnectionSettings withIgnoreCertificateNameMismatch(boolean ignoreCertificateNameMismatch) { - this.ignoreCertificateNameMismatch = ignoreCertificateNameMismatch; - return this; - } - - /** - * Get the supportHttpStatusCodeContinue value. - * - * @return the supportHttpStatusCodeContinue value - */ - public boolean supportHttpStatusCodeContinue() { - return this.supportHttpStatusCodeContinue; - } - - /** - * Set the supportHttpStatusCodeContinue value. - * - * @param supportHttpStatusCodeContinue the supportHttpStatusCodeContinue value to set - * @return the AS2MessageConnectionSettings object itself. - */ - public AS2MessageConnectionSettings withSupportHttpStatusCodeContinue(boolean supportHttpStatusCodeContinue) { - this.supportHttpStatusCodeContinue = supportHttpStatusCodeContinue; - return this; - } - - /** - * Get the keepHttpConnectionAlive value. - * - * @return the keepHttpConnectionAlive value - */ - public boolean keepHttpConnectionAlive() { - return this.keepHttpConnectionAlive; - } - - /** - * Set the keepHttpConnectionAlive value. - * - * @param keepHttpConnectionAlive the keepHttpConnectionAlive value to set - * @return the AS2MessageConnectionSettings object itself. - */ - public AS2MessageConnectionSettings withKeepHttpConnectionAlive(boolean keepHttpConnectionAlive) { - this.keepHttpConnectionAlive = keepHttpConnectionAlive; - return this; - } - - /** - * Get the unfoldHttpHeaders value. - * - * @return the unfoldHttpHeaders value - */ - public boolean unfoldHttpHeaders() { - return this.unfoldHttpHeaders; - } - - /** - * Set the unfoldHttpHeaders value. - * - * @param unfoldHttpHeaders the unfoldHttpHeaders value to set - * @return the AS2MessageConnectionSettings object itself. - */ - public AS2MessageConnectionSettings withUnfoldHttpHeaders(boolean unfoldHttpHeaders) { - this.unfoldHttpHeaders = unfoldHttpHeaders; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2OneWayAgreement.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2OneWayAgreement.java deleted file mode 100755 index 1b6ad2bec86..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2OneWayAgreement.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account AS2 oneway agreement. - */ -public class AS2OneWayAgreement { - /** - * The sender business identity. - */ - @JsonProperty(value = "senderBusinessIdentity", required = true) - private BusinessIdentity senderBusinessIdentity; - - /** - * The receiver business identity. - */ - @JsonProperty(value = "receiverBusinessIdentity", required = true) - private BusinessIdentity receiverBusinessIdentity; - - /** - * The AS2 protocol settings. - */ - @JsonProperty(value = "protocolSettings", required = true) - private AS2ProtocolSettings protocolSettings; - - /** - * Get the senderBusinessIdentity value. - * - * @return the senderBusinessIdentity value - */ - public BusinessIdentity senderBusinessIdentity() { - return this.senderBusinessIdentity; - } - - /** - * Set the senderBusinessIdentity value. - * - * @param senderBusinessIdentity the senderBusinessIdentity value to set - * @return the AS2OneWayAgreement object itself. - */ - public AS2OneWayAgreement withSenderBusinessIdentity(BusinessIdentity senderBusinessIdentity) { - this.senderBusinessIdentity = senderBusinessIdentity; - return this; - } - - /** - * Get the receiverBusinessIdentity value. - * - * @return the receiverBusinessIdentity value - */ - public BusinessIdentity receiverBusinessIdentity() { - return this.receiverBusinessIdentity; - } - - /** - * Set the receiverBusinessIdentity value. - * - * @param receiverBusinessIdentity the receiverBusinessIdentity value to set - * @return the AS2OneWayAgreement object itself. - */ - public AS2OneWayAgreement withReceiverBusinessIdentity(BusinessIdentity receiverBusinessIdentity) { - this.receiverBusinessIdentity = receiverBusinessIdentity; - return this; - } - - /** - * Get the protocolSettings value. - * - * @return the protocolSettings value - */ - public AS2ProtocolSettings protocolSettings() { - return this.protocolSettings; - } - - /** - * Set the protocolSettings value. - * - * @param protocolSettings the protocolSettings value to set - * @return the AS2OneWayAgreement object itself. - */ - public AS2OneWayAgreement withProtocolSettings(AS2ProtocolSettings protocolSettings) { - this.protocolSettings = protocolSettings; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ProtocolSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ProtocolSettings.java deleted file mode 100755 index 99ddabb144b..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ProtocolSettings.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AS2 agreement protocol settings. - */ -public class AS2ProtocolSettings { - /** - * The message connection settings. - */ - @JsonProperty(value = "messageConnectionSettings", required = true) - private AS2MessageConnectionSettings messageConnectionSettings; - - /** - * The acknowledgement connection settings. - */ - @JsonProperty(value = "acknowledgementConnectionSettings", required = true) - private AS2AcknowledgementConnectionSettings acknowledgementConnectionSettings; - - /** - * The MDN settings. - */ - @JsonProperty(value = "mdnSettings", required = true) - private AS2MdnSettings mdnSettings; - - /** - * The security settings. - */ - @JsonProperty(value = "securitySettings", required = true) - private AS2SecuritySettings securitySettings; - - /** - * The validation settings. - */ - @JsonProperty(value = "validationSettings", required = true) - private AS2ValidationSettings validationSettings; - - /** - * The envelope settings. - */ - @JsonProperty(value = "envelopeSettings", required = true) - private AS2EnvelopeSettings envelopeSettings; - - /** - * The error settings. - */ - @JsonProperty(value = "errorSettings", required = true) - private AS2ErrorSettings errorSettings; - - /** - * Get the messageConnectionSettings value. - * - * @return the messageConnectionSettings value - */ - public AS2MessageConnectionSettings messageConnectionSettings() { - return this.messageConnectionSettings; - } - - /** - * Set the messageConnectionSettings value. - * - * @param messageConnectionSettings the messageConnectionSettings value to set - * @return the AS2ProtocolSettings object itself. - */ - public AS2ProtocolSettings withMessageConnectionSettings(AS2MessageConnectionSettings messageConnectionSettings) { - this.messageConnectionSettings = messageConnectionSettings; - return this; - } - - /** - * Get the acknowledgementConnectionSettings value. - * - * @return the acknowledgementConnectionSettings value - */ - public AS2AcknowledgementConnectionSettings acknowledgementConnectionSettings() { - return this.acknowledgementConnectionSettings; - } - - /** - * Set the acknowledgementConnectionSettings value. - * - * @param acknowledgementConnectionSettings the acknowledgementConnectionSettings value to set - * @return the AS2ProtocolSettings object itself. - */ - public AS2ProtocolSettings withAcknowledgementConnectionSettings(AS2AcknowledgementConnectionSettings acknowledgementConnectionSettings) { - this.acknowledgementConnectionSettings = acknowledgementConnectionSettings; - return this; - } - - /** - * Get the mdnSettings value. - * - * @return the mdnSettings value - */ - public AS2MdnSettings mdnSettings() { - return this.mdnSettings; - } - - /** - * Set the mdnSettings value. - * - * @param mdnSettings the mdnSettings value to set - * @return the AS2ProtocolSettings object itself. - */ - public AS2ProtocolSettings withMdnSettings(AS2MdnSettings mdnSettings) { - this.mdnSettings = mdnSettings; - return this; - } - - /** - * Get the securitySettings value. - * - * @return the securitySettings value - */ - public AS2SecuritySettings securitySettings() { - return this.securitySettings; - } - - /** - * Set the securitySettings value. - * - * @param securitySettings the securitySettings value to set - * @return the AS2ProtocolSettings object itself. - */ - public AS2ProtocolSettings withSecuritySettings(AS2SecuritySettings securitySettings) { - this.securitySettings = securitySettings; - return this; - } - - /** - * Get the validationSettings value. - * - * @return the validationSettings value - */ - public AS2ValidationSettings validationSettings() { - return this.validationSettings; - } - - /** - * Set the validationSettings value. - * - * @param validationSettings the validationSettings value to set - * @return the AS2ProtocolSettings object itself. - */ - public AS2ProtocolSettings withValidationSettings(AS2ValidationSettings validationSettings) { - this.validationSettings = validationSettings; - return this; - } - - /** - * Get the envelopeSettings value. - * - * @return the envelopeSettings value - */ - public AS2EnvelopeSettings envelopeSettings() { - return this.envelopeSettings; - } - - /** - * Set the envelopeSettings value. - * - * @param envelopeSettings the envelopeSettings value to set - * @return the AS2ProtocolSettings object itself. - */ - public AS2ProtocolSettings withEnvelopeSettings(AS2EnvelopeSettings envelopeSettings) { - this.envelopeSettings = envelopeSettings; - return this; - } - - /** - * Get the errorSettings value. - * - * @return the errorSettings value - */ - public AS2ErrorSettings errorSettings() { - return this.errorSettings; - } - - /** - * Set the errorSettings value. - * - * @param errorSettings the errorSettings value to set - * @return the AS2ProtocolSettings object itself. - */ - public AS2ProtocolSettings withErrorSettings(AS2ErrorSettings errorSettings) { - this.errorSettings = errorSettings; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2SecuritySettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2SecuritySettings.java deleted file mode 100755 index f1fce68f0b6..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2SecuritySettings.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AS2 agreement security settings. - */ -public class AS2SecuritySettings { - /** - * The value indicating whether to send or request a MDN. - */ - @JsonProperty(value = "overrideGroupSigningCertificate", required = true) - private boolean overrideGroupSigningCertificate; - - /** - * The name of the signing certificate. - */ - @JsonProperty(value = "signingCertificateName") - private String signingCertificateName; - - /** - * The name of the encryption certificate. - */ - @JsonProperty(value = "encryptionCertificateName") - private String encryptionCertificateName; - - /** - * The value indicating whether to enable NRR for inbound encoded messages. - */ - @JsonProperty(value = "enableNrrForInboundEncodedMessages", required = true) - private boolean enableNrrForInboundEncodedMessages; - - /** - * The value indicating whether to enable NRR for inbound decoded messages. - */ - @JsonProperty(value = "enableNrrForInboundDecodedMessages", required = true) - private boolean enableNrrForInboundDecodedMessages; - - /** - * The value indicating whether to enable NRR for outbound MDN. - */ - @JsonProperty(value = "enableNrrForOutboundMdn", required = true) - private boolean enableNrrForOutboundMdn; - - /** - * The value indicating whether to enable NRR for outbound encoded - * messages. - */ - @JsonProperty(value = "enableNrrForOutboundEncodedMessages", required = true) - private boolean enableNrrForOutboundEncodedMessages; - - /** - * The value indicating whether to enable NRR for outbound decoded - * messages. - */ - @JsonProperty(value = "enableNrrForOutboundDecodedMessages", required = true) - private boolean enableNrrForOutboundDecodedMessages; - - /** - * The value indicating whether to enable NRR for inbound MDN. - */ - @JsonProperty(value = "enableNrrForInboundMdn", required = true) - private boolean enableNrrForInboundMdn; - - /** - * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - * ShaHyphenHashSize, Sha2UnderscoreHashSize. - */ - @JsonProperty(value = "sha2AlgorithmFormat") - private String sha2AlgorithmFormat; - - /** - * Get the overrideGroupSigningCertificate value. - * - * @return the overrideGroupSigningCertificate value - */ - public boolean overrideGroupSigningCertificate() { - return this.overrideGroupSigningCertificate; - } - - /** - * Set the overrideGroupSigningCertificate value. - * - * @param overrideGroupSigningCertificate the overrideGroupSigningCertificate value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withOverrideGroupSigningCertificate(boolean overrideGroupSigningCertificate) { - this.overrideGroupSigningCertificate = overrideGroupSigningCertificate; - return this; - } - - /** - * Get the signingCertificateName value. - * - * @return the signingCertificateName value - */ - public String signingCertificateName() { - return this.signingCertificateName; - } - - /** - * Set the signingCertificateName value. - * - * @param signingCertificateName the signingCertificateName value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withSigningCertificateName(String signingCertificateName) { - this.signingCertificateName = signingCertificateName; - return this; - } - - /** - * Get the encryptionCertificateName value. - * - * @return the encryptionCertificateName value - */ - public String encryptionCertificateName() { - return this.encryptionCertificateName; - } - - /** - * Set the encryptionCertificateName value. - * - * @param encryptionCertificateName the encryptionCertificateName value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withEncryptionCertificateName(String encryptionCertificateName) { - this.encryptionCertificateName = encryptionCertificateName; - return this; - } - - /** - * Get the enableNrrForInboundEncodedMessages value. - * - * @return the enableNrrForInboundEncodedMessages value - */ - public boolean enableNrrForInboundEncodedMessages() { - return this.enableNrrForInboundEncodedMessages; - } - - /** - * Set the enableNrrForInboundEncodedMessages value. - * - * @param enableNrrForInboundEncodedMessages the enableNrrForInboundEncodedMessages value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withEnableNrrForInboundEncodedMessages(boolean enableNrrForInboundEncodedMessages) { - this.enableNrrForInboundEncodedMessages = enableNrrForInboundEncodedMessages; - return this; - } - - /** - * Get the enableNrrForInboundDecodedMessages value. - * - * @return the enableNrrForInboundDecodedMessages value - */ - public boolean enableNrrForInboundDecodedMessages() { - return this.enableNrrForInboundDecodedMessages; - } - - /** - * Set the enableNrrForInboundDecodedMessages value. - * - * @param enableNrrForInboundDecodedMessages the enableNrrForInboundDecodedMessages value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withEnableNrrForInboundDecodedMessages(boolean enableNrrForInboundDecodedMessages) { - this.enableNrrForInboundDecodedMessages = enableNrrForInboundDecodedMessages; - return this; - } - - /** - * Get the enableNrrForOutboundMdn value. - * - * @return the enableNrrForOutboundMdn value - */ - public boolean enableNrrForOutboundMdn() { - return this.enableNrrForOutboundMdn; - } - - /** - * Set the enableNrrForOutboundMdn value. - * - * @param enableNrrForOutboundMdn the enableNrrForOutboundMdn value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withEnableNrrForOutboundMdn(boolean enableNrrForOutboundMdn) { - this.enableNrrForOutboundMdn = enableNrrForOutboundMdn; - return this; - } - - /** - * Get the enableNrrForOutboundEncodedMessages value. - * - * @return the enableNrrForOutboundEncodedMessages value - */ - public boolean enableNrrForOutboundEncodedMessages() { - return this.enableNrrForOutboundEncodedMessages; - } - - /** - * Set the enableNrrForOutboundEncodedMessages value. - * - * @param enableNrrForOutboundEncodedMessages the enableNrrForOutboundEncodedMessages value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withEnableNrrForOutboundEncodedMessages(boolean enableNrrForOutboundEncodedMessages) { - this.enableNrrForOutboundEncodedMessages = enableNrrForOutboundEncodedMessages; - return this; - } - - /** - * Get the enableNrrForOutboundDecodedMessages value. - * - * @return the enableNrrForOutboundDecodedMessages value - */ - public boolean enableNrrForOutboundDecodedMessages() { - return this.enableNrrForOutboundDecodedMessages; - } - - /** - * Set the enableNrrForOutboundDecodedMessages value. - * - * @param enableNrrForOutboundDecodedMessages the enableNrrForOutboundDecodedMessages value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withEnableNrrForOutboundDecodedMessages(boolean enableNrrForOutboundDecodedMessages) { - this.enableNrrForOutboundDecodedMessages = enableNrrForOutboundDecodedMessages; - return this; - } - - /** - * Get the enableNrrForInboundMdn value. - * - * @return the enableNrrForInboundMdn value - */ - public boolean enableNrrForInboundMdn() { - return this.enableNrrForInboundMdn; - } - - /** - * Set the enableNrrForInboundMdn value. - * - * @param enableNrrForInboundMdn the enableNrrForInboundMdn value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withEnableNrrForInboundMdn(boolean enableNrrForInboundMdn) { - this.enableNrrForInboundMdn = enableNrrForInboundMdn; - return this; - } - - /** - * Get the sha2AlgorithmFormat value. - * - * @return the sha2AlgorithmFormat value - */ - public String sha2AlgorithmFormat() { - return this.sha2AlgorithmFormat; - } - - /** - * Set the sha2AlgorithmFormat value. - * - * @param sha2AlgorithmFormat the sha2AlgorithmFormat value to set - * @return the AS2SecuritySettings object itself. - */ - public AS2SecuritySettings withSha2AlgorithmFormat(String sha2AlgorithmFormat) { - this.sha2AlgorithmFormat = sha2AlgorithmFormat; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ValidationSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ValidationSettings.java deleted file mode 100755 index 231d8e2ce85..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2ValidationSettings.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AS2 agreement validation settings. - */ -public class AS2ValidationSettings { - /** - * The value indicating whether to override incoming message properties - * with those in agreement. - */ - @JsonProperty(value = "overrideMessageProperties", required = true) - private boolean overrideMessageProperties; - - /** - * The value indicating whether the message has to be encrypted. - */ - @JsonProperty(value = "encryptMessage", required = true) - private boolean encryptMessage; - - /** - * The value indicating whether the message has to be signed. - */ - @JsonProperty(value = "signMessage", required = true) - private boolean signMessage; - - /** - * The value indicating whether the message has to be compressed. - */ - @JsonProperty(value = "compressMessage", required = true) - private boolean compressMessage; - - /** - * The value indicating whether to check for duplicate message. - */ - @JsonProperty(value = "checkDuplicateMessage", required = true) - private boolean checkDuplicateMessage; - - /** - * The number of days to look back for duplicate interchange. - */ - @JsonProperty(value = "interchangeDuplicatesValidityDays", required = true) - private int interchangeDuplicatesValidityDays; - - /** - * The value indicating whether to check for certificate revocation list on - * send. - */ - @JsonProperty(value = "checkCertificateRevocationListOnSend", required = true) - private boolean checkCertificateRevocationListOnSend; - - /** - * The value indicating whether to check for certificate revocation list on - * receive. - */ - @JsonProperty(value = "checkCertificateRevocationListOnReceive", required = true) - private boolean checkCertificateRevocationListOnReceive; - - /** - * The encryption algorithm. Possible values include: 'NotSpecified', - * 'None', 'DES3', 'RC2', 'AES128', 'AES192', 'AES256'. - */ - @JsonProperty(value = "encryptionAlgorithm", required = true) - private EncryptionAlgorithm encryptionAlgorithm; - - /** - * The signing algorithm. Possible values include: 'NotSpecified', - * 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512'. - */ - @JsonProperty(value = "signingAlgorithm") - private SigningAlgorithm signingAlgorithm; - - /** - * Get the overrideMessageProperties value. - * - * @return the overrideMessageProperties value - */ - public boolean overrideMessageProperties() { - return this.overrideMessageProperties; - } - - /** - * Set the overrideMessageProperties value. - * - * @param overrideMessageProperties the overrideMessageProperties value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withOverrideMessageProperties(boolean overrideMessageProperties) { - this.overrideMessageProperties = overrideMessageProperties; - return this; - } - - /** - * Get the encryptMessage value. - * - * @return the encryptMessage value - */ - public boolean encryptMessage() { - return this.encryptMessage; - } - - /** - * Set the encryptMessage value. - * - * @param encryptMessage the encryptMessage value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withEncryptMessage(boolean encryptMessage) { - this.encryptMessage = encryptMessage; - return this; - } - - /** - * Get the signMessage value. - * - * @return the signMessage value - */ - public boolean signMessage() { - return this.signMessage; - } - - /** - * Set the signMessage value. - * - * @param signMessage the signMessage value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withSignMessage(boolean signMessage) { - this.signMessage = signMessage; - return this; - } - - /** - * Get the compressMessage value. - * - * @return the compressMessage value - */ - public boolean compressMessage() { - return this.compressMessage; - } - - /** - * Set the compressMessage value. - * - * @param compressMessage the compressMessage value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withCompressMessage(boolean compressMessage) { - this.compressMessage = compressMessage; - return this; - } - - /** - * Get the checkDuplicateMessage value. - * - * @return the checkDuplicateMessage value - */ - public boolean checkDuplicateMessage() { - return this.checkDuplicateMessage; - } - - /** - * Set the checkDuplicateMessage value. - * - * @param checkDuplicateMessage the checkDuplicateMessage value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withCheckDuplicateMessage(boolean checkDuplicateMessage) { - this.checkDuplicateMessage = checkDuplicateMessage; - return this; - } - - /** - * Get the interchangeDuplicatesValidityDays value. - * - * @return the interchangeDuplicatesValidityDays value - */ - public int interchangeDuplicatesValidityDays() { - return this.interchangeDuplicatesValidityDays; - } - - /** - * Set the interchangeDuplicatesValidityDays value. - * - * @param interchangeDuplicatesValidityDays the interchangeDuplicatesValidityDays value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withInterchangeDuplicatesValidityDays(int interchangeDuplicatesValidityDays) { - this.interchangeDuplicatesValidityDays = interchangeDuplicatesValidityDays; - return this; - } - - /** - * Get the checkCertificateRevocationListOnSend value. - * - * @return the checkCertificateRevocationListOnSend value - */ - public boolean checkCertificateRevocationListOnSend() { - return this.checkCertificateRevocationListOnSend; - } - - /** - * Set the checkCertificateRevocationListOnSend value. - * - * @param checkCertificateRevocationListOnSend the checkCertificateRevocationListOnSend value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withCheckCertificateRevocationListOnSend(boolean checkCertificateRevocationListOnSend) { - this.checkCertificateRevocationListOnSend = checkCertificateRevocationListOnSend; - return this; - } - - /** - * Get the checkCertificateRevocationListOnReceive value. - * - * @return the checkCertificateRevocationListOnReceive value - */ - public boolean checkCertificateRevocationListOnReceive() { - return this.checkCertificateRevocationListOnReceive; - } - - /** - * Set the checkCertificateRevocationListOnReceive value. - * - * @param checkCertificateRevocationListOnReceive the checkCertificateRevocationListOnReceive value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withCheckCertificateRevocationListOnReceive(boolean checkCertificateRevocationListOnReceive) { - this.checkCertificateRevocationListOnReceive = checkCertificateRevocationListOnReceive; - return this; - } - - /** - * Get the encryptionAlgorithm value. - * - * @return the encryptionAlgorithm value - */ - public EncryptionAlgorithm encryptionAlgorithm() { - return this.encryptionAlgorithm; - } - - /** - * Set the encryptionAlgorithm value. - * - * @param encryptionAlgorithm the encryptionAlgorithm value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withEncryptionAlgorithm(EncryptionAlgorithm encryptionAlgorithm) { - this.encryptionAlgorithm = encryptionAlgorithm; - return this; - } - - /** - * Get the signingAlgorithm value. - * - * @return the signingAlgorithm value - */ - public SigningAlgorithm signingAlgorithm() { - return this.signingAlgorithm; - } - - /** - * Set the signingAlgorithm value. - * - * @param signingAlgorithm the signingAlgorithm value to set - * @return the AS2ValidationSettings object itself. - */ - public AS2ValidationSettings withSigningAlgorithm(SigningAlgorithm signingAlgorithm) { - this.signingAlgorithm = signingAlgorithm; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AgreementContent.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AgreementContent.java deleted file mode 100755 index 4782b70ef9f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AgreementContent.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account agreement content. - */ -public class AgreementContent { - /** - * The AS2 agreement content. - */ - @JsonProperty(value = "aS2") - private AS2AgreementContent aS2; - - /** - * The X12 agreement content. - */ - @JsonProperty(value = "x12") - private X12AgreementContent x12; - - /** - * The EDIFACT agreement content. - */ - @JsonProperty(value = "edifact") - private EdifactAgreementContent edifact; - - /** - * Get the aS2 value. - * - * @return the aS2 value - */ - public AS2AgreementContent aS2() { - return this.aS2; - } - - /** - * Set the aS2 value. - * - * @param aS2 the aS2 value to set - * @return the AgreementContent object itself. - */ - public AgreementContent withAS2(AS2AgreementContent aS2) { - this.aS2 = aS2; - return this; - } - - /** - * Get the x12 value. - * - * @return the x12 value - */ - public X12AgreementContent x12() { - return this.x12; - } - - /** - * Set the x12 value. - * - * @param x12 the x12 value to set - * @return the AgreementContent object itself. - */ - public AgreementContent withX12(X12AgreementContent x12) { - this.x12 = x12; - return this; - } - - /** - * Get the edifact value. - * - * @return the edifact value - */ - public EdifactAgreementContent edifact() { - return this.edifact; - } - - /** - * Set the edifact value. - * - * @param edifact the edifact value to set - * @return the AgreementContent object itself. - */ - public AgreementContent withEdifact(EdifactAgreementContent edifact) { - this.edifact = edifact; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AgreementType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AgreementType.java deleted file mode 100755 index 6b27c9d46d4..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AgreementType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AgreementType. - */ -public enum AgreementType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value AS2. */ - AS2("AS2"), - - /** Enum value X12. */ - X12("X12"), - - /** Enum value Edifact. */ - EDIFACT("Edifact"); - - /** The actual serialized value for a AgreementType instance. */ - private String value; - - AgreementType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AgreementType instance. - * - * @param value the serialized value to parse. - * @return the parsed AgreementType object, or null if unable to parse. - */ - @JsonCreator - public static AgreementType fromString(String value) { - AgreementType[] items = AgreementType.values(); - for (AgreementType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/B2BPartnerContent.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/B2BPartnerContent.java deleted file mode 100755 index b065150db62..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/B2BPartnerContent.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The B2B partner content. - */ -public class B2BPartnerContent { - /** - * The list of partner business identities. - */ - @JsonProperty(value = "businessIdentities") - private List businessIdentities; - - /** - * Get the businessIdentities value. - * - * @return the businessIdentities value - */ - public List businessIdentities() { - return this.businessIdentities; - } - - /** - * Set the businessIdentities value. - * - * @param businessIdentities the businessIdentities value to set - * @return the B2BPartnerContent object itself. - */ - public B2BPartnerContent withBusinessIdentities(List businessIdentities) { - this.businessIdentities = businessIdentities; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BusinessIdentity.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BusinessIdentity.java deleted file mode 100755 index 15aa29f1689..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BusinessIdentity.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account partner's business identity. - */ -public class BusinessIdentity { - /** - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32. - */ - @JsonProperty(value = "qualifier", required = true) - private String qualifier; - - /** - * The user defined business identity value. - */ - @JsonProperty(value = "value", required = true) - private String value; - - /** - * Get the qualifier value. - * - * @return the qualifier value - */ - public String qualifier() { - return this.qualifier; - } - - /** - * Set the qualifier value. - * - * @param qualifier the qualifier value to set - * @return the BusinessIdentity object itself. - */ - public BusinessIdentity withQualifier(String qualifier) { - this.qualifier = qualifier; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the BusinessIdentity object itself. - */ - public BusinessIdentity withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ContentHash.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ContentHash.java deleted file mode 100755 index 5d4525b38f5..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ContentHash.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The content hash. - */ -public class ContentHash { - /** - * The algorithm of the content hash. - */ - @JsonProperty(value = "algorithm") - private String algorithm; - - /** - * The value of the content hash. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the algorithm value. - * - * @return the algorithm value - */ - public String algorithm() { - return this.algorithm; - } - - /** - * Set the algorithm value. - * - * @param algorithm the algorithm value to set - * @return the ContentHash object itself. - */ - public ContentHash withAlgorithm(String algorithm) { - this.algorithm = algorithm; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the ContentHash object itself. - */ - public ContentHash withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ContentLink.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ContentLink.java deleted file mode 100755 index 9e41b4132bc..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ContentLink.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The content link. - */ -public class ContentLink { - /** - * The content link URI. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * The content version. - */ - @JsonProperty(value = "contentVersion") - private String contentVersion; - - /** - * The content size. - */ - @JsonProperty(value = "contentSize") - private Long contentSize; - - /** - * The content hash. - */ - @JsonProperty(value = "contentHash") - private ContentHash contentHash; - - /** - * The metadata. - */ - @JsonProperty(value = "metadata") - private Object metadata; - - /** - * Get the uri value. - * - * @return the uri value - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri value. - * - * @param uri the uri value to set - * @return the ContentLink object itself. - */ - public ContentLink withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the contentVersion value. - * - * @return the contentVersion value - */ - public String contentVersion() { - return this.contentVersion; - } - - /** - * Set the contentVersion value. - * - * @param contentVersion the contentVersion value to set - * @return the ContentLink object itself. - */ - public ContentLink withContentVersion(String contentVersion) { - this.contentVersion = contentVersion; - return this; - } - - /** - * Get the contentSize value. - * - * @return the contentSize value - */ - public Long contentSize() { - return this.contentSize; - } - - /** - * Set the contentSize value. - * - * @param contentSize the contentSize value to set - * @return the ContentLink object itself. - */ - public ContentLink withContentSize(Long contentSize) { - this.contentSize = contentSize; - return this; - } - - /** - * Get the contentHash value. - * - * @return the contentHash value - */ - public ContentHash contentHash() { - return this.contentHash; - } - - /** - * Set the contentHash value. - * - * @param contentHash the contentHash value to set - * @return the ContentLink object itself. - */ - public ContentLink withContentHash(ContentHash contentHash) { - this.contentHash = contentHash; - return this; - } - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public Object metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the ContentLink object itself. - */ - public ContentLink withMetadata(Object metadata) { - this.metadata = metadata; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Correlation.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Correlation.java deleted file mode 100755 index 70e678ae7bd..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Correlation.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The correlation property. - */ -public class Correlation { - /** - * The client tracking id. - */ - @JsonProperty(value = "clientTrackingId") - private String clientTrackingId; - - /** - * Get the clientTrackingId value. - * - * @return the clientTrackingId value - */ - public String clientTrackingId() { - return this.clientTrackingId; - } - - /** - * Set the clientTrackingId value. - * - * @param clientTrackingId the clientTrackingId value to set - * @return the Correlation object itself. - */ - public Correlation withClientTrackingId(String clientTrackingId) { - this.clientTrackingId = clientTrackingId; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/DayOfWeek.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/DayOfWeek.java deleted file mode 100755 index 7e3dc8cc4c2..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/DayOfWeek.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for DayOfWeek. - */ -public enum DayOfWeek { - /** Enum value Sunday. */ - SUNDAY("Sunday"), - - /** Enum value Monday. */ - MONDAY("Monday"), - - /** Enum value Tuesday. */ - TUESDAY("Tuesday"), - - /** Enum value Wednesday. */ - WEDNESDAY("Wednesday"), - - /** Enum value Thursday. */ - THURSDAY("Thursday"), - - /** Enum value Friday. */ - FRIDAY("Friday"), - - /** Enum value Saturday. */ - SATURDAY("Saturday"); - - /** The actual serialized value for a DayOfWeek instance. */ - private String value; - - DayOfWeek(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DayOfWeek instance. - * - * @param value the serialized value to parse. - * @return the parsed DayOfWeek object, or null if unable to parse. - */ - @JsonCreator - public static DayOfWeek fromString(String value) { - DayOfWeek[] items = DayOfWeek.values(); - for (DayOfWeek item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/DaysOfWeek.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/DaysOfWeek.java deleted file mode 100755 index 45ab821b755..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/DaysOfWeek.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for DaysOfWeek. - */ -public enum DaysOfWeek { - /** Enum value Sunday. */ - SUNDAY("Sunday"), - - /** Enum value Monday. */ - MONDAY("Monday"), - - /** Enum value Tuesday. */ - TUESDAY("Tuesday"), - - /** Enum value Wednesday. */ - WEDNESDAY("Wednesday"), - - /** Enum value Thursday. */ - THURSDAY("Thursday"), - - /** Enum value Friday. */ - FRIDAY("Friday"), - - /** Enum value Saturday. */ - SATURDAY("Saturday"); - - /** The actual serialized value for a DaysOfWeek instance. */ - private String value; - - DaysOfWeek(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DaysOfWeek instance. - * - * @param value the serialized value to parse. - * @return the parsed DaysOfWeek object, or null if unable to parse. - */ - @JsonCreator - public static DaysOfWeek fromString(String value) { - DaysOfWeek[] items = DaysOfWeek.values(); - for (DaysOfWeek item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactAcknowledgementSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactAcknowledgementSettings.java deleted file mode 100755 index 18683c3beac..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactAcknowledgementSettings.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact agreement acknowledgement settings. - */ -public class EdifactAcknowledgementSettings { - /** - * The value indicating whether technical acknowledgement is needed. - */ - @JsonProperty(value = "needTechnicalAcknowledgement", required = true) - private boolean needTechnicalAcknowledgement; - - /** - * The value indicating whether to batch the technical acknowledgements. - */ - @JsonProperty(value = "batchTechnicalAcknowledgements", required = true) - private boolean batchTechnicalAcknowledgements; - - /** - * The value indicating whether functional acknowledgement is needed. - */ - @JsonProperty(value = "needFunctionalAcknowledgement", required = true) - private boolean needFunctionalAcknowledgement; - - /** - * The value indicating whether to batch functional acknowledgements. - */ - @JsonProperty(value = "batchFunctionalAcknowledgements", required = true) - private boolean batchFunctionalAcknowledgements; - - /** - * The value indicating whether a loop is needed for valid messages. - */ - @JsonProperty(value = "needLoopForValidMessages", required = true) - private boolean needLoopForValidMessages; - - /** - * The value indicating whether to send synchronous acknowledgement. - */ - @JsonProperty(value = "sendSynchronousAcknowledgement", required = true) - private boolean sendSynchronousAcknowledgement; - - /** - * The acknowledgement control number prefix. - */ - @JsonProperty(value = "acknowledgementControlNumberPrefix") - private String acknowledgementControlNumberPrefix; - - /** - * The acknowledgement control number suffix. - */ - @JsonProperty(value = "acknowledgementControlNumberSuffix") - private String acknowledgementControlNumberSuffix; - - /** - * The acknowledgement control number lower bound. - */ - @JsonProperty(value = "acknowledgementControlNumberLowerBound", required = true) - private int acknowledgementControlNumberLowerBound; - - /** - * The acknowledgement control number upper bound. - */ - @JsonProperty(value = "acknowledgementControlNumberUpperBound", required = true) - private int acknowledgementControlNumberUpperBound; - - /** - * The value indicating whether to rollover acknowledgement control number. - */ - @JsonProperty(value = "rolloverAcknowledgementControlNumber", required = true) - private boolean rolloverAcknowledgementControlNumber; - - /** - * Get the needTechnicalAcknowledgement value. - * - * @return the needTechnicalAcknowledgement value - */ - public boolean needTechnicalAcknowledgement() { - return this.needTechnicalAcknowledgement; - } - - /** - * Set the needTechnicalAcknowledgement value. - * - * @param needTechnicalAcknowledgement the needTechnicalAcknowledgement value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withNeedTechnicalAcknowledgement(boolean needTechnicalAcknowledgement) { - this.needTechnicalAcknowledgement = needTechnicalAcknowledgement; - return this; - } - - /** - * Get the batchTechnicalAcknowledgements value. - * - * @return the batchTechnicalAcknowledgements value - */ - public boolean batchTechnicalAcknowledgements() { - return this.batchTechnicalAcknowledgements; - } - - /** - * Set the batchTechnicalAcknowledgements value. - * - * @param batchTechnicalAcknowledgements the batchTechnicalAcknowledgements value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withBatchTechnicalAcknowledgements(boolean batchTechnicalAcknowledgements) { - this.batchTechnicalAcknowledgements = batchTechnicalAcknowledgements; - return this; - } - - /** - * Get the needFunctionalAcknowledgement value. - * - * @return the needFunctionalAcknowledgement value - */ - public boolean needFunctionalAcknowledgement() { - return this.needFunctionalAcknowledgement; - } - - /** - * Set the needFunctionalAcknowledgement value. - * - * @param needFunctionalAcknowledgement the needFunctionalAcknowledgement value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withNeedFunctionalAcknowledgement(boolean needFunctionalAcknowledgement) { - this.needFunctionalAcknowledgement = needFunctionalAcknowledgement; - return this; - } - - /** - * Get the batchFunctionalAcknowledgements value. - * - * @return the batchFunctionalAcknowledgements value - */ - public boolean batchFunctionalAcknowledgements() { - return this.batchFunctionalAcknowledgements; - } - - /** - * Set the batchFunctionalAcknowledgements value. - * - * @param batchFunctionalAcknowledgements the batchFunctionalAcknowledgements value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withBatchFunctionalAcknowledgements(boolean batchFunctionalAcknowledgements) { - this.batchFunctionalAcknowledgements = batchFunctionalAcknowledgements; - return this; - } - - /** - * Get the needLoopForValidMessages value. - * - * @return the needLoopForValidMessages value - */ - public boolean needLoopForValidMessages() { - return this.needLoopForValidMessages; - } - - /** - * Set the needLoopForValidMessages value. - * - * @param needLoopForValidMessages the needLoopForValidMessages value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withNeedLoopForValidMessages(boolean needLoopForValidMessages) { - this.needLoopForValidMessages = needLoopForValidMessages; - return this; - } - - /** - * Get the sendSynchronousAcknowledgement value. - * - * @return the sendSynchronousAcknowledgement value - */ - public boolean sendSynchronousAcknowledgement() { - return this.sendSynchronousAcknowledgement; - } - - /** - * Set the sendSynchronousAcknowledgement value. - * - * @param sendSynchronousAcknowledgement the sendSynchronousAcknowledgement value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withSendSynchronousAcknowledgement(boolean sendSynchronousAcknowledgement) { - this.sendSynchronousAcknowledgement = sendSynchronousAcknowledgement; - return this; - } - - /** - * Get the acknowledgementControlNumberPrefix value. - * - * @return the acknowledgementControlNumberPrefix value - */ - public String acknowledgementControlNumberPrefix() { - return this.acknowledgementControlNumberPrefix; - } - - /** - * Set the acknowledgementControlNumberPrefix value. - * - * @param acknowledgementControlNumberPrefix the acknowledgementControlNumberPrefix value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withAcknowledgementControlNumberPrefix(String acknowledgementControlNumberPrefix) { - this.acknowledgementControlNumberPrefix = acknowledgementControlNumberPrefix; - return this; - } - - /** - * Get the acknowledgementControlNumberSuffix value. - * - * @return the acknowledgementControlNumberSuffix value - */ - public String acknowledgementControlNumberSuffix() { - return this.acknowledgementControlNumberSuffix; - } - - /** - * Set the acknowledgementControlNumberSuffix value. - * - * @param acknowledgementControlNumberSuffix the acknowledgementControlNumberSuffix value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withAcknowledgementControlNumberSuffix(String acknowledgementControlNumberSuffix) { - this.acknowledgementControlNumberSuffix = acknowledgementControlNumberSuffix; - return this; - } - - /** - * Get the acknowledgementControlNumberLowerBound value. - * - * @return the acknowledgementControlNumberLowerBound value - */ - public int acknowledgementControlNumberLowerBound() { - return this.acknowledgementControlNumberLowerBound; - } - - /** - * Set the acknowledgementControlNumberLowerBound value. - * - * @param acknowledgementControlNumberLowerBound the acknowledgementControlNumberLowerBound value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withAcknowledgementControlNumberLowerBound(int acknowledgementControlNumberLowerBound) { - this.acknowledgementControlNumberLowerBound = acknowledgementControlNumberLowerBound; - return this; - } - - /** - * Get the acknowledgementControlNumberUpperBound value. - * - * @return the acknowledgementControlNumberUpperBound value - */ - public int acknowledgementControlNumberUpperBound() { - return this.acknowledgementControlNumberUpperBound; - } - - /** - * Set the acknowledgementControlNumberUpperBound value. - * - * @param acknowledgementControlNumberUpperBound the acknowledgementControlNumberUpperBound value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withAcknowledgementControlNumberUpperBound(int acknowledgementControlNumberUpperBound) { - this.acknowledgementControlNumberUpperBound = acknowledgementControlNumberUpperBound; - return this; - } - - /** - * Get the rolloverAcknowledgementControlNumber value. - * - * @return the rolloverAcknowledgementControlNumber value - */ - public boolean rolloverAcknowledgementControlNumber() { - return this.rolloverAcknowledgementControlNumber; - } - - /** - * Set the rolloverAcknowledgementControlNumber value. - * - * @param rolloverAcknowledgementControlNumber the rolloverAcknowledgementControlNumber value to set - * @return the EdifactAcknowledgementSettings object itself. - */ - public EdifactAcknowledgementSettings withRolloverAcknowledgementControlNumber(boolean rolloverAcknowledgementControlNumber) { - this.rolloverAcknowledgementControlNumber = rolloverAcknowledgementControlNumber; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactAgreementContent.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactAgreementContent.java deleted file mode 100755 index b14f1806710..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactAgreementContent.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact agreement content. - */ -public class EdifactAgreementContent { - /** - * The EDIFACT one-way receive agreement. - */ - @JsonProperty(value = "receiveAgreement", required = true) - private EdifactOneWayAgreement receiveAgreement; - - /** - * The EDIFACT one-way send agreement. - */ - @JsonProperty(value = "sendAgreement", required = true) - private EdifactOneWayAgreement sendAgreement; - - /** - * Get the receiveAgreement value. - * - * @return the receiveAgreement value - */ - public EdifactOneWayAgreement receiveAgreement() { - return this.receiveAgreement; - } - - /** - * Set the receiveAgreement value. - * - * @param receiveAgreement the receiveAgreement value to set - * @return the EdifactAgreementContent object itself. - */ - public EdifactAgreementContent withReceiveAgreement(EdifactOneWayAgreement receiveAgreement) { - this.receiveAgreement = receiveAgreement; - return this; - } - - /** - * Get the sendAgreement value. - * - * @return the sendAgreement value - */ - public EdifactOneWayAgreement sendAgreement() { - return this.sendAgreement; - } - - /** - * Set the sendAgreement value. - * - * @param sendAgreement the sendAgreement value to set - * @return the EdifactAgreementContent object itself. - */ - public EdifactAgreementContent withSendAgreement(EdifactOneWayAgreement sendAgreement) { - this.sendAgreement = sendAgreement; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactCharacterSet.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactCharacterSet.java deleted file mode 100755 index d4df84f2748..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactCharacterSet.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for EdifactCharacterSet. - */ -public enum EdifactCharacterSet { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value UNOB. */ - UNOB("UNOB"), - - /** Enum value UNOA. */ - UNOA("UNOA"), - - /** Enum value UNOC. */ - UNOC("UNOC"), - - /** Enum value UNOD. */ - UNOD("UNOD"), - - /** Enum value UNOE. */ - UNOE("UNOE"), - - /** Enum value UNOF. */ - UNOF("UNOF"), - - /** Enum value UNOG. */ - UNOG("UNOG"), - - /** Enum value UNOH. */ - UNOH("UNOH"), - - /** Enum value UNOI. */ - UNOI("UNOI"), - - /** Enum value UNOJ. */ - UNOJ("UNOJ"), - - /** Enum value UNOK. */ - UNOK("UNOK"), - - /** Enum value UNOX. */ - UNOX("UNOX"), - - /** Enum value UNOY. */ - UNOY("UNOY"), - - /** Enum value KECA. */ - KECA("KECA"); - - /** The actual serialized value for a EdifactCharacterSet instance. */ - private String value; - - EdifactCharacterSet(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a EdifactCharacterSet instance. - * - * @param value the serialized value to parse. - * @return the parsed EdifactCharacterSet object, or null if unable to parse. - */ - @JsonCreator - public static EdifactCharacterSet fromString(String value) { - EdifactCharacterSet[] items = EdifactCharacterSet.values(); - for (EdifactCharacterSet item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDecimalIndicator.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDecimalIndicator.java deleted file mode 100755 index 1acd213e6fe..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDecimalIndicator.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for EdifactDecimalIndicator. - */ -public enum EdifactDecimalIndicator { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Comma. */ - COMMA("Comma"), - - /** Enum value Decimal. */ - DECIMAL("Decimal"); - - /** The actual serialized value for a EdifactDecimalIndicator instance. */ - private String value; - - EdifactDecimalIndicator(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a EdifactDecimalIndicator instance. - * - * @param value the serialized value to parse. - * @return the parsed EdifactDecimalIndicator object, or null if unable to parse. - */ - @JsonCreator - public static EdifactDecimalIndicator fromString(String value) { - EdifactDecimalIndicator[] items = EdifactDecimalIndicator.values(); - for (EdifactDecimalIndicator item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDelimiterOverride.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDelimiterOverride.java deleted file mode 100755 index d51fe09cac9..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDelimiterOverride.java +++ /dev/null @@ -1,331 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact delimiter override settings. - */ -public class EdifactDelimiterOverride { - /** - * The message id. - */ - @JsonProperty(value = "messageId") - private String messageId; - - /** - * The message version. - */ - @JsonProperty(value = "messageVersion") - private String messageVersion; - - /** - * The message releaseversion. - */ - @JsonProperty(value = "messageRelease") - private String messageRelease; - - /** - * The data element separator. - */ - @JsonProperty(value = "dataElementSeparator", required = true) - private int dataElementSeparator; - - /** - * The component separator. - */ - @JsonProperty(value = "componentSeparator", required = true) - private int componentSeparator; - - /** - * The segment terminator. - */ - @JsonProperty(value = "segmentTerminator", required = true) - private int segmentTerminator; - - /** - * The repetition separator. - */ - @JsonProperty(value = "repetitionSeparator", required = true) - private int repetitionSeparator; - - /** - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF'. - */ - @JsonProperty(value = "segmentTerminatorSuffix", required = true) - private SegmentTerminatorSuffix segmentTerminatorSuffix; - - /** - * The decimal point indicator. Possible values include: 'NotSpecified', - * 'Comma', 'Decimal'. - */ - @JsonProperty(value = "decimalPointIndicator", required = true) - private EdifactDecimalIndicator decimalPointIndicator; - - /** - * The release indicator. - */ - @JsonProperty(value = "releaseIndicator", required = true) - private int releaseIndicator; - - /** - * The message association assigned code. - */ - @JsonProperty(value = "messageAssociationAssignedCode") - private String messageAssociationAssignedCode; - - /** - * The target namespace on which this delimiter settings has to be applied. - */ - @JsonProperty(value = "targetNamespace") - private String targetNamespace; - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the messageVersion value. - * - * @return the messageVersion value - */ - public String messageVersion() { - return this.messageVersion; - } - - /** - * Set the messageVersion value. - * - * @param messageVersion the messageVersion value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withMessageVersion(String messageVersion) { - this.messageVersion = messageVersion; - return this; - } - - /** - * Get the messageRelease value. - * - * @return the messageRelease value - */ - public String messageRelease() { - return this.messageRelease; - } - - /** - * Set the messageRelease value. - * - * @param messageRelease the messageRelease value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withMessageRelease(String messageRelease) { - this.messageRelease = messageRelease; - return this; - } - - /** - * Get the dataElementSeparator value. - * - * @return the dataElementSeparator value - */ - public int dataElementSeparator() { - return this.dataElementSeparator; - } - - /** - * Set the dataElementSeparator value. - * - * @param dataElementSeparator the dataElementSeparator value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withDataElementSeparator(int dataElementSeparator) { - this.dataElementSeparator = dataElementSeparator; - return this; - } - - /** - * Get the componentSeparator value. - * - * @return the componentSeparator value - */ - public int componentSeparator() { - return this.componentSeparator; - } - - /** - * Set the componentSeparator value. - * - * @param componentSeparator the componentSeparator value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withComponentSeparator(int componentSeparator) { - this.componentSeparator = componentSeparator; - return this; - } - - /** - * Get the segmentTerminator value. - * - * @return the segmentTerminator value - */ - public int segmentTerminator() { - return this.segmentTerminator; - } - - /** - * Set the segmentTerminator value. - * - * @param segmentTerminator the segmentTerminator value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withSegmentTerminator(int segmentTerminator) { - this.segmentTerminator = segmentTerminator; - return this; - } - - /** - * Get the repetitionSeparator value. - * - * @return the repetitionSeparator value - */ - public int repetitionSeparator() { - return this.repetitionSeparator; - } - - /** - * Set the repetitionSeparator value. - * - * @param repetitionSeparator the repetitionSeparator value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withRepetitionSeparator(int repetitionSeparator) { - this.repetitionSeparator = repetitionSeparator; - return this; - } - - /** - * Get the segmentTerminatorSuffix value. - * - * @return the segmentTerminatorSuffix value - */ - public SegmentTerminatorSuffix segmentTerminatorSuffix() { - return this.segmentTerminatorSuffix; - } - - /** - * Set the segmentTerminatorSuffix value. - * - * @param segmentTerminatorSuffix the segmentTerminatorSuffix value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withSegmentTerminatorSuffix(SegmentTerminatorSuffix segmentTerminatorSuffix) { - this.segmentTerminatorSuffix = segmentTerminatorSuffix; - return this; - } - - /** - * Get the decimalPointIndicator value. - * - * @return the decimalPointIndicator value - */ - public EdifactDecimalIndicator decimalPointIndicator() { - return this.decimalPointIndicator; - } - - /** - * Set the decimalPointIndicator value. - * - * @param decimalPointIndicator the decimalPointIndicator value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withDecimalPointIndicator(EdifactDecimalIndicator decimalPointIndicator) { - this.decimalPointIndicator = decimalPointIndicator; - return this; - } - - /** - * Get the releaseIndicator value. - * - * @return the releaseIndicator value - */ - public int releaseIndicator() { - return this.releaseIndicator; - } - - /** - * Set the releaseIndicator value. - * - * @param releaseIndicator the releaseIndicator value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withReleaseIndicator(int releaseIndicator) { - this.releaseIndicator = releaseIndicator; - return this; - } - - /** - * Get the messageAssociationAssignedCode value. - * - * @return the messageAssociationAssignedCode value - */ - public String messageAssociationAssignedCode() { - return this.messageAssociationAssignedCode; - } - - /** - * Set the messageAssociationAssignedCode value. - * - * @param messageAssociationAssignedCode the messageAssociationAssignedCode value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withMessageAssociationAssignedCode(String messageAssociationAssignedCode) { - this.messageAssociationAssignedCode = messageAssociationAssignedCode; - return this; - } - - /** - * Get the targetNamespace value. - * - * @return the targetNamespace value - */ - public String targetNamespace() { - return this.targetNamespace; - } - - /** - * Set the targetNamespace value. - * - * @param targetNamespace the targetNamespace value to set - * @return the EdifactDelimiterOverride object itself. - */ - public EdifactDelimiterOverride withTargetNamespace(String targetNamespace) { - this.targetNamespace = targetNamespace; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeOverride.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeOverride.java deleted file mode 100755 index 58709698384..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeOverride.java +++ /dev/null @@ -1,408 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact enevlope override settings. - */ -public class EdifactEnvelopeOverride { - /** - * The message id on which this envelope settings has to be applied. - */ - @JsonProperty(value = "messageId") - private String messageId; - - /** - * The message version on which this envelope settings has to be applied. - */ - @JsonProperty(value = "messageVersion") - private String messageVersion; - - /** - * The message release version on which this envelope settings has to be - * applied. - */ - @JsonProperty(value = "messageRelease") - private String messageRelease; - - /** - * The message association assigned code. - */ - @JsonProperty(value = "messageAssociationAssignedCode") - private String messageAssociationAssignedCode; - - /** - * The target namespace on which this envelope settings has to be applied. - */ - @JsonProperty(value = "targetNamespace") - private String targetNamespace; - - /** - * The functional group id. - */ - @JsonProperty(value = "functionalGroupId") - private String functionalGroupId; - - /** - * The sender application qualifier. - */ - @JsonProperty(value = "senderApplicationQualifier") - private String senderApplicationQualifier; - - /** - * The sender application id. - */ - @JsonProperty(value = "senderApplicationId") - private String senderApplicationId; - - /** - * The receiver application qualifier. - */ - @JsonProperty(value = "receiverApplicationQualifier") - private String receiverApplicationQualifier; - - /** - * The receiver application id. - */ - @JsonProperty(value = "receiverApplicationId") - private String receiverApplicationId; - - /** - * The controlling agency code. - */ - @JsonProperty(value = "controllingAgencyCode") - private String controllingAgencyCode; - - /** - * The group header message version. - */ - @JsonProperty(value = "groupHeaderMessageVersion") - private String groupHeaderMessageVersion; - - /** - * The group header message release. - */ - @JsonProperty(value = "groupHeaderMessageRelease") - private String groupHeaderMessageRelease; - - /** - * The association assigned code. - */ - @JsonProperty(value = "associationAssignedCode") - private String associationAssignedCode; - - /** - * The application password. - */ - @JsonProperty(value = "applicationPassword") - private String applicationPassword; - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the messageVersion value. - * - * @return the messageVersion value - */ - public String messageVersion() { - return this.messageVersion; - } - - /** - * Set the messageVersion value. - * - * @param messageVersion the messageVersion value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withMessageVersion(String messageVersion) { - this.messageVersion = messageVersion; - return this; - } - - /** - * Get the messageRelease value. - * - * @return the messageRelease value - */ - public String messageRelease() { - return this.messageRelease; - } - - /** - * Set the messageRelease value. - * - * @param messageRelease the messageRelease value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withMessageRelease(String messageRelease) { - this.messageRelease = messageRelease; - return this; - } - - /** - * Get the messageAssociationAssignedCode value. - * - * @return the messageAssociationAssignedCode value - */ - public String messageAssociationAssignedCode() { - return this.messageAssociationAssignedCode; - } - - /** - * Set the messageAssociationAssignedCode value. - * - * @param messageAssociationAssignedCode the messageAssociationAssignedCode value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withMessageAssociationAssignedCode(String messageAssociationAssignedCode) { - this.messageAssociationAssignedCode = messageAssociationAssignedCode; - return this; - } - - /** - * Get the targetNamespace value. - * - * @return the targetNamespace value - */ - public String targetNamespace() { - return this.targetNamespace; - } - - /** - * Set the targetNamespace value. - * - * @param targetNamespace the targetNamespace value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withTargetNamespace(String targetNamespace) { - this.targetNamespace = targetNamespace; - return this; - } - - /** - * Get the functionalGroupId value. - * - * @return the functionalGroupId value - */ - public String functionalGroupId() { - return this.functionalGroupId; - } - - /** - * Set the functionalGroupId value. - * - * @param functionalGroupId the functionalGroupId value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withFunctionalGroupId(String functionalGroupId) { - this.functionalGroupId = functionalGroupId; - return this; - } - - /** - * Get the senderApplicationQualifier value. - * - * @return the senderApplicationQualifier value - */ - public String senderApplicationQualifier() { - return this.senderApplicationQualifier; - } - - /** - * Set the senderApplicationQualifier value. - * - * @param senderApplicationQualifier the senderApplicationQualifier value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withSenderApplicationQualifier(String senderApplicationQualifier) { - this.senderApplicationQualifier = senderApplicationQualifier; - return this; - } - - /** - * Get the senderApplicationId value. - * - * @return the senderApplicationId value - */ - public String senderApplicationId() { - return this.senderApplicationId; - } - - /** - * Set the senderApplicationId value. - * - * @param senderApplicationId the senderApplicationId value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withSenderApplicationId(String senderApplicationId) { - this.senderApplicationId = senderApplicationId; - return this; - } - - /** - * Get the receiverApplicationQualifier value. - * - * @return the receiverApplicationQualifier value - */ - public String receiverApplicationQualifier() { - return this.receiverApplicationQualifier; - } - - /** - * Set the receiverApplicationQualifier value. - * - * @param receiverApplicationQualifier the receiverApplicationQualifier value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withReceiverApplicationQualifier(String receiverApplicationQualifier) { - this.receiverApplicationQualifier = receiverApplicationQualifier; - return this; - } - - /** - * Get the receiverApplicationId value. - * - * @return the receiverApplicationId value - */ - public String receiverApplicationId() { - return this.receiverApplicationId; - } - - /** - * Set the receiverApplicationId value. - * - * @param receiverApplicationId the receiverApplicationId value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withReceiverApplicationId(String receiverApplicationId) { - this.receiverApplicationId = receiverApplicationId; - return this; - } - - /** - * Get the controllingAgencyCode value. - * - * @return the controllingAgencyCode value - */ - public String controllingAgencyCode() { - return this.controllingAgencyCode; - } - - /** - * Set the controllingAgencyCode value. - * - * @param controllingAgencyCode the controllingAgencyCode value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withControllingAgencyCode(String controllingAgencyCode) { - this.controllingAgencyCode = controllingAgencyCode; - return this; - } - - /** - * Get the groupHeaderMessageVersion value. - * - * @return the groupHeaderMessageVersion value - */ - public String groupHeaderMessageVersion() { - return this.groupHeaderMessageVersion; - } - - /** - * Set the groupHeaderMessageVersion value. - * - * @param groupHeaderMessageVersion the groupHeaderMessageVersion value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withGroupHeaderMessageVersion(String groupHeaderMessageVersion) { - this.groupHeaderMessageVersion = groupHeaderMessageVersion; - return this; - } - - /** - * Get the groupHeaderMessageRelease value. - * - * @return the groupHeaderMessageRelease value - */ - public String groupHeaderMessageRelease() { - return this.groupHeaderMessageRelease; - } - - /** - * Set the groupHeaderMessageRelease value. - * - * @param groupHeaderMessageRelease the groupHeaderMessageRelease value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withGroupHeaderMessageRelease(String groupHeaderMessageRelease) { - this.groupHeaderMessageRelease = groupHeaderMessageRelease; - return this; - } - - /** - * Get the associationAssignedCode value. - * - * @return the associationAssignedCode value - */ - public String associationAssignedCode() { - return this.associationAssignedCode; - } - - /** - * Set the associationAssignedCode value. - * - * @param associationAssignedCode the associationAssignedCode value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withAssociationAssignedCode(String associationAssignedCode) { - this.associationAssignedCode = associationAssignedCode; - return this; - } - - /** - * Get the applicationPassword value. - * - * @return the applicationPassword value - */ - public String applicationPassword() { - return this.applicationPassword; - } - - /** - * Set the applicationPassword value. - * - * @param applicationPassword the applicationPassword value to set - * @return the EdifactEnvelopeOverride object itself. - */ - public EdifactEnvelopeOverride withApplicationPassword(String applicationPassword) { - this.applicationPassword = applicationPassword; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeSettings.java deleted file mode 100755 index e262030b9d0..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeSettings.java +++ /dev/null @@ -1,1084 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact agreement envelope settings. - */ -public class EdifactEnvelopeSettings { - /** - * The group association assigned code. - */ - @JsonProperty(value = "groupAssociationAssignedCode") - private String groupAssociationAssignedCode; - - /** - * The communication agreement id. - */ - @JsonProperty(value = "communicationAgreementId") - private String communicationAgreementId; - - /** - * The value indicating whether to apply delimiter string advice. - */ - @JsonProperty(value = "applyDelimiterStringAdvice", required = true) - private boolean applyDelimiterStringAdvice; - - /** - * The value indicating whether to create grouping segments. - */ - @JsonProperty(value = "createGroupingSegments", required = true) - private boolean createGroupingSegments; - - /** - * The value indicating whether to enable default group headers. - */ - @JsonProperty(value = "enableDefaultGroupHeaders", required = true) - private boolean enableDefaultGroupHeaders; - - /** - * The recipient reference password value. - */ - @JsonProperty(value = "recipientReferencePasswordValue") - private String recipientReferencePasswordValue; - - /** - * The recipient reference password qualifier. - */ - @JsonProperty(value = "recipientReferencePasswordQualifier") - private String recipientReferencePasswordQualifier; - - /** - * The application reference id. - */ - @JsonProperty(value = "applicationReferenceId") - private String applicationReferenceId; - - /** - * The processing priority code. - */ - @JsonProperty(value = "processingPriorityCode") - private String processingPriorityCode; - - /** - * The interchange control number lower bound. - */ - @JsonProperty(value = "interchangeControlNumberLowerBound", required = true) - private long interchangeControlNumberLowerBound; - - /** - * The interchange control number upper bound. - */ - @JsonProperty(value = "interchangeControlNumberUpperBound", required = true) - private long interchangeControlNumberUpperBound; - - /** - * The value indicating whether to rollover interchange control number. - */ - @JsonProperty(value = "rolloverInterchangeControlNumber", required = true) - private boolean rolloverInterchangeControlNumber; - - /** - * The interchange control number prefix. - */ - @JsonProperty(value = "interchangeControlNumberPrefix") - private String interchangeControlNumberPrefix; - - /** - * The interchange control number suffix. - */ - @JsonProperty(value = "interchangeControlNumberSuffix") - private String interchangeControlNumberSuffix; - - /** - * The sender reverse routing address. - */ - @JsonProperty(value = "senderReverseRoutingAddress") - private String senderReverseRoutingAddress; - - /** - * The receiver reverse routing address. - */ - @JsonProperty(value = "receiverReverseRoutingAddress") - private String receiverReverseRoutingAddress; - - /** - * The functional group id. - */ - @JsonProperty(value = "functionalGroupId") - private String functionalGroupId; - - /** - * The group controlling agency code. - */ - @JsonProperty(value = "groupControllingAgencyCode") - private String groupControllingAgencyCode; - - /** - * The group message version. - */ - @JsonProperty(value = "groupMessageVersion") - private String groupMessageVersion; - - /** - * The group message release. - */ - @JsonProperty(value = "groupMessageRelease") - private String groupMessageRelease; - - /** - * The group control number lower bound. - */ - @JsonProperty(value = "groupControlNumberLowerBound", required = true) - private long groupControlNumberLowerBound; - - /** - * The group control number upper bound. - */ - @JsonProperty(value = "groupControlNumberUpperBound", required = true) - private long groupControlNumberUpperBound; - - /** - * The value indicating whether to rollover group control number. - */ - @JsonProperty(value = "rolloverGroupControlNumber", required = true) - private boolean rolloverGroupControlNumber; - - /** - * The group control number prefix. - */ - @JsonProperty(value = "groupControlNumberPrefix") - private String groupControlNumberPrefix; - - /** - * The group control number suffix. - */ - @JsonProperty(value = "groupControlNumberSuffix") - private String groupControlNumberSuffix; - - /** - * The group application receiver qualifier. - */ - @JsonProperty(value = "groupApplicationReceiverQualifier") - private String groupApplicationReceiverQualifier; - - /** - * The group application receiver id. - */ - @JsonProperty(value = "groupApplicationReceiverId") - private String groupApplicationReceiverId; - - /** - * The group application sender qualifier. - */ - @JsonProperty(value = "groupApplicationSenderQualifier") - private String groupApplicationSenderQualifier; - - /** - * The group application sender id. - */ - @JsonProperty(value = "groupApplicationSenderId") - private String groupApplicationSenderId; - - /** - * The group application password. - */ - @JsonProperty(value = "groupApplicationPassword") - private String groupApplicationPassword; - - /** - * The value indicating whether to overwrite existing transaction set - * control number. - */ - @JsonProperty(value = "overwriteExistingTransactionSetControlNumber", required = true) - private boolean overwriteExistingTransactionSetControlNumber; - - /** - * The transaction set control number prefix. - */ - @JsonProperty(value = "transactionSetControlNumberPrefix") - private String transactionSetControlNumberPrefix; - - /** - * The transaction set control number suffix. - */ - @JsonProperty(value = "transactionSetControlNumberSuffix") - private String transactionSetControlNumberSuffix; - - /** - * The transaction set control number lower bound. - */ - @JsonProperty(value = "transactionSetControlNumberLowerBound", required = true) - private long transactionSetControlNumberLowerBound; - - /** - * The transaction set control number upper bound. - */ - @JsonProperty(value = "transactionSetControlNumberUpperBound", required = true) - private long transactionSetControlNumberUpperBound; - - /** - * The value indicating whether to rollover transaction set control number. - */ - @JsonProperty(value = "rolloverTransactionSetControlNumber", required = true) - private boolean rolloverTransactionSetControlNumber; - - /** - * The value indicating whether the message is a test interchange. - */ - @JsonProperty(value = "isTestInterchange", required = true) - private boolean isTestInterchange; - - /** - * The sender internal identification. - */ - @JsonProperty(value = "senderInternalIdentification") - private String senderInternalIdentification; - - /** - * The sender internal sub identification. - */ - @JsonProperty(value = "senderInternalSubIdentification") - private String senderInternalSubIdentification; - - /** - * The receiver internal identification. - */ - @JsonProperty(value = "receiverInternalIdentification") - private String receiverInternalIdentification; - - /** - * The receiver internal sub identification. - */ - @JsonProperty(value = "receiverInternalSubIdentification") - private String receiverInternalSubIdentification; - - /** - * Get the groupAssociationAssignedCode value. - * - * @return the groupAssociationAssignedCode value - */ - public String groupAssociationAssignedCode() { - return this.groupAssociationAssignedCode; - } - - /** - * Set the groupAssociationAssignedCode value. - * - * @param groupAssociationAssignedCode the groupAssociationAssignedCode value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupAssociationAssignedCode(String groupAssociationAssignedCode) { - this.groupAssociationAssignedCode = groupAssociationAssignedCode; - return this; - } - - /** - * Get the communicationAgreementId value. - * - * @return the communicationAgreementId value - */ - public String communicationAgreementId() { - return this.communicationAgreementId; - } - - /** - * Set the communicationAgreementId value. - * - * @param communicationAgreementId the communicationAgreementId value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withCommunicationAgreementId(String communicationAgreementId) { - this.communicationAgreementId = communicationAgreementId; - return this; - } - - /** - * Get the applyDelimiterStringAdvice value. - * - * @return the applyDelimiterStringAdvice value - */ - public boolean applyDelimiterStringAdvice() { - return this.applyDelimiterStringAdvice; - } - - /** - * Set the applyDelimiterStringAdvice value. - * - * @param applyDelimiterStringAdvice the applyDelimiterStringAdvice value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withApplyDelimiterStringAdvice(boolean applyDelimiterStringAdvice) { - this.applyDelimiterStringAdvice = applyDelimiterStringAdvice; - return this; - } - - /** - * Get the createGroupingSegments value. - * - * @return the createGroupingSegments value - */ - public boolean createGroupingSegments() { - return this.createGroupingSegments; - } - - /** - * Set the createGroupingSegments value. - * - * @param createGroupingSegments the createGroupingSegments value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withCreateGroupingSegments(boolean createGroupingSegments) { - this.createGroupingSegments = createGroupingSegments; - return this; - } - - /** - * Get the enableDefaultGroupHeaders value. - * - * @return the enableDefaultGroupHeaders value - */ - public boolean enableDefaultGroupHeaders() { - return this.enableDefaultGroupHeaders; - } - - /** - * Set the enableDefaultGroupHeaders value. - * - * @param enableDefaultGroupHeaders the enableDefaultGroupHeaders value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withEnableDefaultGroupHeaders(boolean enableDefaultGroupHeaders) { - this.enableDefaultGroupHeaders = enableDefaultGroupHeaders; - return this; - } - - /** - * Get the recipientReferencePasswordValue value. - * - * @return the recipientReferencePasswordValue value - */ - public String recipientReferencePasswordValue() { - return this.recipientReferencePasswordValue; - } - - /** - * Set the recipientReferencePasswordValue value. - * - * @param recipientReferencePasswordValue the recipientReferencePasswordValue value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withRecipientReferencePasswordValue(String recipientReferencePasswordValue) { - this.recipientReferencePasswordValue = recipientReferencePasswordValue; - return this; - } - - /** - * Get the recipientReferencePasswordQualifier value. - * - * @return the recipientReferencePasswordQualifier value - */ - public String recipientReferencePasswordQualifier() { - return this.recipientReferencePasswordQualifier; - } - - /** - * Set the recipientReferencePasswordQualifier value. - * - * @param recipientReferencePasswordQualifier the recipientReferencePasswordQualifier value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withRecipientReferencePasswordQualifier(String recipientReferencePasswordQualifier) { - this.recipientReferencePasswordQualifier = recipientReferencePasswordQualifier; - return this; - } - - /** - * Get the applicationReferenceId value. - * - * @return the applicationReferenceId value - */ - public String applicationReferenceId() { - return this.applicationReferenceId; - } - - /** - * Set the applicationReferenceId value. - * - * @param applicationReferenceId the applicationReferenceId value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withApplicationReferenceId(String applicationReferenceId) { - this.applicationReferenceId = applicationReferenceId; - return this; - } - - /** - * Get the processingPriorityCode value. - * - * @return the processingPriorityCode value - */ - public String processingPriorityCode() { - return this.processingPriorityCode; - } - - /** - * Set the processingPriorityCode value. - * - * @param processingPriorityCode the processingPriorityCode value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withProcessingPriorityCode(String processingPriorityCode) { - this.processingPriorityCode = processingPriorityCode; - return this; - } - - /** - * Get the interchangeControlNumberLowerBound value. - * - * @return the interchangeControlNumberLowerBound value - */ - public long interchangeControlNumberLowerBound() { - return this.interchangeControlNumberLowerBound; - } - - /** - * Set the interchangeControlNumberLowerBound value. - * - * @param interchangeControlNumberLowerBound the interchangeControlNumberLowerBound value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withInterchangeControlNumberLowerBound(long interchangeControlNumberLowerBound) { - this.interchangeControlNumberLowerBound = interchangeControlNumberLowerBound; - return this; - } - - /** - * Get the interchangeControlNumberUpperBound value. - * - * @return the interchangeControlNumberUpperBound value - */ - public long interchangeControlNumberUpperBound() { - return this.interchangeControlNumberUpperBound; - } - - /** - * Set the interchangeControlNumberUpperBound value. - * - * @param interchangeControlNumberUpperBound the interchangeControlNumberUpperBound value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withInterchangeControlNumberUpperBound(long interchangeControlNumberUpperBound) { - this.interchangeControlNumberUpperBound = interchangeControlNumberUpperBound; - return this; - } - - /** - * Get the rolloverInterchangeControlNumber value. - * - * @return the rolloverInterchangeControlNumber value - */ - public boolean rolloverInterchangeControlNumber() { - return this.rolloverInterchangeControlNumber; - } - - /** - * Set the rolloverInterchangeControlNumber value. - * - * @param rolloverInterchangeControlNumber the rolloverInterchangeControlNumber value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withRolloverInterchangeControlNumber(boolean rolloverInterchangeControlNumber) { - this.rolloverInterchangeControlNumber = rolloverInterchangeControlNumber; - return this; - } - - /** - * Get the interchangeControlNumberPrefix value. - * - * @return the interchangeControlNumberPrefix value - */ - public String interchangeControlNumberPrefix() { - return this.interchangeControlNumberPrefix; - } - - /** - * Set the interchangeControlNumberPrefix value. - * - * @param interchangeControlNumberPrefix the interchangeControlNumberPrefix value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withInterchangeControlNumberPrefix(String interchangeControlNumberPrefix) { - this.interchangeControlNumberPrefix = interchangeControlNumberPrefix; - return this; - } - - /** - * Get the interchangeControlNumberSuffix value. - * - * @return the interchangeControlNumberSuffix value - */ - public String interchangeControlNumberSuffix() { - return this.interchangeControlNumberSuffix; - } - - /** - * Set the interchangeControlNumberSuffix value. - * - * @param interchangeControlNumberSuffix the interchangeControlNumberSuffix value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withInterchangeControlNumberSuffix(String interchangeControlNumberSuffix) { - this.interchangeControlNumberSuffix = interchangeControlNumberSuffix; - return this; - } - - /** - * Get the senderReverseRoutingAddress value. - * - * @return the senderReverseRoutingAddress value - */ - public String senderReverseRoutingAddress() { - return this.senderReverseRoutingAddress; - } - - /** - * Set the senderReverseRoutingAddress value. - * - * @param senderReverseRoutingAddress the senderReverseRoutingAddress value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withSenderReverseRoutingAddress(String senderReverseRoutingAddress) { - this.senderReverseRoutingAddress = senderReverseRoutingAddress; - return this; - } - - /** - * Get the receiverReverseRoutingAddress value. - * - * @return the receiverReverseRoutingAddress value - */ - public String receiverReverseRoutingAddress() { - return this.receiverReverseRoutingAddress; - } - - /** - * Set the receiverReverseRoutingAddress value. - * - * @param receiverReverseRoutingAddress the receiverReverseRoutingAddress value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withReceiverReverseRoutingAddress(String receiverReverseRoutingAddress) { - this.receiverReverseRoutingAddress = receiverReverseRoutingAddress; - return this; - } - - /** - * Get the functionalGroupId value. - * - * @return the functionalGroupId value - */ - public String functionalGroupId() { - return this.functionalGroupId; - } - - /** - * Set the functionalGroupId value. - * - * @param functionalGroupId the functionalGroupId value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withFunctionalGroupId(String functionalGroupId) { - this.functionalGroupId = functionalGroupId; - return this; - } - - /** - * Get the groupControllingAgencyCode value. - * - * @return the groupControllingAgencyCode value - */ - public String groupControllingAgencyCode() { - return this.groupControllingAgencyCode; - } - - /** - * Set the groupControllingAgencyCode value. - * - * @param groupControllingAgencyCode the groupControllingAgencyCode value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupControllingAgencyCode(String groupControllingAgencyCode) { - this.groupControllingAgencyCode = groupControllingAgencyCode; - return this; - } - - /** - * Get the groupMessageVersion value. - * - * @return the groupMessageVersion value - */ - public String groupMessageVersion() { - return this.groupMessageVersion; - } - - /** - * Set the groupMessageVersion value. - * - * @param groupMessageVersion the groupMessageVersion value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupMessageVersion(String groupMessageVersion) { - this.groupMessageVersion = groupMessageVersion; - return this; - } - - /** - * Get the groupMessageRelease value. - * - * @return the groupMessageRelease value - */ - public String groupMessageRelease() { - return this.groupMessageRelease; - } - - /** - * Set the groupMessageRelease value. - * - * @param groupMessageRelease the groupMessageRelease value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupMessageRelease(String groupMessageRelease) { - this.groupMessageRelease = groupMessageRelease; - return this; - } - - /** - * Get the groupControlNumberLowerBound value. - * - * @return the groupControlNumberLowerBound value - */ - public long groupControlNumberLowerBound() { - return this.groupControlNumberLowerBound; - } - - /** - * Set the groupControlNumberLowerBound value. - * - * @param groupControlNumberLowerBound the groupControlNumberLowerBound value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupControlNumberLowerBound(long groupControlNumberLowerBound) { - this.groupControlNumberLowerBound = groupControlNumberLowerBound; - return this; - } - - /** - * Get the groupControlNumberUpperBound value. - * - * @return the groupControlNumberUpperBound value - */ - public long groupControlNumberUpperBound() { - return this.groupControlNumberUpperBound; - } - - /** - * Set the groupControlNumberUpperBound value. - * - * @param groupControlNumberUpperBound the groupControlNumberUpperBound value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupControlNumberUpperBound(long groupControlNumberUpperBound) { - this.groupControlNumberUpperBound = groupControlNumberUpperBound; - return this; - } - - /** - * Get the rolloverGroupControlNumber value. - * - * @return the rolloverGroupControlNumber value - */ - public boolean rolloverGroupControlNumber() { - return this.rolloverGroupControlNumber; - } - - /** - * Set the rolloverGroupControlNumber value. - * - * @param rolloverGroupControlNumber the rolloverGroupControlNumber value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withRolloverGroupControlNumber(boolean rolloverGroupControlNumber) { - this.rolloverGroupControlNumber = rolloverGroupControlNumber; - return this; - } - - /** - * Get the groupControlNumberPrefix value. - * - * @return the groupControlNumberPrefix value - */ - public String groupControlNumberPrefix() { - return this.groupControlNumberPrefix; - } - - /** - * Set the groupControlNumberPrefix value. - * - * @param groupControlNumberPrefix the groupControlNumberPrefix value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupControlNumberPrefix(String groupControlNumberPrefix) { - this.groupControlNumberPrefix = groupControlNumberPrefix; - return this; - } - - /** - * Get the groupControlNumberSuffix value. - * - * @return the groupControlNumberSuffix value - */ - public String groupControlNumberSuffix() { - return this.groupControlNumberSuffix; - } - - /** - * Set the groupControlNumberSuffix value. - * - * @param groupControlNumberSuffix the groupControlNumberSuffix value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupControlNumberSuffix(String groupControlNumberSuffix) { - this.groupControlNumberSuffix = groupControlNumberSuffix; - return this; - } - - /** - * Get the groupApplicationReceiverQualifier value. - * - * @return the groupApplicationReceiverQualifier value - */ - public String groupApplicationReceiverQualifier() { - return this.groupApplicationReceiverQualifier; - } - - /** - * Set the groupApplicationReceiverQualifier value. - * - * @param groupApplicationReceiverQualifier the groupApplicationReceiverQualifier value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupApplicationReceiverQualifier(String groupApplicationReceiverQualifier) { - this.groupApplicationReceiverQualifier = groupApplicationReceiverQualifier; - return this; - } - - /** - * Get the groupApplicationReceiverId value. - * - * @return the groupApplicationReceiverId value - */ - public String groupApplicationReceiverId() { - return this.groupApplicationReceiverId; - } - - /** - * Set the groupApplicationReceiverId value. - * - * @param groupApplicationReceiverId the groupApplicationReceiverId value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupApplicationReceiverId(String groupApplicationReceiverId) { - this.groupApplicationReceiverId = groupApplicationReceiverId; - return this; - } - - /** - * Get the groupApplicationSenderQualifier value. - * - * @return the groupApplicationSenderQualifier value - */ - public String groupApplicationSenderQualifier() { - return this.groupApplicationSenderQualifier; - } - - /** - * Set the groupApplicationSenderQualifier value. - * - * @param groupApplicationSenderQualifier the groupApplicationSenderQualifier value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupApplicationSenderQualifier(String groupApplicationSenderQualifier) { - this.groupApplicationSenderQualifier = groupApplicationSenderQualifier; - return this; - } - - /** - * Get the groupApplicationSenderId value. - * - * @return the groupApplicationSenderId value - */ - public String groupApplicationSenderId() { - return this.groupApplicationSenderId; - } - - /** - * Set the groupApplicationSenderId value. - * - * @param groupApplicationSenderId the groupApplicationSenderId value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupApplicationSenderId(String groupApplicationSenderId) { - this.groupApplicationSenderId = groupApplicationSenderId; - return this; - } - - /** - * Get the groupApplicationPassword value. - * - * @return the groupApplicationPassword value - */ - public String groupApplicationPassword() { - return this.groupApplicationPassword; - } - - /** - * Set the groupApplicationPassword value. - * - * @param groupApplicationPassword the groupApplicationPassword value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withGroupApplicationPassword(String groupApplicationPassword) { - this.groupApplicationPassword = groupApplicationPassword; - return this; - } - - /** - * Get the overwriteExistingTransactionSetControlNumber value. - * - * @return the overwriteExistingTransactionSetControlNumber value - */ - public boolean overwriteExistingTransactionSetControlNumber() { - return this.overwriteExistingTransactionSetControlNumber; - } - - /** - * Set the overwriteExistingTransactionSetControlNumber value. - * - * @param overwriteExistingTransactionSetControlNumber the overwriteExistingTransactionSetControlNumber value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withOverwriteExistingTransactionSetControlNumber(boolean overwriteExistingTransactionSetControlNumber) { - this.overwriteExistingTransactionSetControlNumber = overwriteExistingTransactionSetControlNumber; - return this; - } - - /** - * Get the transactionSetControlNumberPrefix value. - * - * @return the transactionSetControlNumberPrefix value - */ - public String transactionSetControlNumberPrefix() { - return this.transactionSetControlNumberPrefix; - } - - /** - * Set the transactionSetControlNumberPrefix value. - * - * @param transactionSetControlNumberPrefix the transactionSetControlNumberPrefix value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withTransactionSetControlNumberPrefix(String transactionSetControlNumberPrefix) { - this.transactionSetControlNumberPrefix = transactionSetControlNumberPrefix; - return this; - } - - /** - * Get the transactionSetControlNumberSuffix value. - * - * @return the transactionSetControlNumberSuffix value - */ - public String transactionSetControlNumberSuffix() { - return this.transactionSetControlNumberSuffix; - } - - /** - * Set the transactionSetControlNumberSuffix value. - * - * @param transactionSetControlNumberSuffix the transactionSetControlNumberSuffix value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withTransactionSetControlNumberSuffix(String transactionSetControlNumberSuffix) { - this.transactionSetControlNumberSuffix = transactionSetControlNumberSuffix; - return this; - } - - /** - * Get the transactionSetControlNumberLowerBound value. - * - * @return the transactionSetControlNumberLowerBound value - */ - public long transactionSetControlNumberLowerBound() { - return this.transactionSetControlNumberLowerBound; - } - - /** - * Set the transactionSetControlNumberLowerBound value. - * - * @param transactionSetControlNumberLowerBound the transactionSetControlNumberLowerBound value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withTransactionSetControlNumberLowerBound(long transactionSetControlNumberLowerBound) { - this.transactionSetControlNumberLowerBound = transactionSetControlNumberLowerBound; - return this; - } - - /** - * Get the transactionSetControlNumberUpperBound value. - * - * @return the transactionSetControlNumberUpperBound value - */ - public long transactionSetControlNumberUpperBound() { - return this.transactionSetControlNumberUpperBound; - } - - /** - * Set the transactionSetControlNumberUpperBound value. - * - * @param transactionSetControlNumberUpperBound the transactionSetControlNumberUpperBound value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withTransactionSetControlNumberUpperBound(long transactionSetControlNumberUpperBound) { - this.transactionSetControlNumberUpperBound = transactionSetControlNumberUpperBound; - return this; - } - - /** - * Get the rolloverTransactionSetControlNumber value. - * - * @return the rolloverTransactionSetControlNumber value - */ - public boolean rolloverTransactionSetControlNumber() { - return this.rolloverTransactionSetControlNumber; - } - - /** - * Set the rolloverTransactionSetControlNumber value. - * - * @param rolloverTransactionSetControlNumber the rolloverTransactionSetControlNumber value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withRolloverTransactionSetControlNumber(boolean rolloverTransactionSetControlNumber) { - this.rolloverTransactionSetControlNumber = rolloverTransactionSetControlNumber; - return this; - } - - /** - * Get the isTestInterchange value. - * - * @return the isTestInterchange value - */ - public boolean isTestInterchange() { - return this.isTestInterchange; - } - - /** - * Set the isTestInterchange value. - * - * @param isTestInterchange the isTestInterchange value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withIsTestInterchange(boolean isTestInterchange) { - this.isTestInterchange = isTestInterchange; - return this; - } - - /** - * Get the senderInternalIdentification value. - * - * @return the senderInternalIdentification value - */ - public String senderInternalIdentification() { - return this.senderInternalIdentification; - } - - /** - * Set the senderInternalIdentification value. - * - * @param senderInternalIdentification the senderInternalIdentification value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withSenderInternalIdentification(String senderInternalIdentification) { - this.senderInternalIdentification = senderInternalIdentification; - return this; - } - - /** - * Get the senderInternalSubIdentification value. - * - * @return the senderInternalSubIdentification value - */ - public String senderInternalSubIdentification() { - return this.senderInternalSubIdentification; - } - - /** - * Set the senderInternalSubIdentification value. - * - * @param senderInternalSubIdentification the senderInternalSubIdentification value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withSenderInternalSubIdentification(String senderInternalSubIdentification) { - this.senderInternalSubIdentification = senderInternalSubIdentification; - return this; - } - - /** - * Get the receiverInternalIdentification value. - * - * @return the receiverInternalIdentification value - */ - public String receiverInternalIdentification() { - return this.receiverInternalIdentification; - } - - /** - * Set the receiverInternalIdentification value. - * - * @param receiverInternalIdentification the receiverInternalIdentification value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withReceiverInternalIdentification(String receiverInternalIdentification) { - this.receiverInternalIdentification = receiverInternalIdentification; - return this; - } - - /** - * Get the receiverInternalSubIdentification value. - * - * @return the receiverInternalSubIdentification value - */ - public String receiverInternalSubIdentification() { - return this.receiverInternalSubIdentification; - } - - /** - * Set the receiverInternalSubIdentification value. - * - * @param receiverInternalSubIdentification the receiverInternalSubIdentification value to set - * @return the EdifactEnvelopeSettings object itself. - */ - public EdifactEnvelopeSettings withReceiverInternalSubIdentification(String receiverInternalSubIdentification) { - this.receiverInternalSubIdentification = receiverInternalSubIdentification; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactFramingSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactFramingSettings.java deleted file mode 100755 index a3b16cdc955..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactFramingSettings.java +++ /dev/null @@ -1,307 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact agreement framing settings. - */ -public class EdifactFramingSettings { - /** - * The service code list directory version. - */ - @JsonProperty(value = "serviceCodeListDirectoryVersion") - private String serviceCodeListDirectoryVersion; - - /** - * The character encoding. - */ - @JsonProperty(value = "characterEncoding") - private String characterEncoding; - - /** - * The protocol version. - */ - @JsonProperty(value = "protocolVersion", required = true) - private int protocolVersion; - - /** - * The data element separator. - */ - @JsonProperty(value = "dataElementSeparator", required = true) - private int dataElementSeparator; - - /** - * The component separator. - */ - @JsonProperty(value = "componentSeparator", required = true) - private int componentSeparator; - - /** - * The segment terminator. - */ - @JsonProperty(value = "segmentTerminator", required = true) - private int segmentTerminator; - - /** - * The release indicator. - */ - @JsonProperty(value = "releaseIndicator", required = true) - private int releaseIndicator; - - /** - * The repetition separator. - */ - @JsonProperty(value = "repetitionSeparator", required = true) - private int repetitionSeparator; - - /** - * The EDIFACT frame setting characterSet. Possible values include: - * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', - * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA'. - */ - @JsonProperty(value = "characterSet", required = true) - private EdifactCharacterSet characterSet; - - /** - * The EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal'. - */ - @JsonProperty(value = "decimalPointIndicator", required = true) - private EdifactDecimalIndicator decimalPointIndicator; - - /** - * The EDIFACT frame setting segment terminator suffix. Possible values - * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF'. - */ - @JsonProperty(value = "segmentTerminatorSuffix", required = true) - private SegmentTerminatorSuffix segmentTerminatorSuffix; - - /** - * Get the serviceCodeListDirectoryVersion value. - * - * @return the serviceCodeListDirectoryVersion value - */ - public String serviceCodeListDirectoryVersion() { - return this.serviceCodeListDirectoryVersion; - } - - /** - * Set the serviceCodeListDirectoryVersion value. - * - * @param serviceCodeListDirectoryVersion the serviceCodeListDirectoryVersion value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withServiceCodeListDirectoryVersion(String serviceCodeListDirectoryVersion) { - this.serviceCodeListDirectoryVersion = serviceCodeListDirectoryVersion; - return this; - } - - /** - * Get the characterEncoding value. - * - * @return the characterEncoding value - */ - public String characterEncoding() { - return this.characterEncoding; - } - - /** - * Set the characterEncoding value. - * - * @param characterEncoding the characterEncoding value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withCharacterEncoding(String characterEncoding) { - this.characterEncoding = characterEncoding; - return this; - } - - /** - * Get the protocolVersion value. - * - * @return the protocolVersion value - */ - public int protocolVersion() { - return this.protocolVersion; - } - - /** - * Set the protocolVersion value. - * - * @param protocolVersion the protocolVersion value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withProtocolVersion(int protocolVersion) { - this.protocolVersion = protocolVersion; - return this; - } - - /** - * Get the dataElementSeparator value. - * - * @return the dataElementSeparator value - */ - public int dataElementSeparator() { - return this.dataElementSeparator; - } - - /** - * Set the dataElementSeparator value. - * - * @param dataElementSeparator the dataElementSeparator value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withDataElementSeparator(int dataElementSeparator) { - this.dataElementSeparator = dataElementSeparator; - return this; - } - - /** - * Get the componentSeparator value. - * - * @return the componentSeparator value - */ - public int componentSeparator() { - return this.componentSeparator; - } - - /** - * Set the componentSeparator value. - * - * @param componentSeparator the componentSeparator value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withComponentSeparator(int componentSeparator) { - this.componentSeparator = componentSeparator; - return this; - } - - /** - * Get the segmentTerminator value. - * - * @return the segmentTerminator value - */ - public int segmentTerminator() { - return this.segmentTerminator; - } - - /** - * Set the segmentTerminator value. - * - * @param segmentTerminator the segmentTerminator value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withSegmentTerminator(int segmentTerminator) { - this.segmentTerminator = segmentTerminator; - return this; - } - - /** - * Get the releaseIndicator value. - * - * @return the releaseIndicator value - */ - public int releaseIndicator() { - return this.releaseIndicator; - } - - /** - * Set the releaseIndicator value. - * - * @param releaseIndicator the releaseIndicator value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withReleaseIndicator(int releaseIndicator) { - this.releaseIndicator = releaseIndicator; - return this; - } - - /** - * Get the repetitionSeparator value. - * - * @return the repetitionSeparator value - */ - public int repetitionSeparator() { - return this.repetitionSeparator; - } - - /** - * Set the repetitionSeparator value. - * - * @param repetitionSeparator the repetitionSeparator value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withRepetitionSeparator(int repetitionSeparator) { - this.repetitionSeparator = repetitionSeparator; - return this; - } - - /** - * Get the characterSet value. - * - * @return the characterSet value - */ - public EdifactCharacterSet characterSet() { - return this.characterSet; - } - - /** - * Set the characterSet value. - * - * @param characterSet the characterSet value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withCharacterSet(EdifactCharacterSet characterSet) { - this.characterSet = characterSet; - return this; - } - - /** - * Get the decimalPointIndicator value. - * - * @return the decimalPointIndicator value - */ - public EdifactDecimalIndicator decimalPointIndicator() { - return this.decimalPointIndicator; - } - - /** - * Set the decimalPointIndicator value. - * - * @param decimalPointIndicator the decimalPointIndicator value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withDecimalPointIndicator(EdifactDecimalIndicator decimalPointIndicator) { - this.decimalPointIndicator = decimalPointIndicator; - return this; - } - - /** - * Get the segmentTerminatorSuffix value. - * - * @return the segmentTerminatorSuffix value - */ - public SegmentTerminatorSuffix segmentTerminatorSuffix() { - return this.segmentTerminatorSuffix; - } - - /** - * Set the segmentTerminatorSuffix value. - * - * @param segmentTerminatorSuffix the segmentTerminatorSuffix value to set - * @return the EdifactFramingSettings object itself. - */ - public EdifactFramingSettings withSegmentTerminatorSuffix(SegmentTerminatorSuffix segmentTerminatorSuffix) { - this.segmentTerminatorSuffix = segmentTerminatorSuffix; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactMessageFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactMessageFilter.java deleted file mode 100755 index cf4f408e5c8..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactMessageFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact message filter for odata query. - */ -public class EdifactMessageFilter { - /** - * The message filter type. Possible values include: 'NotSpecified', - * 'Include', 'Exclude'. - */ - @JsonProperty(value = "messageFilterType", required = true) - private MessageFilterType messageFilterType; - - /** - * Get the messageFilterType value. - * - * @return the messageFilterType value - */ - public MessageFilterType messageFilterType() { - return this.messageFilterType; - } - - /** - * Set the messageFilterType value. - * - * @param messageFilterType the messageFilterType value to set - * @return the EdifactMessageFilter object itself. - */ - public EdifactMessageFilter withMessageFilterType(MessageFilterType messageFilterType) { - this.messageFilterType = messageFilterType; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactMessageIdentifier.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactMessageIdentifier.java deleted file mode 100755 index 533e673ca05..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactMessageIdentifier.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact message identifier. - */ -public class EdifactMessageIdentifier { - /** - * The message id on which this envelope settings has to be applied. - */ - @JsonProperty(value = "messageId", required = true) - private String messageId; - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the EdifactMessageIdentifier object itself. - */ - public EdifactMessageIdentifier withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactOneWayAgreement.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactOneWayAgreement.java deleted file mode 100755 index 95aae9c2696..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactOneWayAgreement.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact one way agreement. - */ -public class EdifactOneWayAgreement { - /** - * The sender business identity. - */ - @JsonProperty(value = "senderBusinessIdentity", required = true) - private BusinessIdentity senderBusinessIdentity; - - /** - * The receiver business identity. - */ - @JsonProperty(value = "receiverBusinessIdentity", required = true) - private BusinessIdentity receiverBusinessIdentity; - - /** - * The EDIFACT protocol settings. - */ - @JsonProperty(value = "protocolSettings", required = true) - private EdifactProtocolSettings protocolSettings; - - /** - * Get the senderBusinessIdentity value. - * - * @return the senderBusinessIdentity value - */ - public BusinessIdentity senderBusinessIdentity() { - return this.senderBusinessIdentity; - } - - /** - * Set the senderBusinessIdentity value. - * - * @param senderBusinessIdentity the senderBusinessIdentity value to set - * @return the EdifactOneWayAgreement object itself. - */ - public EdifactOneWayAgreement withSenderBusinessIdentity(BusinessIdentity senderBusinessIdentity) { - this.senderBusinessIdentity = senderBusinessIdentity; - return this; - } - - /** - * Get the receiverBusinessIdentity value. - * - * @return the receiverBusinessIdentity value - */ - public BusinessIdentity receiverBusinessIdentity() { - return this.receiverBusinessIdentity; - } - - /** - * Set the receiverBusinessIdentity value. - * - * @param receiverBusinessIdentity the receiverBusinessIdentity value to set - * @return the EdifactOneWayAgreement object itself. - */ - public EdifactOneWayAgreement withReceiverBusinessIdentity(BusinessIdentity receiverBusinessIdentity) { - this.receiverBusinessIdentity = receiverBusinessIdentity; - return this; - } - - /** - * Get the protocolSettings value. - * - * @return the protocolSettings value - */ - public EdifactProtocolSettings protocolSettings() { - return this.protocolSettings; - } - - /** - * Set the protocolSettings value. - * - * @param protocolSettings the protocolSettings value to set - * @return the EdifactOneWayAgreement object itself. - */ - public EdifactOneWayAgreement withProtocolSettings(EdifactProtocolSettings protocolSettings) { - this.protocolSettings = protocolSettings; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactProcessingSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactProcessingSettings.java deleted file mode 100755 index d1f4741ba03..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactProcessingSettings.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact agreement protocol settings. - */ -public class EdifactProcessingSettings { - /** - * The value indicating whether to mask security information. - */ - @JsonProperty(value = "maskSecurityInfo", required = true) - private boolean maskSecurityInfo; - - /** - * The value indicating whether to preserve interchange. - */ - @JsonProperty(value = "preserveInterchange", required = true) - private boolean preserveInterchange; - - /** - * The value indicating whether to suspend interchange on error. - */ - @JsonProperty(value = "suspendInterchangeOnError", required = true) - private boolean suspendInterchangeOnError; - - /** - * The value indicating whether to create empty xml tags for trailing - * separators. - */ - @JsonProperty(value = "createEmptyXmlTagsForTrailingSeparators", required = true) - private boolean createEmptyXmlTagsForTrailingSeparators; - - /** - * The value indicating whether to use dot as decimal separator. - */ - @JsonProperty(value = "useDotAsDecimalSeparator", required = true) - private boolean useDotAsDecimalSeparator; - - /** - * Get the maskSecurityInfo value. - * - * @return the maskSecurityInfo value - */ - public boolean maskSecurityInfo() { - return this.maskSecurityInfo; - } - - /** - * Set the maskSecurityInfo value. - * - * @param maskSecurityInfo the maskSecurityInfo value to set - * @return the EdifactProcessingSettings object itself. - */ - public EdifactProcessingSettings withMaskSecurityInfo(boolean maskSecurityInfo) { - this.maskSecurityInfo = maskSecurityInfo; - return this; - } - - /** - * Get the preserveInterchange value. - * - * @return the preserveInterchange value - */ - public boolean preserveInterchange() { - return this.preserveInterchange; - } - - /** - * Set the preserveInterchange value. - * - * @param preserveInterchange the preserveInterchange value to set - * @return the EdifactProcessingSettings object itself. - */ - public EdifactProcessingSettings withPreserveInterchange(boolean preserveInterchange) { - this.preserveInterchange = preserveInterchange; - return this; - } - - /** - * Get the suspendInterchangeOnError value. - * - * @return the suspendInterchangeOnError value - */ - public boolean suspendInterchangeOnError() { - return this.suspendInterchangeOnError; - } - - /** - * Set the suspendInterchangeOnError value. - * - * @param suspendInterchangeOnError the suspendInterchangeOnError value to set - * @return the EdifactProcessingSettings object itself. - */ - public EdifactProcessingSettings withSuspendInterchangeOnError(boolean suspendInterchangeOnError) { - this.suspendInterchangeOnError = suspendInterchangeOnError; - return this; - } - - /** - * Get the createEmptyXmlTagsForTrailingSeparators value. - * - * @return the createEmptyXmlTagsForTrailingSeparators value - */ - public boolean createEmptyXmlTagsForTrailingSeparators() { - return this.createEmptyXmlTagsForTrailingSeparators; - } - - /** - * Set the createEmptyXmlTagsForTrailingSeparators value. - * - * @param createEmptyXmlTagsForTrailingSeparators the createEmptyXmlTagsForTrailingSeparators value to set - * @return the EdifactProcessingSettings object itself. - */ - public EdifactProcessingSettings withCreateEmptyXmlTagsForTrailingSeparators(boolean createEmptyXmlTagsForTrailingSeparators) { - this.createEmptyXmlTagsForTrailingSeparators = createEmptyXmlTagsForTrailingSeparators; - return this; - } - - /** - * Get the useDotAsDecimalSeparator value. - * - * @return the useDotAsDecimalSeparator value - */ - public boolean useDotAsDecimalSeparator() { - return this.useDotAsDecimalSeparator; - } - - /** - * Set the useDotAsDecimalSeparator value. - * - * @param useDotAsDecimalSeparator the useDotAsDecimalSeparator value to set - * @return the EdifactProcessingSettings object itself. - */ - public EdifactProcessingSettings withUseDotAsDecimalSeparator(boolean useDotAsDecimalSeparator) { - this.useDotAsDecimalSeparator = useDotAsDecimalSeparator; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactProtocolSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactProtocolSettings.java deleted file mode 100755 index 3c69e47b018..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactProtocolSettings.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact agreement protocol settings. - */ -public class EdifactProtocolSettings { - /** - * The EDIFACT validation settings. - */ - @JsonProperty(value = "validationSettings", required = true) - private EdifactValidationSettings validationSettings; - - /** - * The EDIFACT framing settings. - */ - @JsonProperty(value = "framingSettings", required = true) - private EdifactFramingSettings framingSettings; - - /** - * The EDIFACT envelope settings. - */ - @JsonProperty(value = "envelopeSettings", required = true) - private EdifactEnvelopeSettings envelopeSettings; - - /** - * The EDIFACT acknowledgement settings. - */ - @JsonProperty(value = "acknowledgementSettings", required = true) - private EdifactAcknowledgementSettings acknowledgementSettings; - - /** - * The EDIFACT message filter. - */ - @JsonProperty(value = "messageFilter", required = true) - private EdifactMessageFilter messageFilter; - - /** - * The EDIFACT processing Settings. - */ - @JsonProperty(value = "processingSettings", required = true) - private EdifactProcessingSettings processingSettings; - - /** - * The EDIFACT envelope override settings. - */ - @JsonProperty(value = "envelopeOverrides") - private List envelopeOverrides; - - /** - * The EDIFACT message filter list. - */ - @JsonProperty(value = "messageFilterList") - private List messageFilterList; - - /** - * The EDIFACT schema references. - */ - @JsonProperty(value = "schemaReferences", required = true) - private List schemaReferences; - - /** - * The EDIFACT validation override settings. - */ - @JsonProperty(value = "validationOverrides") - private List validationOverrides; - - /** - * The EDIFACT delimiter override settings. - */ - @JsonProperty(value = "edifactDelimiterOverrides") - private List edifactDelimiterOverrides; - - /** - * Get the validationSettings value. - * - * @return the validationSettings value - */ - public EdifactValidationSettings validationSettings() { - return this.validationSettings; - } - - /** - * Set the validationSettings value. - * - * @param validationSettings the validationSettings value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withValidationSettings(EdifactValidationSettings validationSettings) { - this.validationSettings = validationSettings; - return this; - } - - /** - * Get the framingSettings value. - * - * @return the framingSettings value - */ - public EdifactFramingSettings framingSettings() { - return this.framingSettings; - } - - /** - * Set the framingSettings value. - * - * @param framingSettings the framingSettings value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withFramingSettings(EdifactFramingSettings framingSettings) { - this.framingSettings = framingSettings; - return this; - } - - /** - * Get the envelopeSettings value. - * - * @return the envelopeSettings value - */ - public EdifactEnvelopeSettings envelopeSettings() { - return this.envelopeSettings; - } - - /** - * Set the envelopeSettings value. - * - * @param envelopeSettings the envelopeSettings value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withEnvelopeSettings(EdifactEnvelopeSettings envelopeSettings) { - this.envelopeSettings = envelopeSettings; - return this; - } - - /** - * Get the acknowledgementSettings value. - * - * @return the acknowledgementSettings value - */ - public EdifactAcknowledgementSettings acknowledgementSettings() { - return this.acknowledgementSettings; - } - - /** - * Set the acknowledgementSettings value. - * - * @param acknowledgementSettings the acknowledgementSettings value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withAcknowledgementSettings(EdifactAcknowledgementSettings acknowledgementSettings) { - this.acknowledgementSettings = acknowledgementSettings; - return this; - } - - /** - * Get the messageFilter value. - * - * @return the messageFilter value - */ - public EdifactMessageFilter messageFilter() { - return this.messageFilter; - } - - /** - * Set the messageFilter value. - * - * @param messageFilter the messageFilter value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withMessageFilter(EdifactMessageFilter messageFilter) { - this.messageFilter = messageFilter; - return this; - } - - /** - * Get the processingSettings value. - * - * @return the processingSettings value - */ - public EdifactProcessingSettings processingSettings() { - return this.processingSettings; - } - - /** - * Set the processingSettings value. - * - * @param processingSettings the processingSettings value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withProcessingSettings(EdifactProcessingSettings processingSettings) { - this.processingSettings = processingSettings; - return this; - } - - /** - * Get the envelopeOverrides value. - * - * @return the envelopeOverrides value - */ - public List envelopeOverrides() { - return this.envelopeOverrides; - } - - /** - * Set the envelopeOverrides value. - * - * @param envelopeOverrides the envelopeOverrides value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withEnvelopeOverrides(List envelopeOverrides) { - this.envelopeOverrides = envelopeOverrides; - return this; - } - - /** - * Get the messageFilterList value. - * - * @return the messageFilterList value - */ - public List messageFilterList() { - return this.messageFilterList; - } - - /** - * Set the messageFilterList value. - * - * @param messageFilterList the messageFilterList value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withMessageFilterList(List messageFilterList) { - this.messageFilterList = messageFilterList; - return this; - } - - /** - * Get the schemaReferences value. - * - * @return the schemaReferences value - */ - public List schemaReferences() { - return this.schemaReferences; - } - - /** - * Set the schemaReferences value. - * - * @param schemaReferences the schemaReferences value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withSchemaReferences(List schemaReferences) { - this.schemaReferences = schemaReferences; - return this; - } - - /** - * Get the validationOverrides value. - * - * @return the validationOverrides value - */ - public List validationOverrides() { - return this.validationOverrides; - } - - /** - * Set the validationOverrides value. - * - * @param validationOverrides the validationOverrides value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withValidationOverrides(List validationOverrides) { - this.validationOverrides = validationOverrides; - return this; - } - - /** - * Get the edifactDelimiterOverrides value. - * - * @return the edifactDelimiterOverrides value - */ - public List edifactDelimiterOverrides() { - return this.edifactDelimiterOverrides; - } - - /** - * Set the edifactDelimiterOverrides value. - * - * @param edifactDelimiterOverrides the edifactDelimiterOverrides value to set - * @return the EdifactProtocolSettings object itself. - */ - public EdifactProtocolSettings withEdifactDelimiterOverrides(List edifactDelimiterOverrides) { - this.edifactDelimiterOverrides = edifactDelimiterOverrides; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactSchemaReference.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactSchemaReference.java deleted file mode 100755 index 29f3a1f17cf..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactSchemaReference.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact schema reference. - */ -public class EdifactSchemaReference { - /** - * The message id. - */ - @JsonProperty(value = "messageId", required = true) - private String messageId; - - /** - * The message version. - */ - @JsonProperty(value = "messageVersion", required = true) - private String messageVersion; - - /** - * The message release version. - */ - @JsonProperty(value = "messageRelease", required = true) - private String messageRelease; - - /** - * The sender application id. - */ - @JsonProperty(value = "senderApplicationId") - private String senderApplicationId; - - /** - * The sender application qualifier. - */ - @JsonProperty(value = "senderApplicationQualifier") - private String senderApplicationQualifier; - - /** - * The association assigned code. - */ - @JsonProperty(value = "associationAssignedCode") - private String associationAssignedCode; - - /** - * The schema name. - */ - @JsonProperty(value = "schemaName", required = true) - private String schemaName; - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the EdifactSchemaReference object itself. - */ - public EdifactSchemaReference withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the messageVersion value. - * - * @return the messageVersion value - */ - public String messageVersion() { - return this.messageVersion; - } - - /** - * Set the messageVersion value. - * - * @param messageVersion the messageVersion value to set - * @return the EdifactSchemaReference object itself. - */ - public EdifactSchemaReference withMessageVersion(String messageVersion) { - this.messageVersion = messageVersion; - return this; - } - - /** - * Get the messageRelease value. - * - * @return the messageRelease value - */ - public String messageRelease() { - return this.messageRelease; - } - - /** - * Set the messageRelease value. - * - * @param messageRelease the messageRelease value to set - * @return the EdifactSchemaReference object itself. - */ - public EdifactSchemaReference withMessageRelease(String messageRelease) { - this.messageRelease = messageRelease; - return this; - } - - /** - * Get the senderApplicationId value. - * - * @return the senderApplicationId value - */ - public String senderApplicationId() { - return this.senderApplicationId; - } - - /** - * Set the senderApplicationId value. - * - * @param senderApplicationId the senderApplicationId value to set - * @return the EdifactSchemaReference object itself. - */ - public EdifactSchemaReference withSenderApplicationId(String senderApplicationId) { - this.senderApplicationId = senderApplicationId; - return this; - } - - /** - * Get the senderApplicationQualifier value. - * - * @return the senderApplicationQualifier value - */ - public String senderApplicationQualifier() { - return this.senderApplicationQualifier; - } - - /** - * Set the senderApplicationQualifier value. - * - * @param senderApplicationQualifier the senderApplicationQualifier value to set - * @return the EdifactSchemaReference object itself. - */ - public EdifactSchemaReference withSenderApplicationQualifier(String senderApplicationQualifier) { - this.senderApplicationQualifier = senderApplicationQualifier; - return this; - } - - /** - * Get the associationAssignedCode value. - * - * @return the associationAssignedCode value - */ - public String associationAssignedCode() { - return this.associationAssignedCode; - } - - /** - * Set the associationAssignedCode value. - * - * @param associationAssignedCode the associationAssignedCode value to set - * @return the EdifactSchemaReference object itself. - */ - public EdifactSchemaReference withAssociationAssignedCode(String associationAssignedCode) { - this.associationAssignedCode = associationAssignedCode; - return this; - } - - /** - * Get the schemaName value. - * - * @return the schemaName value - */ - public String schemaName() { - return this.schemaName; - } - - /** - * Set the schemaName value. - * - * @param schemaName the schemaName value to set - * @return the EdifactSchemaReference object itself. - */ - public EdifactSchemaReference withSchemaName(String schemaName) { - this.schemaName = schemaName; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactValidationOverride.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactValidationOverride.java deleted file mode 100755 index 290da72f666..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactValidationOverride.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact validation override settings. - */ -public class EdifactValidationOverride { - /** - * The message id on which the validation settings has to be applied. - */ - @JsonProperty(value = "messageId", required = true) - private String messageId; - - /** - * The value indicating whether to validate character Set. - */ - @JsonProperty(value = "enforceCharacterSet", required = true) - private boolean enforceCharacterSet; - - /** - * The value indicating whether to validate EDI types. - */ - @JsonProperty(value = "validateEdiTypes", required = true) - private boolean validateEdiTypes; - - /** - * The value indicating whether to validate XSD types. - */ - @JsonProperty(value = "validateXsdTypes", required = true) - private boolean validateXsdTypes; - - /** - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - */ - @JsonProperty(value = "allowLeadingAndTrailingSpacesAndZeroes", required = true) - private boolean allowLeadingAndTrailingSpacesAndZeroes; - - /** - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory'. - */ - @JsonProperty(value = "trailingSeparatorPolicy", required = true) - private TrailingSeparatorPolicy trailingSeparatorPolicy; - - /** - * The value indicating whether to trim leading and trailing spaces and - * zeroes. - */ - @JsonProperty(value = "trimLeadingAndTrailingSpacesAndZeroes", required = true) - private boolean trimLeadingAndTrailingSpacesAndZeroes; - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the EdifactValidationOverride object itself. - */ - public EdifactValidationOverride withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the enforceCharacterSet value. - * - * @return the enforceCharacterSet value - */ - public boolean enforceCharacterSet() { - return this.enforceCharacterSet; - } - - /** - * Set the enforceCharacterSet value. - * - * @param enforceCharacterSet the enforceCharacterSet value to set - * @return the EdifactValidationOverride object itself. - */ - public EdifactValidationOverride withEnforceCharacterSet(boolean enforceCharacterSet) { - this.enforceCharacterSet = enforceCharacterSet; - return this; - } - - /** - * Get the validateEdiTypes value. - * - * @return the validateEdiTypes value - */ - public boolean validateEdiTypes() { - return this.validateEdiTypes; - } - - /** - * Set the validateEdiTypes value. - * - * @param validateEdiTypes the validateEdiTypes value to set - * @return the EdifactValidationOverride object itself. - */ - public EdifactValidationOverride withValidateEdiTypes(boolean validateEdiTypes) { - this.validateEdiTypes = validateEdiTypes; - return this; - } - - /** - * Get the validateXsdTypes value. - * - * @return the validateXsdTypes value - */ - public boolean validateXsdTypes() { - return this.validateXsdTypes; - } - - /** - * Set the validateXsdTypes value. - * - * @param validateXsdTypes the validateXsdTypes value to set - * @return the EdifactValidationOverride object itself. - */ - public EdifactValidationOverride withValidateXsdTypes(boolean validateXsdTypes) { - this.validateXsdTypes = validateXsdTypes; - return this; - } - - /** - * Get the allowLeadingAndTrailingSpacesAndZeroes value. - * - * @return the allowLeadingAndTrailingSpacesAndZeroes value - */ - public boolean allowLeadingAndTrailingSpacesAndZeroes() { - return this.allowLeadingAndTrailingSpacesAndZeroes; - } - - /** - * Set the allowLeadingAndTrailingSpacesAndZeroes value. - * - * @param allowLeadingAndTrailingSpacesAndZeroes the allowLeadingAndTrailingSpacesAndZeroes value to set - * @return the EdifactValidationOverride object itself. - */ - public EdifactValidationOverride withAllowLeadingAndTrailingSpacesAndZeroes(boolean allowLeadingAndTrailingSpacesAndZeroes) { - this.allowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes; - return this; - } - - /** - * Get the trailingSeparatorPolicy value. - * - * @return the trailingSeparatorPolicy value - */ - public TrailingSeparatorPolicy trailingSeparatorPolicy() { - return this.trailingSeparatorPolicy; - } - - /** - * Set the trailingSeparatorPolicy value. - * - * @param trailingSeparatorPolicy the trailingSeparatorPolicy value to set - * @return the EdifactValidationOverride object itself. - */ - public EdifactValidationOverride withTrailingSeparatorPolicy(TrailingSeparatorPolicy trailingSeparatorPolicy) { - this.trailingSeparatorPolicy = trailingSeparatorPolicy; - return this; - } - - /** - * Get the trimLeadingAndTrailingSpacesAndZeroes value. - * - * @return the trimLeadingAndTrailingSpacesAndZeroes value - */ - public boolean trimLeadingAndTrailingSpacesAndZeroes() { - return this.trimLeadingAndTrailingSpacesAndZeroes; - } - - /** - * Set the trimLeadingAndTrailingSpacesAndZeroes value. - * - * @param trimLeadingAndTrailingSpacesAndZeroes the trimLeadingAndTrailingSpacesAndZeroes value to set - * @return the EdifactValidationOverride object itself. - */ - public EdifactValidationOverride withTrimLeadingAndTrailingSpacesAndZeroes(boolean trimLeadingAndTrailingSpacesAndZeroes) { - this.trimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactValidationSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactValidationSettings.java deleted file mode 100755 index 65a58a9520e..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactValidationSettings.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Edifact agreement validation settings. - */ -public class EdifactValidationSettings { - /** - * The value indicating whether to validate character set in the message. - */ - @JsonProperty(value = "validateCharacterSet", required = true) - private boolean validateCharacterSet; - - /** - * The value indicating whether to check for duplicate interchange control - * number. - */ - @JsonProperty(value = "checkDuplicateInterchangeControlNumber", required = true) - private boolean checkDuplicateInterchangeControlNumber; - - /** - * The validity period of interchange control number. - */ - @JsonProperty(value = "interchangeControlNumberValidityDays", required = true) - private int interchangeControlNumberValidityDays; - - /** - * The value indicating whether to check for duplicate group control - * number. - */ - @JsonProperty(value = "checkDuplicateGroupControlNumber", required = true) - private boolean checkDuplicateGroupControlNumber; - - /** - * The value indicating whether to check for duplicate transaction set - * control number. - */ - @JsonProperty(value = "checkDuplicateTransactionSetControlNumber", required = true) - private boolean checkDuplicateTransactionSetControlNumber; - - /** - * The value indicating whether to Whether to validate EDI types. - */ - @JsonProperty(value = "validateEdiTypes", required = true) - private boolean validateEdiTypes; - - /** - * The value indicating whether to Whether to validate XSD types. - */ - @JsonProperty(value = "validateXsdTypes", required = true) - private boolean validateXsdTypes; - - /** - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - */ - @JsonProperty(value = "allowLeadingAndTrailingSpacesAndZeroes", required = true) - private boolean allowLeadingAndTrailingSpacesAndZeroes; - - /** - * The value indicating whether to trim leading and trailing spaces and - * zeroes. - */ - @JsonProperty(value = "trimLeadingAndTrailingSpacesAndZeroes", required = true) - private boolean trimLeadingAndTrailingSpacesAndZeroes; - - /** - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory'. - */ - @JsonProperty(value = "trailingSeparatorPolicy", required = true) - private TrailingSeparatorPolicy trailingSeparatorPolicy; - - /** - * Get the validateCharacterSet value. - * - * @return the validateCharacterSet value - */ - public boolean validateCharacterSet() { - return this.validateCharacterSet; - } - - /** - * Set the validateCharacterSet value. - * - * @param validateCharacterSet the validateCharacterSet value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withValidateCharacterSet(boolean validateCharacterSet) { - this.validateCharacterSet = validateCharacterSet; - return this; - } - - /** - * Get the checkDuplicateInterchangeControlNumber value. - * - * @return the checkDuplicateInterchangeControlNumber value - */ - public boolean checkDuplicateInterchangeControlNumber() { - return this.checkDuplicateInterchangeControlNumber; - } - - /** - * Set the checkDuplicateInterchangeControlNumber value. - * - * @param checkDuplicateInterchangeControlNumber the checkDuplicateInterchangeControlNumber value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withCheckDuplicateInterchangeControlNumber(boolean checkDuplicateInterchangeControlNumber) { - this.checkDuplicateInterchangeControlNumber = checkDuplicateInterchangeControlNumber; - return this; - } - - /** - * Get the interchangeControlNumberValidityDays value. - * - * @return the interchangeControlNumberValidityDays value - */ - public int interchangeControlNumberValidityDays() { - return this.interchangeControlNumberValidityDays; - } - - /** - * Set the interchangeControlNumberValidityDays value. - * - * @param interchangeControlNumberValidityDays the interchangeControlNumberValidityDays value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withInterchangeControlNumberValidityDays(int interchangeControlNumberValidityDays) { - this.interchangeControlNumberValidityDays = interchangeControlNumberValidityDays; - return this; - } - - /** - * Get the checkDuplicateGroupControlNumber value. - * - * @return the checkDuplicateGroupControlNumber value - */ - public boolean checkDuplicateGroupControlNumber() { - return this.checkDuplicateGroupControlNumber; - } - - /** - * Set the checkDuplicateGroupControlNumber value. - * - * @param checkDuplicateGroupControlNumber the checkDuplicateGroupControlNumber value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withCheckDuplicateGroupControlNumber(boolean checkDuplicateGroupControlNumber) { - this.checkDuplicateGroupControlNumber = checkDuplicateGroupControlNumber; - return this; - } - - /** - * Get the checkDuplicateTransactionSetControlNumber value. - * - * @return the checkDuplicateTransactionSetControlNumber value - */ - public boolean checkDuplicateTransactionSetControlNumber() { - return this.checkDuplicateTransactionSetControlNumber; - } - - /** - * Set the checkDuplicateTransactionSetControlNumber value. - * - * @param checkDuplicateTransactionSetControlNumber the checkDuplicateTransactionSetControlNumber value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withCheckDuplicateTransactionSetControlNumber(boolean checkDuplicateTransactionSetControlNumber) { - this.checkDuplicateTransactionSetControlNumber = checkDuplicateTransactionSetControlNumber; - return this; - } - - /** - * Get the validateEdiTypes value. - * - * @return the validateEdiTypes value - */ - public boolean validateEdiTypes() { - return this.validateEdiTypes; - } - - /** - * Set the validateEdiTypes value. - * - * @param validateEdiTypes the validateEdiTypes value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withValidateEdiTypes(boolean validateEdiTypes) { - this.validateEdiTypes = validateEdiTypes; - return this; - } - - /** - * Get the validateXsdTypes value. - * - * @return the validateXsdTypes value - */ - public boolean validateXsdTypes() { - return this.validateXsdTypes; - } - - /** - * Set the validateXsdTypes value. - * - * @param validateXsdTypes the validateXsdTypes value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withValidateXsdTypes(boolean validateXsdTypes) { - this.validateXsdTypes = validateXsdTypes; - return this; - } - - /** - * Get the allowLeadingAndTrailingSpacesAndZeroes value. - * - * @return the allowLeadingAndTrailingSpacesAndZeroes value - */ - public boolean allowLeadingAndTrailingSpacesAndZeroes() { - return this.allowLeadingAndTrailingSpacesAndZeroes; - } - - /** - * Set the allowLeadingAndTrailingSpacesAndZeroes value. - * - * @param allowLeadingAndTrailingSpacesAndZeroes the allowLeadingAndTrailingSpacesAndZeroes value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withAllowLeadingAndTrailingSpacesAndZeroes(boolean allowLeadingAndTrailingSpacesAndZeroes) { - this.allowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes; - return this; - } - - /** - * Get the trimLeadingAndTrailingSpacesAndZeroes value. - * - * @return the trimLeadingAndTrailingSpacesAndZeroes value - */ - public boolean trimLeadingAndTrailingSpacesAndZeroes() { - return this.trimLeadingAndTrailingSpacesAndZeroes; - } - - /** - * Set the trimLeadingAndTrailingSpacesAndZeroes value. - * - * @param trimLeadingAndTrailingSpacesAndZeroes the trimLeadingAndTrailingSpacesAndZeroes value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withTrimLeadingAndTrailingSpacesAndZeroes(boolean trimLeadingAndTrailingSpacesAndZeroes) { - this.trimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes; - return this; - } - - /** - * Get the trailingSeparatorPolicy value. - * - * @return the trailingSeparatorPolicy value - */ - public TrailingSeparatorPolicy trailingSeparatorPolicy() { - return this.trailingSeparatorPolicy; - } - - /** - * Set the trailingSeparatorPolicy value. - * - * @param trailingSeparatorPolicy the trailingSeparatorPolicy value to set - * @return the EdifactValidationSettings object itself. - */ - public EdifactValidationSettings withTrailingSeparatorPolicy(TrailingSeparatorPolicy trailingSeparatorPolicy) { - this.trailingSeparatorPolicy = trailingSeparatorPolicy; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EncryptionAlgorithm.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EncryptionAlgorithm.java deleted file mode 100755 index c8dd6efc0bd..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EncryptionAlgorithm.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for EncryptionAlgorithm. - */ -public enum EncryptionAlgorithm { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value None. */ - NONE("None"), - - /** Enum value DES3. */ - DES3("DES3"), - - /** Enum value RC2. */ - RC2("RC2"), - - /** Enum value AES128. */ - AES128("AES128"), - - /** Enum value AES192. */ - AES192("AES192"), - - /** Enum value AES256. */ - AES256("AES256"); - - /** The actual serialized value for a EncryptionAlgorithm instance. */ - private String value; - - EncryptionAlgorithm(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a EncryptionAlgorithm instance. - * - * @param value the serialized value to parse. - * @return the parsed EncryptionAlgorithm object, or null if unable to parse. - */ - @JsonCreator - public static EncryptionAlgorithm fromString(String value) { - EncryptionAlgorithm[] items = EncryptionAlgorithm.values(); - for (EncryptionAlgorithm item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorProperties.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorProperties.java deleted file mode 100755 index ff48ebad9ff..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorProperties.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Error properties indicate why the Logic service was not able to process the - * incoming request. The reason is provided in the error message. - */ -public class ErrorProperties { - /** - * Error code. - */ - @JsonProperty(value = "code") - private String code; - - /** - * Error message indicating why the operation failed. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ErrorProperties object itself. - */ - public ErrorProperties withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ErrorProperties object itself. - */ - public ErrorProperties withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponse.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponse.java deleted file mode 100755 index 78eaa5bc046..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Error reponse indicates Logic service is not able to process the incoming - * request. The error property contains the error details. - */ -public class ErrorResponse { - /** - * The error properties. - */ - @JsonProperty(value = "error") - private ErrorProperties error; - - /** - * Get the error value. - * - * @return the error value - */ - public ErrorProperties error() { - return this.error; - } - - /** - * Set the error value. - * - * @param error the error value to set - * @return the ErrorResponse object itself. - */ - public ErrorResponse withError(ErrorProperties error) { - this.error = error; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponseException.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponseException.java deleted file mode 100755 index 81595714475..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponseException.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with ErrorResponse information. - */ -public class ErrorResponseException extends RestException { - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorResponseException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { - super(message, response, body); - } - - @Override - public ErrorResponse body() { - return (ErrorResponse) super.body(); - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/GenerateUpgradedDefinitionParameters.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/GenerateUpgradedDefinitionParameters.java deleted file mode 100755 index 1d9b2fa5793..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/GenerateUpgradedDefinitionParameters.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The parameters to generate upgraded definition. - */ -public class GenerateUpgradedDefinitionParameters { - /** - * The target schema version. - */ - @JsonProperty(value = "targetSchemaVersion") - private String targetSchemaVersion; - - /** - * Get the targetSchemaVersion value. - * - * @return the targetSchemaVersion value - */ - public String targetSchemaVersion() { - return this.targetSchemaVersion; - } - - /** - * Set the targetSchemaVersion value. - * - * @param targetSchemaVersion the targetSchemaVersion value to set - * @return the GenerateUpgradedDefinitionParameters object itself. - */ - public GenerateUpgradedDefinitionParameters withTargetSchemaVersion(String targetSchemaVersion) { - this.targetSchemaVersion = targetSchemaVersion; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/HashingAlgorithm.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/HashingAlgorithm.java deleted file mode 100755 index b0ef6b0bfa1..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/HashingAlgorithm.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for HashingAlgorithm. - */ -public enum HashingAlgorithm { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value None. */ - NONE("None"), - - /** Enum value MD5. */ - MD5("MD5"), - - /** Enum value SHA1. */ - SHA1("SHA1"), - - /** Enum value SHA2256. */ - SHA2256("SHA2256"), - - /** Enum value SHA2384. */ - SHA2384("SHA2384"), - - /** Enum value SHA2512. */ - SHA2512("SHA2512"); - - /** The actual serialized value for a HashingAlgorithm instance. */ - private String value; - - HashingAlgorithm(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a HashingAlgorithm instance. - * - * @param value the serialized value to parse. - * @return the parsed HashingAlgorithm object, or null if unable to parse. - */ - @JsonCreator - public static HashingAlgorithm fromString(String value) { - HashingAlgorithm[] items = HashingAlgorithm.values(); - for (HashingAlgorithm item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountAgreementFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountAgreementFilter.java deleted file mode 100755 index 7b2ed819296..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountAgreementFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account agreement filter for odata query. - */ -public class IntegrationAccountAgreementFilter { - /** - * The agreement type of integration account agreement. Possible values - * include: 'NotSpecified', 'AS2', 'X12', 'Edifact'. - */ - @JsonProperty(value = "agreementType", required = true) - private AgreementType agreementType; - - /** - * Get the agreementType value. - * - * @return the agreementType value - */ - public AgreementType agreementType() { - return this.agreementType; - } - - /** - * Set the agreementType value. - * - * @param agreementType the agreementType value to set - * @return the IntegrationAccountAgreementFilter object itself. - */ - public IntegrationAccountAgreementFilter withAgreementType(AgreementType agreementType) { - this.agreementType = agreementType; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountMapFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountMapFilter.java deleted file mode 100755 index 94e983653b8..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountMapFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account map filter for odata query. - */ -public class IntegrationAccountMapFilter { - /** - * The map type of integration account map. Possible values include: - * 'NotSpecified', 'Xslt'. - */ - @JsonProperty(value = "mapType", required = true) - private MapType mapType; - - /** - * Get the mapType value. - * - * @return the mapType value - */ - public MapType mapType() { - return this.mapType; - } - - /** - * Set the mapType value. - * - * @param mapType the mapType value to set - * @return the IntegrationAccountMapFilter object itself. - */ - public IntegrationAccountMapFilter withMapType(MapType mapType) { - this.mapType = mapType; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountMapPropertiesParametersSchema.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountMapPropertiesParametersSchema.java deleted file mode 100755 index 1c0934ec3f2..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountMapPropertiesParametersSchema.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The parameters schema of integration account map. - */ -public class IntegrationAccountMapPropertiesParametersSchema { - /** - * The reference name. - */ - @JsonProperty(value = "ref") - private String ref; - - /** - * Get the ref value. - * - * @return the ref value - */ - public String ref() { - return this.ref; - } - - /** - * Set the ref value. - * - * @param ref the ref value to set - * @return the IntegrationAccountMapPropertiesParametersSchema object itself. - */ - public IntegrationAccountMapPropertiesParametersSchema withRef(String ref) { - this.ref = ref; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountPartnerFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountPartnerFilter.java deleted file mode 100755 index 6fbde5d2773..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountPartnerFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account partner filter for odata query. - */ -public class IntegrationAccountPartnerFilter { - /** - * The partner type of integration account partner. Possible values - * include: 'NotSpecified', 'B2B'. - */ - @JsonProperty(value = "partnerType", required = true) - private PartnerType partnerType; - - /** - * Get the partnerType value. - * - * @return the partnerType value - */ - public PartnerType partnerType() { - return this.partnerType; - } - - /** - * Set the partnerType value. - * - * @param partnerType the partnerType value to set - * @return the IntegrationAccountPartnerFilter object itself. - */ - public IntegrationAccountPartnerFilter withPartnerType(PartnerType partnerType) { - this.partnerType = partnerType; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSchemaFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSchemaFilter.java deleted file mode 100755 index a46ccfa2b6c..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSchemaFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account schema filter for odata query. - */ -public class IntegrationAccountSchemaFilter { - /** - * The schema type of integration account schema. Possible values include: - * 'NotSpecified', 'Xml'. - */ - @JsonProperty(value = "schemaType", required = true) - private SchemaType schemaType; - - /** - * Get the schemaType value. - * - * @return the schemaType value - */ - public SchemaType schemaType() { - return this.schemaType; - } - - /** - * Set the schemaType value. - * - * @param schemaType the schemaType value to set - * @return the IntegrationAccountSchemaFilter object itself. - */ - public IntegrationAccountSchemaFilter withSchemaType(SchemaType schemaType) { - this.schemaType = schemaType; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSessionFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSessionFilter.java deleted file mode 100755 index 19dd652626d..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSessionFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account session filter. - */ -public class IntegrationAccountSessionFilter { - /** - * The changed time of integration account sessions. - */ - @JsonProperty(value = "changedTime", required = true) - private DateTime changedTime; - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Set the changedTime value. - * - * @param changedTime the changedTime value to set - * @return the IntegrationAccountSessionFilter object itself. - */ - public IntegrationAccountSessionFilter withChangedTime(DateTime changedTime) { - this.changedTime = changedTime; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSku.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSku.java deleted file mode 100755 index 145d06f374c..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSku.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account sku. - */ -public class IntegrationAccountSku { - /** - * The sku name. Possible values include: 'NotSpecified', 'Free', - * 'Standard'. - */ - @JsonProperty(value = "name", required = true) - private IntegrationAccountSkuName name; - - /** - * Get the name value. - * - * @return the name value - */ - public IntegrationAccountSkuName name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the IntegrationAccountSku object itself. - */ - public IntegrationAccountSku withName(IntegrationAccountSkuName name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSkuName.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSkuName.java deleted file mode 100755 index 06eb9ca09f1..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/IntegrationAccountSkuName.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for IntegrationAccountSkuName. - */ -public enum IntegrationAccountSkuName { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Free. */ - FREE("Free"), - - /** Enum value Standard. */ - STANDARD("Standard"); - - /** The actual serialized value for a IntegrationAccountSkuName instance. */ - private String value; - - IntegrationAccountSkuName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a IntegrationAccountSkuName instance. - * - * @param value the serialized value to parse. - * @return the parsed IntegrationAccountSkuName object, or null if unable to parse. - */ - @JsonCreator - public static IntegrationAccountSkuName fromString(String value) { - IntegrationAccountSkuName[] items = IntegrationAccountSkuName.values(); - for (IntegrationAccountSkuName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyType.java deleted file mode 100755 index c1097100af3..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for KeyType. - */ -public enum KeyType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Primary. */ - PRIMARY("Primary"), - - /** Enum value Secondary. */ - SECONDARY("Secondary"); - - /** The actual serialized value for a KeyType instance. */ - private String value; - - KeyType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a KeyType instance. - * - * @param value the serialized value to parse. - * @return the parsed KeyType object, or null if unable to parse. - */ - @JsonCreator - public static KeyType fromString(String value) { - KeyType[] items = KeyType.values(); - for (KeyType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyReference.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyReference.java deleted file mode 100755 index 647ac9f63dd..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyReference.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The reference to the key vault key. - */ -public class KeyVaultKeyReference { - /** - * The key vault reference. - */ - @JsonProperty(value = "keyVault", required = true) - private KeyVaultKeyReferenceKeyVault keyVault; - - /** - * The private key name in key vault. - */ - @JsonProperty(value = "keyName", required = true) - private String keyName; - - /** - * The private key version in key vault. - */ - @JsonProperty(value = "keyVersion") - private String keyVersion; - - /** - * Get the keyVault value. - * - * @return the keyVault value - */ - public KeyVaultKeyReferenceKeyVault keyVault() { - return this.keyVault; - } - - /** - * Set the keyVault value. - * - * @param keyVault the keyVault value to set - * @return the KeyVaultKeyReference object itself. - */ - public KeyVaultKeyReference withKeyVault(KeyVaultKeyReferenceKeyVault keyVault) { - this.keyVault = keyVault; - return this; - } - - /** - * Get the keyName value. - * - * @return the keyName value - */ - public String keyName() { - return this.keyName; - } - - /** - * Set the keyName value. - * - * @param keyName the keyName value to set - * @return the KeyVaultKeyReference object itself. - */ - public KeyVaultKeyReference withKeyName(String keyName) { - this.keyName = keyName; - return this; - } - - /** - * Get the keyVersion value. - * - * @return the keyVersion value - */ - public String keyVersion() { - return this.keyVersion; - } - - /** - * Set the keyVersion value. - * - * @param keyVersion the keyVersion value to set - * @return the KeyVaultKeyReference object itself. - */ - public KeyVaultKeyReference withKeyVersion(String keyVersion) { - this.keyVersion = keyVersion; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyReferenceKeyVault.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyReferenceKeyVault.java deleted file mode 100755 index 46bc3035ab5..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyReferenceKeyVault.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The key vault reference. - */ -public class KeyVaultKeyReferenceKeyVault { - /** - * The resource id. - */ - @JsonProperty(value = "id") - private String id; - - /** - * The resource name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * The resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the KeyVaultKeyReferenceKeyVault object itself. - */ - public KeyVaultKeyReferenceKeyVault withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/MapType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/MapType.java deleted file mode 100755 index 374a45984a8..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/MapType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for MapType. - */ -public enum MapType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Xslt. */ - XSLT("Xslt"); - - /** The actual serialized value for a MapType instance. */ - private String value; - - MapType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a MapType instance. - * - * @param value the serialized value to parse. - * @return the parsed MapType object, or null if unable to parse. - */ - @JsonCreator - public static MapType fromString(String value) { - MapType[] items = MapType.values(); - for (MapType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/MessageFilterType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/MessageFilterType.java deleted file mode 100755 index 5f331111747..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/MessageFilterType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for MessageFilterType. - */ -public enum MessageFilterType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Include. */ - INCLUDE("Include"), - - /** Enum value Exclude. */ - EXCLUDE("Exclude"); - - /** The actual serialized value for a MessageFilterType instance. */ - private String value; - - MessageFilterType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a MessageFilterType instance. - * - * @param value the serialized value to parse. - * @return the parsed MessageFilterType object, or null if unable to parse. - */ - @JsonCreator - public static MessageFilterType fromString(String value) { - MessageFilterType[] items = MessageFilterType.values(); - for (MessageFilterType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationDisplay.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationDisplay.java deleted file mode 100755 index b7eb6d60061..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationDisplay.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The object that represents the operation. - */ -public class OperationDisplay { - /** - * Service provider: Microsoft.Logic. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * Resource on which the operation is performed: Profile, endpoint, etc. - */ - @JsonProperty(value = "resource") - private String resource; - - /** - * Operation type: Read, write, delete, etc. - */ - @JsonProperty(value = "operation") - private String operation; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource value. - * - * @param resource the resource value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ParameterType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ParameterType.java deleted file mode 100755 index 6b9d5bfd836..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ParameterType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ParameterType. - */ -public enum ParameterType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value String. */ - STRING("String"), - - /** Enum value SecureString. */ - SECURE_STRING("SecureString"), - - /** Enum value Int. */ - INT("Int"), - - /** Enum value Float. */ - FLOAT("Float"), - - /** Enum value Bool. */ - BOOL("Bool"), - - /** Enum value Array. */ - ARRAY("Array"), - - /** Enum value Object. */ - OBJECT("Object"), - - /** Enum value SecureObject. */ - SECURE_OBJECT("SecureObject"); - - /** The actual serialized value for a ParameterType instance. */ - private String value; - - ParameterType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ParameterType instance. - * - * @param value the serialized value to parse. - * @return the parsed ParameterType object, or null if unable to parse. - */ - @JsonCreator - public static ParameterType fromString(String value) { - ParameterType[] items = ParameterType.values(); - for (ParameterType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/PartnerContent.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/PartnerContent.java deleted file mode 100755 index cd1899c2141..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/PartnerContent.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The integration account partner content. - */ -public class PartnerContent { - /** - * The B2B partner content. - */ - @JsonProperty(value = "b2b") - private B2BPartnerContent b2b; - - /** - * Get the b2b value. - * - * @return the b2b value - */ - public B2BPartnerContent b2b() { - return this.b2b; - } - - /** - * Set the b2b value. - * - * @param b2b the b2b value to set - * @return the PartnerContent object itself. - */ - public PartnerContent withB2b(B2BPartnerContent b2b) { - this.b2b = b2b; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/PartnerType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/PartnerType.java deleted file mode 100755 index f198cb0b019..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/PartnerType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for PartnerType. - */ -public enum PartnerType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value B2B. */ - B2B("B2B"); - - /** The actual serialized value for a PartnerType instance. */ - private String value; - - PartnerType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a PartnerType instance. - * - * @param value the serialized value to parse. - * @return the parsed PartnerType object, or null if unable to parse. - */ - @JsonCreator - public static PartnerType fromString(String value) { - PartnerType[] items = PartnerType.values(); - for (PartnerType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceFrequency.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceFrequency.java deleted file mode 100755 index 40a3ff272be..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceFrequency.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for RecurrenceFrequency. - */ -public enum RecurrenceFrequency { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Second. */ - SECOND("Second"), - - /** Enum value Minute. */ - MINUTE("Minute"), - - /** Enum value Hour. */ - HOUR("Hour"), - - /** Enum value Day. */ - DAY("Day"), - - /** Enum value Week. */ - WEEK("Week"), - - /** Enum value Month. */ - MONTH("Month"), - - /** Enum value Year. */ - YEAR("Year"); - - /** The actual serialized value for a RecurrenceFrequency instance. */ - private String value; - - RecurrenceFrequency(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a RecurrenceFrequency instance. - * - * @param value the serialized value to parse. - * @return the parsed RecurrenceFrequency object, or null if unable to parse. - */ - @JsonCreator - public static RecurrenceFrequency fromString(String value) { - RecurrenceFrequency[] items = RecurrenceFrequency.values(); - for (RecurrenceFrequency item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceSchedule.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceSchedule.java deleted file mode 100755 index 83db8188fd3..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceSchedule.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The recurrence schedule. - */ -public class RecurrenceSchedule { - /** - * The minutes. - */ - @JsonProperty(value = "minutes") - private List minutes; - - /** - * The hours. - */ - @JsonProperty(value = "hours") - private List hours; - - /** - * The days of the week. - */ - @JsonProperty(value = "weekDays") - private List weekDays; - - /** - * The month days. - */ - @JsonProperty(value = "monthDays") - private List monthDays; - - /** - * The monthly occurrences. - */ - @JsonProperty(value = "monthlyOccurrences") - private List monthlyOccurrences; - - /** - * Get the minutes value. - * - * @return the minutes value - */ - public List minutes() { - return this.minutes; - } - - /** - * Set the minutes value. - * - * @param minutes the minutes value to set - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withMinutes(List minutes) { - this.minutes = minutes; - return this; - } - - /** - * Get the hours value. - * - * @return the hours value - */ - public List hours() { - return this.hours; - } - - /** - * Set the hours value. - * - * @param hours the hours value to set - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withHours(List hours) { - this.hours = hours; - return this; - } - - /** - * Get the weekDays value. - * - * @return the weekDays value - */ - public List weekDays() { - return this.weekDays; - } - - /** - * Set the weekDays value. - * - * @param weekDays the weekDays value to set - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withWeekDays(List weekDays) { - this.weekDays = weekDays; - return this; - } - - /** - * Get the monthDays value. - * - * @return the monthDays value - */ - public List monthDays() { - return this.monthDays; - } - - /** - * Set the monthDays value. - * - * @param monthDays the monthDays value to set - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withMonthDays(List monthDays) { - this.monthDays = monthDays; - return this; - } - - /** - * Get the monthlyOccurrences value. - * - * @return the monthlyOccurrences value - */ - public List monthlyOccurrences() { - return this.monthlyOccurrences; - } - - /** - * Set the monthlyOccurrences value. - * - * @param monthlyOccurrences the monthlyOccurrences value to set - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withMonthlyOccurrences(List monthlyOccurrences) { - this.monthlyOccurrences = monthlyOccurrences; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceScheduleOccurrence.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceScheduleOccurrence.java deleted file mode 100755 index d160d74bfab..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceScheduleOccurrence.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The recurrence schedule occurence. - */ -public class RecurrenceScheduleOccurrence { - /** - * The day of the week. Possible values include: 'Sunday', 'Monday', - * 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'. - */ - @JsonProperty(value = "day") - private DayOfWeek day; - - /** - * The occurrence. - */ - @JsonProperty(value = "occurrence") - private Integer occurrence; - - /** - * Get the day value. - * - * @return the day value - */ - public DayOfWeek day() { - return this.day; - } - - /** - * Set the day value. - * - * @param day the day value to set - * @return the RecurrenceScheduleOccurrence object itself. - */ - public RecurrenceScheduleOccurrence withDay(DayOfWeek day) { - this.day = day; - return this; - } - - /** - * Get the occurrence value. - * - * @return the occurrence value - */ - public Integer occurrence() { - return this.occurrence; - } - - /** - * Set the occurrence value. - * - * @param occurrence the occurrence value to set - * @return the RecurrenceScheduleOccurrence object itself. - */ - public RecurrenceScheduleOccurrence withOccurrence(Integer occurrence) { - this.occurrence = occurrence; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RegenerateActionParameter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RegenerateActionParameter.java deleted file mode 100755 index 9e1e0a6be3b..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RegenerateActionParameter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The access key regenerate action content. - */ -public class RegenerateActionParameter { - /** - * The key type. Possible values include: 'NotSpecified', 'Primary', - * 'Secondary'. - */ - @JsonProperty(value = "keyType") - private KeyType keyType; - - /** - * Get the keyType value. - * - * @return the keyType value - */ - public KeyType keyType() { - return this.keyType; - } - - /** - * Set the keyType value. - * - * @param keyType the keyType value to set - * @return the RegenerateActionParameter object itself. - */ - public RegenerateActionParameter withKeyType(KeyType keyType) { - this.keyType = keyType; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ResourceReference.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ResourceReference.java deleted file mode 100755 index 123827ed3af..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ResourceReference.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The resource reference. - */ -public class ResourceReference { - /** - * The resource id. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Gets the resource name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets the resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RetryHistory.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RetryHistory.java deleted file mode 100755 index aceb113f50f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RetryHistory.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The retry history. - */ -public class RetryHistory { - /** - * Gets the start time. - */ - @JsonProperty(value = "startTime") - private DateTime startTime; - - /** - * Gets the end time. - */ - @JsonProperty(value = "endTime") - private DateTime endTime; - - /** - * Gets the status code. - */ - @JsonProperty(value = "code") - private String code; - - /** - * Gets the client request Id. - */ - @JsonProperty(value = "clientRequestId") - private String clientRequestId; - - /** - * Gets the service request Id. - */ - @JsonProperty(value = "serviceRequestId") - private String serviceRequestId; - - /** - * Gets the error response. - */ - @JsonProperty(value = "error") - private ErrorResponse error; - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime value. - * - * @param startTime the startTime value to set - * @return the RetryHistory object itself. - */ - public RetryHistory withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime value. - * - * @param endTime the endTime value to set - * @return the RetryHistory object itself. - */ - public RetryHistory withEndTime(DateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the RetryHistory object itself. - */ - public RetryHistory withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the clientRequestId value. - * - * @return the clientRequestId value - */ - public String clientRequestId() { - return this.clientRequestId; - } - - /** - * Set the clientRequestId value. - * - * @param clientRequestId the clientRequestId value to set - * @return the RetryHistory object itself. - */ - public RetryHistory withClientRequestId(String clientRequestId) { - this.clientRequestId = clientRequestId; - return this; - } - - /** - * Get the serviceRequestId value. - * - * @return the serviceRequestId value - */ - public String serviceRequestId() { - return this.serviceRequestId; - } - - /** - * Set the serviceRequestId value. - * - * @param serviceRequestId the serviceRequestId value to set - * @return the RetryHistory object itself. - */ - public RetryHistory withServiceRequestId(String serviceRequestId) { - this.serviceRequestId = serviceRequestId; - return this; - } - - /** - * Get the error value. - * - * @return the error value - */ - public ErrorResponse error() { - return this.error; - } - - /** - * Set the error value. - * - * @param error the error value to set - * @return the RetryHistory object itself. - */ - public RetryHistory withError(ErrorResponse error) { - this.error = error; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SchemaType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SchemaType.java deleted file mode 100755 index a3bac7d70f4..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SchemaType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SchemaType. - */ -public enum SchemaType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Xml. */ - XML("Xml"); - - /** The actual serialized value for a SchemaType instance. */ - private String value; - - SchemaType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SchemaType instance. - * - * @param value the serialized value to parse. - * @return the parsed SchemaType object, or null if unable to parse. - */ - @JsonCreator - public static SchemaType fromString(String value) { - SchemaType[] items = SchemaType.values(); - for (SchemaType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SegmentTerminatorSuffix.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SegmentTerminatorSuffix.java deleted file mode 100755 index 795b0b362cc..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SegmentTerminatorSuffix.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SegmentTerminatorSuffix. - */ -public enum SegmentTerminatorSuffix { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value None. */ - NONE("None"), - - /** Enum value CR. */ - CR("CR"), - - /** Enum value LF. */ - LF("LF"), - - /** Enum value CRLF. */ - CRLF("CRLF"); - - /** The actual serialized value for a SegmentTerminatorSuffix instance. */ - private String value; - - SegmentTerminatorSuffix(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SegmentTerminatorSuffix instance. - * - * @param value the serialized value to parse. - * @return the parsed SegmentTerminatorSuffix object, or null if unable to parse. - */ - @JsonCreator - public static SegmentTerminatorSuffix fromString(String value) { - SegmentTerminatorSuffix[] items = SegmentTerminatorSuffix.values(); - for (SegmentTerminatorSuffix item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SigningAlgorithm.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SigningAlgorithm.java deleted file mode 100755 index 6cf43b93dc0..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SigningAlgorithm.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SigningAlgorithm. - */ -public final class SigningAlgorithm { - /** Static value NotSpecified for SigningAlgorithm. */ - public static final SigningAlgorithm NOT_SPECIFIED = new SigningAlgorithm("NotSpecified"); - - /** Static value Default for SigningAlgorithm. */ - public static final SigningAlgorithm DEFAULT = new SigningAlgorithm("Default"); - - /** Static value SHA1 for SigningAlgorithm. */ - public static final SigningAlgorithm SHA1 = new SigningAlgorithm("SHA1"); - - /** Static value SHA2256 for SigningAlgorithm. */ - public static final SigningAlgorithm SHA2256 = new SigningAlgorithm("SHA2256"); - - /** Static value SHA2384 for SigningAlgorithm. */ - public static final SigningAlgorithm SHA2384 = new SigningAlgorithm("SHA2384"); - - /** Static value SHA2512 for SigningAlgorithm. */ - public static final SigningAlgorithm SHA2512 = new SigningAlgorithm("SHA2512"); - - private String value; - - /** - * Creates a custom value for SigningAlgorithm. - * @param value the custom value - */ - public SigningAlgorithm(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SigningAlgorithm)) { - return false; - } - if (obj == this) { - return true; - } - SigningAlgorithm rhs = (SigningAlgorithm) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Sku.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Sku.java deleted file mode 100755 index e5e5a85f94d..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Sku.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The sku type. - */ -public class Sku { - /** - * The name. Possible values include: 'NotSpecified', 'Free', 'Shared', - * 'Basic', 'Standard', 'Premium'. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /** - * The reference to plan. - */ - @JsonProperty(value = "plan") - private ResourceReference plan; - - /** - * Get the name value. - * - * @return the name value - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Get the plan value. - * - * @return the plan value - */ - public ResourceReference plan() { - return this.plan; - } - - /** - * Set the plan value. - * - * @param plan the plan value to set - * @return the Sku object itself. - */ - public Sku withPlan(ResourceReference plan) { - this.plan = plan; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SkuName.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SkuName.java deleted file mode 100755 index 55f935f793f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SkuName.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SkuName. - */ -public enum SkuName { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Free. */ - FREE("Free"), - - /** Enum value Shared. */ - SHARED("Shared"), - - /** Enum value Basic. */ - BASIC("Basic"), - - /** Enum value Standard. */ - STANDARD("Standard"), - - /** Enum value Premium. */ - PREMIUM("Premium"); - - /** The actual serialized value for a SkuName instance. */ - private String value; - - SkuName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuName instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuName object, or null if unable to parse. - */ - @JsonCreator - public static SkuName fromString(String value) { - SkuName[] items = SkuName.values(); - for (SkuName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrailingSeparatorPolicy.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrailingSeparatorPolicy.java deleted file mode 100755 index 6c83d1b2d17..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrailingSeparatorPolicy.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for TrailingSeparatorPolicy. - */ -public enum TrailingSeparatorPolicy { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value NotAllowed. */ - NOT_ALLOWED("NotAllowed"), - - /** Enum value Optional. */ - OPTIONAL("Optional"), - - /** Enum value Mandatory. */ - MANDATORY("Mandatory"); - - /** The actual serialized value for a TrailingSeparatorPolicy instance. */ - private String value; - - TrailingSeparatorPolicy(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a TrailingSeparatorPolicy instance. - * - * @param value the serialized value to parse. - * @return the parsed TrailingSeparatorPolicy object, or null if unable to parse. - */ - @JsonCreator - public static TrailingSeparatorPolicy fromString(String value) { - TrailingSeparatorPolicy[] items = TrailingSeparatorPolicy.values(); - for (TrailingSeparatorPolicy item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/UsageIndicator.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/UsageIndicator.java deleted file mode 100755 index 63b344b0c0d..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/UsageIndicator.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for UsageIndicator. - */ -public enum UsageIndicator { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Test. */ - TEST("Test"), - - /** Enum value Information. */ - INFORMATION("Information"), - - /** Enum value Production. */ - PRODUCTION("Production"); - - /** The actual serialized value for a UsageIndicator instance. */ - private String value; - - UsageIndicator(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a UsageIndicator instance. - * - * @param value the serialized value to parse. - * @return the parsed UsageIndicator object, or null if unable to parse. - */ - @JsonCreator - public static UsageIndicator fromString(String value) { - UsageIndicator[] items = UsageIndicator.values(); - for (UsageIndicator item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowFilter.java deleted file mode 100755 index 40624a80096..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow filter. - */ -public class WorkflowFilter { - /** - * The state of workflows. Possible values include: 'NotSpecified', - * 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended'. - */ - @JsonProperty(value = "state") - private WorkflowState state; - - /** - * Get the state value. - * - * @return the state value - */ - public WorkflowState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the WorkflowFilter object itself. - */ - public WorkflowFilter withState(WorkflowState state) { - this.state = state; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowOutputParameter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowOutputParameter.java deleted file mode 100755 index 962637101b8..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowOutputParameter.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow output parameter. - */ -public class WorkflowOutputParameter extends WorkflowParameter { - /** - * Gets the error. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private Object error; - - /** - * Get the error value. - * - * @return the error value - */ - public Object error() { - return this.error; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowParameter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowParameter.java deleted file mode 100755 index bab889265b6..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowParameter.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow parameters. - */ -public class WorkflowParameter { - /** - * The type. Possible values include: 'NotSpecified', 'String', - * 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', - * 'SecureObject'. - */ - @JsonProperty(value = "type") - private ParameterType type; - - /** - * The value. - */ - @JsonProperty(value = "value") - private Object value; - - /** - * The metadata. - */ - @JsonProperty(value = "metadata") - private Object metadata; - - /** - * The description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the type value. - * - * @return the type value - */ - public ParameterType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the WorkflowParameter object itself. - */ - public WorkflowParameter withType(ParameterType type) { - this.type = type; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public Object value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the WorkflowParameter object itself. - */ - public WorkflowParameter withValue(Object value) { - this.value = value; - return this; - } - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public Object metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the WorkflowParameter object itself. - */ - public WorkflowParameter withMetadata(Object metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the WorkflowParameter object itself. - */ - public WorkflowParameter withDescription(String description) { - this.description = description; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowProvisioningState.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowProvisioningState.java deleted file mode 100755 index 32b9536529f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowProvisioningState.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for WorkflowProvisioningState. - */ -public enum WorkflowProvisioningState { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Accepted. */ - ACCEPTED("Accepted"), - - /** Enum value Running. */ - RUNNING("Running"), - - /** Enum value Ready. */ - READY("Ready"), - - /** Enum value Creating. */ - CREATING("Creating"), - - /** Enum value Created. */ - CREATED("Created"), - - /** Enum value Deleting. */ - DELETING("Deleting"), - - /** Enum value Deleted. */ - DELETED("Deleted"), - - /** Enum value Canceled. */ - CANCELED("Canceled"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Succeeded. */ - SUCCEEDED("Succeeded"), - - /** Enum value Moving. */ - MOVING("Moving"), - - /** Enum value Updating. */ - UPDATING("Updating"), - - /** Enum value Registering. */ - REGISTERING("Registering"), - - /** Enum value Registered. */ - REGISTERED("Registered"), - - /** Enum value Unregistering. */ - UNREGISTERING("Unregistering"), - - /** Enum value Unregistered. */ - UNREGISTERED("Unregistered"), - - /** Enum value Completed. */ - COMPLETED("Completed"); - - /** The actual serialized value for a WorkflowProvisioningState instance. */ - private String value; - - WorkflowProvisioningState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a WorkflowProvisioningState instance. - * - * @param value the serialized value to parse. - * @return the parsed WorkflowProvisioningState object, or null if unable to parse. - */ - @JsonCreator - public static WorkflowProvisioningState fromString(String value) { - WorkflowProvisioningState[] items = WorkflowProvisioningState.values(); - for (WorkflowProvisioningState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunActionFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunActionFilter.java deleted file mode 100755 index 63a23646f70..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunActionFilter.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow run action filter. - */ -public class WorkflowRunActionFilter { - /** - * The status of workflow run action. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored'. - */ - @JsonProperty(value = "status") - private WorkflowStatus status; - - /** - * Get the status value. - * - * @return the status value - */ - public WorkflowStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the WorkflowRunActionFilter object itself. - */ - public WorkflowRunActionFilter withStatus(WorkflowStatus status) { - this.status = status; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunFilter.java deleted file mode 100755 index 79354b27586..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunFilter.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow run filter. - */ -public class WorkflowRunFilter { - /** - * The status of workflow run. Possible values include: 'NotSpecified', - * 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - * 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored'. - */ - @JsonProperty(value = "status") - private WorkflowStatus status; - - /** - * Get the status value. - * - * @return the status value - */ - public WorkflowStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the WorkflowRunFilter object itself. - */ - public WorkflowRunFilter withStatus(WorkflowStatus status) { - this.status = status; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunTrigger.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunTrigger.java deleted file mode 100755 index 26528039fe3..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunTrigger.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow run trigger. - */ -public class WorkflowRunTrigger { - /** - * Gets the name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets the inputs. - */ - @JsonProperty(value = "inputs", access = JsonProperty.Access.WRITE_ONLY) - private Object inputs; - - /** - * Gets the link to inputs. - */ - @JsonProperty(value = "inputsLink", access = JsonProperty.Access.WRITE_ONLY) - private ContentLink inputsLink; - - /** - * Gets the outputs. - */ - @JsonProperty(value = "outputs", access = JsonProperty.Access.WRITE_ONLY) - private Object outputs; - - /** - * Gets the link to outputs. - */ - @JsonProperty(value = "outputsLink", access = JsonProperty.Access.WRITE_ONLY) - private ContentLink outputsLink; - - /** - * Gets the start time. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime startTime; - - /** - * Gets the end time. - */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime endTime; - - /** - * Gets the tracking id. - */ - @JsonProperty(value = "trackingId", access = JsonProperty.Access.WRITE_ONLY) - private String trackingId; - - /** - * The run correlation. - */ - @JsonProperty(value = "correlation") - private Correlation correlation; - - /** - * Gets the code. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * Gets the status. Possible values include: 'NotSpecified', 'Paused', - * 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', - * 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored'. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowStatus status; - - /** - * Gets the error. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private Object error; - - /** - * Gets the tracked properties. - */ - @JsonProperty(value = "trackedProperties", access = JsonProperty.Access.WRITE_ONLY) - private Object trackedProperties; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the inputs value. - * - * @return the inputs value - */ - public Object inputs() { - return this.inputs; - } - - /** - * Get the inputsLink value. - * - * @return the inputsLink value - */ - public ContentLink inputsLink() { - return this.inputsLink; - } - - /** - * Get the outputs value. - * - * @return the outputs value - */ - public Object outputs() { - return this.outputs; - } - - /** - * Get the outputsLink value. - * - * @return the outputsLink value - */ - public ContentLink outputsLink() { - return this.outputsLink; - } - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Get the trackingId value. - * - * @return the trackingId value - */ - public String trackingId() { - return this.trackingId; - } - - /** - * Get the correlation value. - * - * @return the correlation value - */ - public Correlation correlation() { - return this.correlation; - } - - /** - * Set the correlation value. - * - * @param correlation the correlation value to set - * @return the WorkflowRunTrigger object itself. - */ - public WorkflowRunTrigger withCorrelation(Correlation correlation) { - this.correlation = correlation; - return this; - } - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the status value. - * - * @return the status value - */ - public WorkflowStatus status() { - return this.status; - } - - /** - * Get the error value. - * - * @return the error value - */ - public Object error() { - return this.error; - } - - /** - * Get the trackedProperties value. - * - * @return the trackedProperties value - */ - public Object trackedProperties() { - return this.trackedProperties; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowState.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowState.java deleted file mode 100755 index ec2165e0aad..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowState.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for WorkflowState. - */ -public enum WorkflowState { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Completed. */ - COMPLETED("Completed"), - - /** Enum value Enabled. */ - ENABLED("Enabled"), - - /** Enum value Disabled. */ - DISABLED("Disabled"), - - /** Enum value Deleted. */ - DELETED("Deleted"), - - /** Enum value Suspended. */ - SUSPENDED("Suspended"); - - /** The actual serialized value for a WorkflowState instance. */ - private String value; - - WorkflowState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a WorkflowState instance. - * - * @param value the serialized value to parse. - * @return the parsed WorkflowState object, or null if unable to parse. - */ - @JsonCreator - public static WorkflowState fromString(String value) { - WorkflowState[] items = WorkflowState.values(); - for (WorkflowState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowStatus.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowStatus.java deleted file mode 100755 index 3d151233d7a..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowStatus.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for WorkflowStatus. - */ -public enum WorkflowStatus { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Paused. */ - PAUSED("Paused"), - - /** Enum value Running. */ - RUNNING("Running"), - - /** Enum value Waiting. */ - WAITING("Waiting"), - - /** Enum value Succeeded. */ - SUCCEEDED("Succeeded"), - - /** Enum value Skipped. */ - SKIPPED("Skipped"), - - /** Enum value Suspended. */ - SUSPENDED("Suspended"), - - /** Enum value Cancelled. */ - CANCELLED("Cancelled"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Faulted. */ - FAULTED("Faulted"), - - /** Enum value TimedOut. */ - TIMED_OUT("TimedOut"), - - /** Enum value Aborted. */ - ABORTED("Aborted"), - - /** Enum value Ignored. */ - IGNORED("Ignored"); - - /** The actual serialized value for a WorkflowStatus instance. */ - private String value; - - WorkflowStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a WorkflowStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed WorkflowStatus object, or null if unable to parse. - */ - @JsonCreator - public static WorkflowStatus fromString(String value) { - WorkflowStatus[] items = WorkflowStatus.values(); - for (WorkflowStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerFilter.java deleted file mode 100755 index 0d1258cae0f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow trigger filter. - */ -public class WorkflowTriggerFilter { - /** - * The state of workflow trigger. Possible values include: 'NotSpecified', - * 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended'. - */ - @JsonProperty(value = "state") - private WorkflowState state; - - /** - * Get the state value. - * - * @return the state value - */ - public WorkflowState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the WorkflowTriggerFilter object itself. - */ - public WorkflowTriggerFilter withState(WorkflowState state) { - this.state = state; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerHistoryFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerHistoryFilter.java deleted file mode 100755 index 24c15246e58..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerHistoryFilter.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow trigger history filter. - */ -public class WorkflowTriggerHistoryFilter { - /** - * The status of workflow trigger history. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored'. - */ - @JsonProperty(value = "status") - private WorkflowStatus status; - - /** - * Get the status value. - * - * @return the status value - */ - public WorkflowStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the WorkflowTriggerHistoryFilter object itself. - */ - public WorkflowTriggerHistoryFilter withStatus(WorkflowStatus status) { - this.status = status; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerListCallbackUrlQueries.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerListCallbackUrlQueries.java deleted file mode 100755 index e4535ec34c7..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerListCallbackUrlQueries.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Gets the workflow trigger callback URL query parameters. - */ -public class WorkflowTriggerListCallbackUrlQueries { - /** - * The api version. - */ - @JsonProperty(value = "api-version") - private String apiVersion; - - /** - * The SAS permissions. - */ - @JsonProperty(value = "sp") - private String sp; - - /** - * The SAS version. - */ - @JsonProperty(value = "sv") - private String sv; - - /** - * The SAS signature. - */ - @JsonProperty(value = "sig") - private String sig; - - /** - * Get the apiVersion value. - * - * @return the apiVersion value - */ - public String apiVersion() { - return this.apiVersion; - } - - /** - * Set the apiVersion value. - * - * @param apiVersion the apiVersion value to set - * @return the WorkflowTriggerListCallbackUrlQueries object itself. - */ - public WorkflowTriggerListCallbackUrlQueries withApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - return this; - } - - /** - * Get the sp value. - * - * @return the sp value - */ - public String sp() { - return this.sp; - } - - /** - * Set the sp value. - * - * @param sp the sp value to set - * @return the WorkflowTriggerListCallbackUrlQueries object itself. - */ - public WorkflowTriggerListCallbackUrlQueries withSp(String sp) { - this.sp = sp; - return this; - } - - /** - * Get the sv value. - * - * @return the sv value - */ - public String sv() { - return this.sv; - } - - /** - * Set the sv value. - * - * @param sv the sv value to set - * @return the WorkflowTriggerListCallbackUrlQueries object itself. - */ - public WorkflowTriggerListCallbackUrlQueries withSv(String sv) { - this.sv = sv; - return this; - } - - /** - * Get the sig value. - * - * @return the sig value - */ - public String sig() { - return this.sig; - } - - /** - * Set the sig value. - * - * @param sig the sig value to set - * @return the WorkflowTriggerListCallbackUrlQueries object itself. - */ - public WorkflowTriggerListCallbackUrlQueries withSig(String sig) { - this.sig = sig; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerProvisioningState.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerProvisioningState.java deleted file mode 100755 index b3adfb4b32d..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerProvisioningState.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for WorkflowTriggerProvisioningState. - */ -public enum WorkflowTriggerProvisioningState { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Accepted. */ - ACCEPTED("Accepted"), - - /** Enum value Running. */ - RUNNING("Running"), - - /** Enum value Ready. */ - READY("Ready"), - - /** Enum value Creating. */ - CREATING("Creating"), - - /** Enum value Created. */ - CREATED("Created"), - - /** Enum value Deleting. */ - DELETING("Deleting"), - - /** Enum value Deleted. */ - DELETED("Deleted"), - - /** Enum value Canceled. */ - CANCELED("Canceled"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Succeeded. */ - SUCCEEDED("Succeeded"), - - /** Enum value Moving. */ - MOVING("Moving"), - - /** Enum value Updating. */ - UPDATING("Updating"), - - /** Enum value Registering. */ - REGISTERING("Registering"), - - /** Enum value Registered. */ - REGISTERED("Registered"), - - /** Enum value Unregistering. */ - UNREGISTERING("Unregistering"), - - /** Enum value Unregistered. */ - UNREGISTERED("Unregistered"), - - /** Enum value Completed. */ - COMPLETED("Completed"); - - /** The actual serialized value for a WorkflowTriggerProvisioningState instance. */ - private String value; - - WorkflowTriggerProvisioningState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a WorkflowTriggerProvisioningState instance. - * - * @param value the serialized value to parse. - * @return the parsed WorkflowTriggerProvisioningState object, or null if unable to parse. - */ - @JsonCreator - public static WorkflowTriggerProvisioningState fromString(String value) { - WorkflowTriggerProvisioningState[] items = WorkflowTriggerProvisioningState.values(); - for (WorkflowTriggerProvisioningState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerRecurrence.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerRecurrence.java deleted file mode 100755 index 600e95b7c44..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerRecurrence.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow trigger recurrence. - */ -public class WorkflowTriggerRecurrence { - /** - * The frequency. Possible values include: 'NotSpecified', 'Second', - * 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year'. - */ - @JsonProperty(value = "frequency") - private RecurrenceFrequency frequency; - - /** - * The interval. - */ - @JsonProperty(value = "interval") - private Integer interval; - - /** - * The start time. - */ - @JsonProperty(value = "startTime") - private DateTime startTime; - - /** - * The end time. - */ - @JsonProperty(value = "endTime") - private DateTime endTime; - - /** - * The time zone. - */ - @JsonProperty(value = "timeZone") - private String timeZone; - - /** - * The recurrence schedule. - */ - @JsonProperty(value = "schedule") - private RecurrenceSchedule schedule; - - /** - * Get the frequency value. - * - * @return the frequency value - */ - public RecurrenceFrequency frequency() { - return this.frequency; - } - - /** - * Set the frequency value. - * - * @param frequency the frequency value to set - * @return the WorkflowTriggerRecurrence object itself. - */ - public WorkflowTriggerRecurrence withFrequency(RecurrenceFrequency frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the interval value. - * - * @return the interval value - */ - public Integer interval() { - return this.interval; - } - - /** - * Set the interval value. - * - * @param interval the interval value to set - * @return the WorkflowTriggerRecurrence object itself. - */ - public WorkflowTriggerRecurrence withInterval(Integer interval) { - this.interval = interval; - return this; - } - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime value. - * - * @param startTime the startTime value to set - * @return the WorkflowTriggerRecurrence object itself. - */ - public WorkflowTriggerRecurrence withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime value. - * - * @param endTime the endTime value to set - * @return the WorkflowTriggerRecurrence object itself. - */ - public WorkflowTriggerRecurrence withEndTime(DateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the timeZone value. - * - * @return the timeZone value - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone value. - * - * @param timeZone the timeZone value to set - * @return the WorkflowTriggerRecurrence object itself. - */ - public WorkflowTriggerRecurrence withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Get the schedule value. - * - * @return the schedule value - */ - public RecurrenceSchedule schedule() { - return this.schedule; - } - - /** - * Set the schedule value. - * - * @param schedule the schedule value to set - * @return the WorkflowTriggerRecurrence object itself. - */ - public WorkflowTriggerRecurrence withSchedule(RecurrenceSchedule schedule) { - this.schedule = schedule; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12AcknowledgementSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12AcknowledgementSettings.java deleted file mode 100755 index 685831669dc..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12AcknowledgementSettings.java +++ /dev/null @@ -1,407 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 agreement acknowledgement settings. - */ -public class X12AcknowledgementSettings { - /** - * The value indicating whether technical acknowledgement is needed. - */ - @JsonProperty(value = "needTechnicalAcknowledgement", required = true) - private boolean needTechnicalAcknowledgement; - - /** - * The value indicating whether to batch the technical acknowledgements. - */ - @JsonProperty(value = "batchTechnicalAcknowledgements", required = true) - private boolean batchTechnicalAcknowledgements; - - /** - * The value indicating whether functional acknowledgement is needed. - */ - @JsonProperty(value = "needFunctionalAcknowledgement", required = true) - private boolean needFunctionalAcknowledgement; - - /** - * The functional acknowledgement version. - */ - @JsonProperty(value = "functionalAcknowledgementVersion") - private String functionalAcknowledgementVersion; - - /** - * The value indicating whether to batch functional acknowledgements. - */ - @JsonProperty(value = "batchFunctionalAcknowledgements", required = true) - private boolean batchFunctionalAcknowledgements; - - /** - * The value indicating whether implementation acknowledgement is needed. - */ - @JsonProperty(value = "needImplementationAcknowledgement", required = true) - private boolean needImplementationAcknowledgement; - - /** - * The implementation acknowledgement version. - */ - @JsonProperty(value = "implementationAcknowledgementVersion") - private String implementationAcknowledgementVersion; - - /** - * The value indicating whether to batch implementation acknowledgements. - */ - @JsonProperty(value = "batchImplementationAcknowledgements", required = true) - private boolean batchImplementationAcknowledgements; - - /** - * The value indicating whether a loop is needed for valid messages. - */ - @JsonProperty(value = "needLoopForValidMessages", required = true) - private boolean needLoopForValidMessages; - - /** - * The value indicating whether to send synchronous acknowledgement. - */ - @JsonProperty(value = "sendSynchronousAcknowledgement", required = true) - private boolean sendSynchronousAcknowledgement; - - /** - * The acknowledgement control number prefix. - */ - @JsonProperty(value = "acknowledgementControlNumberPrefix") - private String acknowledgementControlNumberPrefix; - - /** - * The acknowledgement control number suffix. - */ - @JsonProperty(value = "acknowledgementControlNumberSuffix") - private String acknowledgementControlNumberSuffix; - - /** - * The acknowledgement control number lower bound. - */ - @JsonProperty(value = "acknowledgementControlNumberLowerBound", required = true) - private int acknowledgementControlNumberLowerBound; - - /** - * The acknowledgement control number upper bound. - */ - @JsonProperty(value = "acknowledgementControlNumberUpperBound", required = true) - private int acknowledgementControlNumberUpperBound; - - /** - * The value indicating whether to rollover acknowledgement control number. - */ - @JsonProperty(value = "rolloverAcknowledgementControlNumber", required = true) - private boolean rolloverAcknowledgementControlNumber; - - /** - * Get the needTechnicalAcknowledgement value. - * - * @return the needTechnicalAcknowledgement value - */ - public boolean needTechnicalAcknowledgement() { - return this.needTechnicalAcknowledgement; - } - - /** - * Set the needTechnicalAcknowledgement value. - * - * @param needTechnicalAcknowledgement the needTechnicalAcknowledgement value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withNeedTechnicalAcknowledgement(boolean needTechnicalAcknowledgement) { - this.needTechnicalAcknowledgement = needTechnicalAcknowledgement; - return this; - } - - /** - * Get the batchTechnicalAcknowledgements value. - * - * @return the batchTechnicalAcknowledgements value - */ - public boolean batchTechnicalAcknowledgements() { - return this.batchTechnicalAcknowledgements; - } - - /** - * Set the batchTechnicalAcknowledgements value. - * - * @param batchTechnicalAcknowledgements the batchTechnicalAcknowledgements value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withBatchTechnicalAcknowledgements(boolean batchTechnicalAcknowledgements) { - this.batchTechnicalAcknowledgements = batchTechnicalAcknowledgements; - return this; - } - - /** - * Get the needFunctionalAcknowledgement value. - * - * @return the needFunctionalAcknowledgement value - */ - public boolean needFunctionalAcknowledgement() { - return this.needFunctionalAcknowledgement; - } - - /** - * Set the needFunctionalAcknowledgement value. - * - * @param needFunctionalAcknowledgement the needFunctionalAcknowledgement value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withNeedFunctionalAcknowledgement(boolean needFunctionalAcknowledgement) { - this.needFunctionalAcknowledgement = needFunctionalAcknowledgement; - return this; - } - - /** - * Get the functionalAcknowledgementVersion value. - * - * @return the functionalAcknowledgementVersion value - */ - public String functionalAcknowledgementVersion() { - return this.functionalAcknowledgementVersion; - } - - /** - * Set the functionalAcknowledgementVersion value. - * - * @param functionalAcknowledgementVersion the functionalAcknowledgementVersion value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withFunctionalAcknowledgementVersion(String functionalAcknowledgementVersion) { - this.functionalAcknowledgementVersion = functionalAcknowledgementVersion; - return this; - } - - /** - * Get the batchFunctionalAcknowledgements value. - * - * @return the batchFunctionalAcknowledgements value - */ - public boolean batchFunctionalAcknowledgements() { - return this.batchFunctionalAcknowledgements; - } - - /** - * Set the batchFunctionalAcknowledgements value. - * - * @param batchFunctionalAcknowledgements the batchFunctionalAcknowledgements value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withBatchFunctionalAcknowledgements(boolean batchFunctionalAcknowledgements) { - this.batchFunctionalAcknowledgements = batchFunctionalAcknowledgements; - return this; - } - - /** - * Get the needImplementationAcknowledgement value. - * - * @return the needImplementationAcknowledgement value - */ - public boolean needImplementationAcknowledgement() { - return this.needImplementationAcknowledgement; - } - - /** - * Set the needImplementationAcknowledgement value. - * - * @param needImplementationAcknowledgement the needImplementationAcknowledgement value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withNeedImplementationAcknowledgement(boolean needImplementationAcknowledgement) { - this.needImplementationAcknowledgement = needImplementationAcknowledgement; - return this; - } - - /** - * Get the implementationAcknowledgementVersion value. - * - * @return the implementationAcknowledgementVersion value - */ - public String implementationAcknowledgementVersion() { - return this.implementationAcknowledgementVersion; - } - - /** - * Set the implementationAcknowledgementVersion value. - * - * @param implementationAcknowledgementVersion the implementationAcknowledgementVersion value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withImplementationAcknowledgementVersion(String implementationAcknowledgementVersion) { - this.implementationAcknowledgementVersion = implementationAcknowledgementVersion; - return this; - } - - /** - * Get the batchImplementationAcknowledgements value. - * - * @return the batchImplementationAcknowledgements value - */ - public boolean batchImplementationAcknowledgements() { - return this.batchImplementationAcknowledgements; - } - - /** - * Set the batchImplementationAcknowledgements value. - * - * @param batchImplementationAcknowledgements the batchImplementationAcknowledgements value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withBatchImplementationAcknowledgements(boolean batchImplementationAcknowledgements) { - this.batchImplementationAcknowledgements = batchImplementationAcknowledgements; - return this; - } - - /** - * Get the needLoopForValidMessages value. - * - * @return the needLoopForValidMessages value - */ - public boolean needLoopForValidMessages() { - return this.needLoopForValidMessages; - } - - /** - * Set the needLoopForValidMessages value. - * - * @param needLoopForValidMessages the needLoopForValidMessages value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withNeedLoopForValidMessages(boolean needLoopForValidMessages) { - this.needLoopForValidMessages = needLoopForValidMessages; - return this; - } - - /** - * Get the sendSynchronousAcknowledgement value. - * - * @return the sendSynchronousAcknowledgement value - */ - public boolean sendSynchronousAcknowledgement() { - return this.sendSynchronousAcknowledgement; - } - - /** - * Set the sendSynchronousAcknowledgement value. - * - * @param sendSynchronousAcknowledgement the sendSynchronousAcknowledgement value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withSendSynchronousAcknowledgement(boolean sendSynchronousAcknowledgement) { - this.sendSynchronousAcknowledgement = sendSynchronousAcknowledgement; - return this; - } - - /** - * Get the acknowledgementControlNumberPrefix value. - * - * @return the acknowledgementControlNumberPrefix value - */ - public String acknowledgementControlNumberPrefix() { - return this.acknowledgementControlNumberPrefix; - } - - /** - * Set the acknowledgementControlNumberPrefix value. - * - * @param acknowledgementControlNumberPrefix the acknowledgementControlNumberPrefix value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withAcknowledgementControlNumberPrefix(String acknowledgementControlNumberPrefix) { - this.acknowledgementControlNumberPrefix = acknowledgementControlNumberPrefix; - return this; - } - - /** - * Get the acknowledgementControlNumberSuffix value. - * - * @return the acknowledgementControlNumberSuffix value - */ - public String acknowledgementControlNumberSuffix() { - return this.acknowledgementControlNumberSuffix; - } - - /** - * Set the acknowledgementControlNumberSuffix value. - * - * @param acknowledgementControlNumberSuffix the acknowledgementControlNumberSuffix value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withAcknowledgementControlNumberSuffix(String acknowledgementControlNumberSuffix) { - this.acknowledgementControlNumberSuffix = acknowledgementControlNumberSuffix; - return this; - } - - /** - * Get the acknowledgementControlNumberLowerBound value. - * - * @return the acknowledgementControlNumberLowerBound value - */ - public int acknowledgementControlNumberLowerBound() { - return this.acknowledgementControlNumberLowerBound; - } - - /** - * Set the acknowledgementControlNumberLowerBound value. - * - * @param acknowledgementControlNumberLowerBound the acknowledgementControlNumberLowerBound value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withAcknowledgementControlNumberLowerBound(int acknowledgementControlNumberLowerBound) { - this.acknowledgementControlNumberLowerBound = acknowledgementControlNumberLowerBound; - return this; - } - - /** - * Get the acknowledgementControlNumberUpperBound value. - * - * @return the acknowledgementControlNumberUpperBound value - */ - public int acknowledgementControlNumberUpperBound() { - return this.acknowledgementControlNumberUpperBound; - } - - /** - * Set the acknowledgementControlNumberUpperBound value. - * - * @param acknowledgementControlNumberUpperBound the acknowledgementControlNumberUpperBound value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withAcknowledgementControlNumberUpperBound(int acknowledgementControlNumberUpperBound) { - this.acknowledgementControlNumberUpperBound = acknowledgementControlNumberUpperBound; - return this; - } - - /** - * Get the rolloverAcknowledgementControlNumber value. - * - * @return the rolloverAcknowledgementControlNumber value - */ - public boolean rolloverAcknowledgementControlNumber() { - return this.rolloverAcknowledgementControlNumber; - } - - /** - * Set the rolloverAcknowledgementControlNumber value. - * - * @param rolloverAcknowledgementControlNumber the rolloverAcknowledgementControlNumber value to set - * @return the X12AcknowledgementSettings object itself. - */ - public X12AcknowledgementSettings withRolloverAcknowledgementControlNumber(boolean rolloverAcknowledgementControlNumber) { - this.rolloverAcknowledgementControlNumber = rolloverAcknowledgementControlNumber; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12AgreementContent.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12AgreementContent.java deleted file mode 100755 index 4542aad369b..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12AgreementContent.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 agreement content. - */ -public class X12AgreementContent { - /** - * The X12 one-way receive agreement. - */ - @JsonProperty(value = "receiveAgreement", required = true) - private X12OneWayAgreement receiveAgreement; - - /** - * The X12 one-way send agreement. - */ - @JsonProperty(value = "sendAgreement", required = true) - private X12OneWayAgreement sendAgreement; - - /** - * Get the receiveAgreement value. - * - * @return the receiveAgreement value - */ - public X12OneWayAgreement receiveAgreement() { - return this.receiveAgreement; - } - - /** - * Set the receiveAgreement value. - * - * @param receiveAgreement the receiveAgreement value to set - * @return the X12AgreementContent object itself. - */ - public X12AgreementContent withReceiveAgreement(X12OneWayAgreement receiveAgreement) { - this.receiveAgreement = receiveAgreement; - return this; - } - - /** - * Get the sendAgreement value. - * - * @return the sendAgreement value - */ - public X12OneWayAgreement sendAgreement() { - return this.sendAgreement; - } - - /** - * Set the sendAgreement value. - * - * @param sendAgreement the sendAgreement value to set - * @return the X12AgreementContent object itself. - */ - public X12AgreementContent withSendAgreement(X12OneWayAgreement sendAgreement) { - this.sendAgreement = sendAgreement; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12CharacterSet.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12CharacterSet.java deleted file mode 100755 index 4140feaf4c4..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12CharacterSet.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for X12CharacterSet. - */ -public enum X12CharacterSet { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value Basic. */ - BASIC("Basic"), - - /** Enum value Extended. */ - EXTENDED("Extended"), - - /** Enum value UTF8. */ - UTF8("UTF8"); - - /** The actual serialized value for a X12CharacterSet instance. */ - private String value; - - X12CharacterSet(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a X12CharacterSet instance. - * - * @param value the serialized value to parse. - * @return the parsed X12CharacterSet object, or null if unable to parse. - */ - @JsonCreator - public static X12CharacterSet fromString(String value) { - X12CharacterSet[] items = X12CharacterSet.values(); - for (X12CharacterSet item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12DateFormat.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12DateFormat.java deleted file mode 100755 index 492b1af6d9f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12DateFormat.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for X12DateFormat. - */ -public enum X12DateFormat { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value CCYYMMDD. */ - CCYYMMDD("CCYYMMDD"), - - /** Enum value YYMMDD. */ - YYMMDD("YYMMDD"); - - /** The actual serialized value for a X12DateFormat instance. */ - private String value; - - X12DateFormat(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a X12DateFormat instance. - * - * @param value the serialized value to parse. - * @return the parsed X12DateFormat object, or null if unable to parse. - */ - @JsonCreator - public static X12DateFormat fromString(String value) { - X12DateFormat[] items = X12DateFormat.values(); - for (X12DateFormat item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12DelimiterOverrides.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12DelimiterOverrides.java deleted file mode 100755 index 0e515072e05..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12DelimiterOverrides.java +++ /dev/null @@ -1,252 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 delimiter override settings. - */ -public class X12DelimiterOverrides { - /** - * The protocol version. - */ - @JsonProperty(value = "protocolVersion") - private String protocolVersion; - - /** - * The message id. - */ - @JsonProperty(value = "messageId") - private String messageId; - - /** - * The data element separator. - */ - @JsonProperty(value = "dataElementSeparator", required = true) - private int dataElementSeparator; - - /** - * The component separator. - */ - @JsonProperty(value = "componentSeparator", required = true) - private int componentSeparator; - - /** - * The segment terminator. - */ - @JsonProperty(value = "segmentTerminator", required = true) - private int segmentTerminator; - - /** - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF'. - */ - @JsonProperty(value = "segmentTerminatorSuffix", required = true) - private SegmentTerminatorSuffix segmentTerminatorSuffix; - - /** - * The replacement character. - */ - @JsonProperty(value = "replaceCharacter", required = true) - private int replaceCharacter; - - /** - * The value indicating whether to replace separators in payload. - */ - @JsonProperty(value = "replaceSeparatorsInPayload", required = true) - private boolean replaceSeparatorsInPayload; - - /** - * The target namespace on which this delimiter settings has to be applied. - */ - @JsonProperty(value = "targetNamespace") - private String targetNamespace; - - /** - * Get the protocolVersion value. - * - * @return the protocolVersion value - */ - public String protocolVersion() { - return this.protocolVersion; - } - - /** - * Set the protocolVersion value. - * - * @param protocolVersion the protocolVersion value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withProtocolVersion(String protocolVersion) { - this.protocolVersion = protocolVersion; - return this; - } - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the dataElementSeparator value. - * - * @return the dataElementSeparator value - */ - public int dataElementSeparator() { - return this.dataElementSeparator; - } - - /** - * Set the dataElementSeparator value. - * - * @param dataElementSeparator the dataElementSeparator value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withDataElementSeparator(int dataElementSeparator) { - this.dataElementSeparator = dataElementSeparator; - return this; - } - - /** - * Get the componentSeparator value. - * - * @return the componentSeparator value - */ - public int componentSeparator() { - return this.componentSeparator; - } - - /** - * Set the componentSeparator value. - * - * @param componentSeparator the componentSeparator value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withComponentSeparator(int componentSeparator) { - this.componentSeparator = componentSeparator; - return this; - } - - /** - * Get the segmentTerminator value. - * - * @return the segmentTerminator value - */ - public int segmentTerminator() { - return this.segmentTerminator; - } - - /** - * Set the segmentTerminator value. - * - * @param segmentTerminator the segmentTerminator value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withSegmentTerminator(int segmentTerminator) { - this.segmentTerminator = segmentTerminator; - return this; - } - - /** - * Get the segmentTerminatorSuffix value. - * - * @return the segmentTerminatorSuffix value - */ - public SegmentTerminatorSuffix segmentTerminatorSuffix() { - return this.segmentTerminatorSuffix; - } - - /** - * Set the segmentTerminatorSuffix value. - * - * @param segmentTerminatorSuffix the segmentTerminatorSuffix value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withSegmentTerminatorSuffix(SegmentTerminatorSuffix segmentTerminatorSuffix) { - this.segmentTerminatorSuffix = segmentTerminatorSuffix; - return this; - } - - /** - * Get the replaceCharacter value. - * - * @return the replaceCharacter value - */ - public int replaceCharacter() { - return this.replaceCharacter; - } - - /** - * Set the replaceCharacter value. - * - * @param replaceCharacter the replaceCharacter value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withReplaceCharacter(int replaceCharacter) { - this.replaceCharacter = replaceCharacter; - return this; - } - - /** - * Get the replaceSeparatorsInPayload value. - * - * @return the replaceSeparatorsInPayload value - */ - public boolean replaceSeparatorsInPayload() { - return this.replaceSeparatorsInPayload; - } - - /** - * Set the replaceSeparatorsInPayload value. - * - * @param replaceSeparatorsInPayload the replaceSeparatorsInPayload value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withReplaceSeparatorsInPayload(boolean replaceSeparatorsInPayload) { - this.replaceSeparatorsInPayload = replaceSeparatorsInPayload; - return this; - } - - /** - * Get the targetNamespace value. - * - * @return the targetNamespace value - */ - public String targetNamespace() { - return this.targetNamespace; - } - - /** - * Set the targetNamespace value. - * - * @param targetNamespace the targetNamespace value to set - * @return the X12DelimiterOverrides object itself. - */ - public X12DelimiterOverrides withTargetNamespace(String targetNamespace) { - this.targetNamespace = targetNamespace; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12EnvelopeOverride.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12EnvelopeOverride.java deleted file mode 100755 index caddd782950..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12EnvelopeOverride.java +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 envelope override settings. - */ -public class X12EnvelopeOverride { - /** - * The target namespace on which this envelope settings has to be applied. - */ - @JsonProperty(value = "targetNamespace", required = true) - private String targetNamespace; - - /** - * The protocol version on which this envelope settings has to be applied. - */ - @JsonProperty(value = "protocolVersion", required = true) - private String protocolVersion; - - /** - * The message id on which this envelope settings has to be applied. - */ - @JsonProperty(value = "messageId", required = true) - private String messageId; - - /** - * The responsible agency code. - */ - @JsonProperty(value = "responsibleAgencyCode", required = true) - private String responsibleAgencyCode; - - /** - * The header version. - */ - @JsonProperty(value = "headerVersion", required = true) - private String headerVersion; - - /** - * The sender application id. - */ - @JsonProperty(value = "senderApplicationId", required = true) - private String senderApplicationId; - - /** - * The receiver application id. - */ - @JsonProperty(value = "receiverApplicationId", required = true) - private String receiverApplicationId; - - /** - * The functional identifier code. - */ - @JsonProperty(value = "functionalIdentifierCode") - private String functionalIdentifierCode; - - /** - * The date format. Possible values include: 'NotSpecified', 'CCYYMMDD', - * 'YYMMDD'. - */ - @JsonProperty(value = "dateFormat", required = true) - private X12DateFormat dateFormat; - - /** - * The time format. Possible values include: 'NotSpecified', 'HHMM', - * 'HHMMSS', 'HHMMSSdd', 'HHMMSSd'. - */ - @JsonProperty(value = "timeFormat", required = true) - private X12TimeFormat timeFormat; - - /** - * Get the targetNamespace value. - * - * @return the targetNamespace value - */ - public String targetNamespace() { - return this.targetNamespace; - } - - /** - * Set the targetNamespace value. - * - * @param targetNamespace the targetNamespace value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withTargetNamespace(String targetNamespace) { - this.targetNamespace = targetNamespace; - return this; - } - - /** - * Get the protocolVersion value. - * - * @return the protocolVersion value - */ - public String protocolVersion() { - return this.protocolVersion; - } - - /** - * Set the protocolVersion value. - * - * @param protocolVersion the protocolVersion value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withProtocolVersion(String protocolVersion) { - this.protocolVersion = protocolVersion; - return this; - } - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the responsibleAgencyCode value. - * - * @return the responsibleAgencyCode value - */ - public String responsibleAgencyCode() { - return this.responsibleAgencyCode; - } - - /** - * Set the responsibleAgencyCode value. - * - * @param responsibleAgencyCode the responsibleAgencyCode value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withResponsibleAgencyCode(String responsibleAgencyCode) { - this.responsibleAgencyCode = responsibleAgencyCode; - return this; - } - - /** - * Get the headerVersion value. - * - * @return the headerVersion value - */ - public String headerVersion() { - return this.headerVersion; - } - - /** - * Set the headerVersion value. - * - * @param headerVersion the headerVersion value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withHeaderVersion(String headerVersion) { - this.headerVersion = headerVersion; - return this; - } - - /** - * Get the senderApplicationId value. - * - * @return the senderApplicationId value - */ - public String senderApplicationId() { - return this.senderApplicationId; - } - - /** - * Set the senderApplicationId value. - * - * @param senderApplicationId the senderApplicationId value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withSenderApplicationId(String senderApplicationId) { - this.senderApplicationId = senderApplicationId; - return this; - } - - /** - * Get the receiverApplicationId value. - * - * @return the receiverApplicationId value - */ - public String receiverApplicationId() { - return this.receiverApplicationId; - } - - /** - * Set the receiverApplicationId value. - * - * @param receiverApplicationId the receiverApplicationId value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withReceiverApplicationId(String receiverApplicationId) { - this.receiverApplicationId = receiverApplicationId; - return this; - } - - /** - * Get the functionalIdentifierCode value. - * - * @return the functionalIdentifierCode value - */ - public String functionalIdentifierCode() { - return this.functionalIdentifierCode; - } - - /** - * Set the functionalIdentifierCode value. - * - * @param functionalIdentifierCode the functionalIdentifierCode value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withFunctionalIdentifierCode(String functionalIdentifierCode) { - this.functionalIdentifierCode = functionalIdentifierCode; - return this; - } - - /** - * Get the dateFormat value. - * - * @return the dateFormat value - */ - public X12DateFormat dateFormat() { - return this.dateFormat; - } - - /** - * Set the dateFormat value. - * - * @param dateFormat the dateFormat value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withDateFormat(X12DateFormat dateFormat) { - this.dateFormat = dateFormat; - return this; - } - - /** - * Get the timeFormat value. - * - * @return the timeFormat value - */ - public X12TimeFormat timeFormat() { - return this.timeFormat; - } - - /** - * Set the timeFormat value. - * - * @param timeFormat the timeFormat value to set - * @return the X12EnvelopeOverride object itself. - */ - public X12EnvelopeOverride withTimeFormat(X12TimeFormat timeFormat) { - this.timeFormat = timeFormat; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12EnvelopeSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12EnvelopeSettings.java deleted file mode 100755 index 8ea686a9149..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12EnvelopeSettings.java +++ /dev/null @@ -1,646 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 agreement envelope settings. - */ -public class X12EnvelopeSettings { - /** - * The controls standards id. - */ - @JsonProperty(value = "controlStandardsId", required = true) - private int controlStandardsId; - - /** - * The value indicating whether to use control standards id as repetition - * character. - */ - @JsonProperty(value = "useControlStandardsIdAsRepetitionCharacter", required = true) - private boolean useControlStandardsIdAsRepetitionCharacter; - - /** - * The sender application id. - */ - @JsonProperty(value = "senderApplicationId", required = true) - private String senderApplicationId; - - /** - * The receiver application id. - */ - @JsonProperty(value = "receiverApplicationId", required = true) - private String receiverApplicationId; - - /** - * The control version number. - */ - @JsonProperty(value = "controlVersionNumber", required = true) - private String controlVersionNumber; - - /** - * The interchange control number lower bound. - */ - @JsonProperty(value = "interchangeControlNumberLowerBound", required = true) - private int interchangeControlNumberLowerBound; - - /** - * The interchange control number upper bound. - */ - @JsonProperty(value = "interchangeControlNumberUpperBound", required = true) - private int interchangeControlNumberUpperBound; - - /** - * The value indicating whether to rollover interchange control number. - */ - @JsonProperty(value = "rolloverInterchangeControlNumber", required = true) - private boolean rolloverInterchangeControlNumber; - - /** - * The value indicating whether to enable default group headers. - */ - @JsonProperty(value = "enableDefaultGroupHeaders", required = true) - private boolean enableDefaultGroupHeaders; - - /** - * The functional group id. - */ - @JsonProperty(value = "functionalGroupId") - private String functionalGroupId; - - /** - * The group control number lower bound. - */ - @JsonProperty(value = "groupControlNumberLowerBound", required = true) - private int groupControlNumberLowerBound; - - /** - * The group control number upper bound. - */ - @JsonProperty(value = "groupControlNumberUpperBound", required = true) - private int groupControlNumberUpperBound; - - /** - * The value indicating whether to rollover group control number. - */ - @JsonProperty(value = "rolloverGroupControlNumber", required = true) - private boolean rolloverGroupControlNumber; - - /** - * The group header agency code. - */ - @JsonProperty(value = "groupHeaderAgencyCode", required = true) - private String groupHeaderAgencyCode; - - /** - * The group header version. - */ - @JsonProperty(value = "groupHeaderVersion", required = true) - private String groupHeaderVersion; - - /** - * The transaction set control number lower bound. - */ - @JsonProperty(value = "transactionSetControlNumberLowerBound", required = true) - private int transactionSetControlNumberLowerBound; - - /** - * The transaction set control number upper bound. - */ - @JsonProperty(value = "transactionSetControlNumberUpperBound", required = true) - private int transactionSetControlNumberUpperBound; - - /** - * The value indicating whether to rollover transaction set control number. - */ - @JsonProperty(value = "rolloverTransactionSetControlNumber", required = true) - private boolean rolloverTransactionSetControlNumber; - - /** - * The transaction set control number prefix. - */ - @JsonProperty(value = "transactionSetControlNumberPrefix") - private String transactionSetControlNumberPrefix; - - /** - * The transaction set control number suffix. - */ - @JsonProperty(value = "transactionSetControlNumberSuffix") - private String transactionSetControlNumberSuffix; - - /** - * The value indicating whether to overwrite existing transaction set - * control number. - */ - @JsonProperty(value = "overwriteExistingTransactionSetControlNumber", required = true) - private boolean overwriteExistingTransactionSetControlNumber; - - /** - * The group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD'. - */ - @JsonProperty(value = "groupHeaderDateFormat", required = true) - private X12DateFormat groupHeaderDateFormat; - - /** - * The group header time format. Possible values include: 'NotSpecified', - * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd'. - */ - @JsonProperty(value = "groupHeaderTimeFormat", required = true) - private X12TimeFormat groupHeaderTimeFormat; - - /** - * The usage indicator. Possible values include: 'NotSpecified', 'Test', - * 'Information', 'Production'. - */ - @JsonProperty(value = "usageIndicator", required = true) - private UsageIndicator usageIndicator; - - /** - * Get the controlStandardsId value. - * - * @return the controlStandardsId value - */ - public int controlStandardsId() { - return this.controlStandardsId; - } - - /** - * Set the controlStandardsId value. - * - * @param controlStandardsId the controlStandardsId value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withControlStandardsId(int controlStandardsId) { - this.controlStandardsId = controlStandardsId; - return this; - } - - /** - * Get the useControlStandardsIdAsRepetitionCharacter value. - * - * @return the useControlStandardsIdAsRepetitionCharacter value - */ - public boolean useControlStandardsIdAsRepetitionCharacter() { - return this.useControlStandardsIdAsRepetitionCharacter; - } - - /** - * Set the useControlStandardsIdAsRepetitionCharacter value. - * - * @param useControlStandardsIdAsRepetitionCharacter the useControlStandardsIdAsRepetitionCharacter value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withUseControlStandardsIdAsRepetitionCharacter(boolean useControlStandardsIdAsRepetitionCharacter) { - this.useControlStandardsIdAsRepetitionCharacter = useControlStandardsIdAsRepetitionCharacter; - return this; - } - - /** - * Get the senderApplicationId value. - * - * @return the senderApplicationId value - */ - public String senderApplicationId() { - return this.senderApplicationId; - } - - /** - * Set the senderApplicationId value. - * - * @param senderApplicationId the senderApplicationId value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withSenderApplicationId(String senderApplicationId) { - this.senderApplicationId = senderApplicationId; - return this; - } - - /** - * Get the receiverApplicationId value. - * - * @return the receiverApplicationId value - */ - public String receiverApplicationId() { - return this.receiverApplicationId; - } - - /** - * Set the receiverApplicationId value. - * - * @param receiverApplicationId the receiverApplicationId value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withReceiverApplicationId(String receiverApplicationId) { - this.receiverApplicationId = receiverApplicationId; - return this; - } - - /** - * Get the controlVersionNumber value. - * - * @return the controlVersionNumber value - */ - public String controlVersionNumber() { - return this.controlVersionNumber; - } - - /** - * Set the controlVersionNumber value. - * - * @param controlVersionNumber the controlVersionNumber value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withControlVersionNumber(String controlVersionNumber) { - this.controlVersionNumber = controlVersionNumber; - return this; - } - - /** - * Get the interchangeControlNumberLowerBound value. - * - * @return the interchangeControlNumberLowerBound value - */ - public int interchangeControlNumberLowerBound() { - return this.interchangeControlNumberLowerBound; - } - - /** - * Set the interchangeControlNumberLowerBound value. - * - * @param interchangeControlNumberLowerBound the interchangeControlNumberLowerBound value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withInterchangeControlNumberLowerBound(int interchangeControlNumberLowerBound) { - this.interchangeControlNumberLowerBound = interchangeControlNumberLowerBound; - return this; - } - - /** - * Get the interchangeControlNumberUpperBound value. - * - * @return the interchangeControlNumberUpperBound value - */ - public int interchangeControlNumberUpperBound() { - return this.interchangeControlNumberUpperBound; - } - - /** - * Set the interchangeControlNumberUpperBound value. - * - * @param interchangeControlNumberUpperBound the interchangeControlNumberUpperBound value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withInterchangeControlNumberUpperBound(int interchangeControlNumberUpperBound) { - this.interchangeControlNumberUpperBound = interchangeControlNumberUpperBound; - return this; - } - - /** - * Get the rolloverInterchangeControlNumber value. - * - * @return the rolloverInterchangeControlNumber value - */ - public boolean rolloverInterchangeControlNumber() { - return this.rolloverInterchangeControlNumber; - } - - /** - * Set the rolloverInterchangeControlNumber value. - * - * @param rolloverInterchangeControlNumber the rolloverInterchangeControlNumber value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withRolloverInterchangeControlNumber(boolean rolloverInterchangeControlNumber) { - this.rolloverInterchangeControlNumber = rolloverInterchangeControlNumber; - return this; - } - - /** - * Get the enableDefaultGroupHeaders value. - * - * @return the enableDefaultGroupHeaders value - */ - public boolean enableDefaultGroupHeaders() { - return this.enableDefaultGroupHeaders; - } - - /** - * Set the enableDefaultGroupHeaders value. - * - * @param enableDefaultGroupHeaders the enableDefaultGroupHeaders value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withEnableDefaultGroupHeaders(boolean enableDefaultGroupHeaders) { - this.enableDefaultGroupHeaders = enableDefaultGroupHeaders; - return this; - } - - /** - * Get the functionalGroupId value. - * - * @return the functionalGroupId value - */ - public String functionalGroupId() { - return this.functionalGroupId; - } - - /** - * Set the functionalGroupId value. - * - * @param functionalGroupId the functionalGroupId value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withFunctionalGroupId(String functionalGroupId) { - this.functionalGroupId = functionalGroupId; - return this; - } - - /** - * Get the groupControlNumberLowerBound value. - * - * @return the groupControlNumberLowerBound value - */ - public int groupControlNumberLowerBound() { - return this.groupControlNumberLowerBound; - } - - /** - * Set the groupControlNumberLowerBound value. - * - * @param groupControlNumberLowerBound the groupControlNumberLowerBound value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withGroupControlNumberLowerBound(int groupControlNumberLowerBound) { - this.groupControlNumberLowerBound = groupControlNumberLowerBound; - return this; - } - - /** - * Get the groupControlNumberUpperBound value. - * - * @return the groupControlNumberUpperBound value - */ - public int groupControlNumberUpperBound() { - return this.groupControlNumberUpperBound; - } - - /** - * Set the groupControlNumberUpperBound value. - * - * @param groupControlNumberUpperBound the groupControlNumberUpperBound value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withGroupControlNumberUpperBound(int groupControlNumberUpperBound) { - this.groupControlNumberUpperBound = groupControlNumberUpperBound; - return this; - } - - /** - * Get the rolloverGroupControlNumber value. - * - * @return the rolloverGroupControlNumber value - */ - public boolean rolloverGroupControlNumber() { - return this.rolloverGroupControlNumber; - } - - /** - * Set the rolloverGroupControlNumber value. - * - * @param rolloverGroupControlNumber the rolloverGroupControlNumber value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withRolloverGroupControlNumber(boolean rolloverGroupControlNumber) { - this.rolloverGroupControlNumber = rolloverGroupControlNumber; - return this; - } - - /** - * Get the groupHeaderAgencyCode value. - * - * @return the groupHeaderAgencyCode value - */ - public String groupHeaderAgencyCode() { - return this.groupHeaderAgencyCode; - } - - /** - * Set the groupHeaderAgencyCode value. - * - * @param groupHeaderAgencyCode the groupHeaderAgencyCode value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withGroupHeaderAgencyCode(String groupHeaderAgencyCode) { - this.groupHeaderAgencyCode = groupHeaderAgencyCode; - return this; - } - - /** - * Get the groupHeaderVersion value. - * - * @return the groupHeaderVersion value - */ - public String groupHeaderVersion() { - return this.groupHeaderVersion; - } - - /** - * Set the groupHeaderVersion value. - * - * @param groupHeaderVersion the groupHeaderVersion value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withGroupHeaderVersion(String groupHeaderVersion) { - this.groupHeaderVersion = groupHeaderVersion; - return this; - } - - /** - * Get the transactionSetControlNumberLowerBound value. - * - * @return the transactionSetControlNumberLowerBound value - */ - public int transactionSetControlNumberLowerBound() { - return this.transactionSetControlNumberLowerBound; - } - - /** - * Set the transactionSetControlNumberLowerBound value. - * - * @param transactionSetControlNumberLowerBound the transactionSetControlNumberLowerBound value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withTransactionSetControlNumberLowerBound(int transactionSetControlNumberLowerBound) { - this.transactionSetControlNumberLowerBound = transactionSetControlNumberLowerBound; - return this; - } - - /** - * Get the transactionSetControlNumberUpperBound value. - * - * @return the transactionSetControlNumberUpperBound value - */ - public int transactionSetControlNumberUpperBound() { - return this.transactionSetControlNumberUpperBound; - } - - /** - * Set the transactionSetControlNumberUpperBound value. - * - * @param transactionSetControlNumberUpperBound the transactionSetControlNumberUpperBound value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withTransactionSetControlNumberUpperBound(int transactionSetControlNumberUpperBound) { - this.transactionSetControlNumberUpperBound = transactionSetControlNumberUpperBound; - return this; - } - - /** - * Get the rolloverTransactionSetControlNumber value. - * - * @return the rolloverTransactionSetControlNumber value - */ - public boolean rolloverTransactionSetControlNumber() { - return this.rolloverTransactionSetControlNumber; - } - - /** - * Set the rolloverTransactionSetControlNumber value. - * - * @param rolloverTransactionSetControlNumber the rolloverTransactionSetControlNumber value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withRolloverTransactionSetControlNumber(boolean rolloverTransactionSetControlNumber) { - this.rolloverTransactionSetControlNumber = rolloverTransactionSetControlNumber; - return this; - } - - /** - * Get the transactionSetControlNumberPrefix value. - * - * @return the transactionSetControlNumberPrefix value - */ - public String transactionSetControlNumberPrefix() { - return this.transactionSetControlNumberPrefix; - } - - /** - * Set the transactionSetControlNumberPrefix value. - * - * @param transactionSetControlNumberPrefix the transactionSetControlNumberPrefix value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withTransactionSetControlNumberPrefix(String transactionSetControlNumberPrefix) { - this.transactionSetControlNumberPrefix = transactionSetControlNumberPrefix; - return this; - } - - /** - * Get the transactionSetControlNumberSuffix value. - * - * @return the transactionSetControlNumberSuffix value - */ - public String transactionSetControlNumberSuffix() { - return this.transactionSetControlNumberSuffix; - } - - /** - * Set the transactionSetControlNumberSuffix value. - * - * @param transactionSetControlNumberSuffix the transactionSetControlNumberSuffix value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withTransactionSetControlNumberSuffix(String transactionSetControlNumberSuffix) { - this.transactionSetControlNumberSuffix = transactionSetControlNumberSuffix; - return this; - } - - /** - * Get the overwriteExistingTransactionSetControlNumber value. - * - * @return the overwriteExistingTransactionSetControlNumber value - */ - public boolean overwriteExistingTransactionSetControlNumber() { - return this.overwriteExistingTransactionSetControlNumber; - } - - /** - * Set the overwriteExistingTransactionSetControlNumber value. - * - * @param overwriteExistingTransactionSetControlNumber the overwriteExistingTransactionSetControlNumber value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withOverwriteExistingTransactionSetControlNumber(boolean overwriteExistingTransactionSetControlNumber) { - this.overwriteExistingTransactionSetControlNumber = overwriteExistingTransactionSetControlNumber; - return this; - } - - /** - * Get the groupHeaderDateFormat value. - * - * @return the groupHeaderDateFormat value - */ - public X12DateFormat groupHeaderDateFormat() { - return this.groupHeaderDateFormat; - } - - /** - * Set the groupHeaderDateFormat value. - * - * @param groupHeaderDateFormat the groupHeaderDateFormat value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withGroupHeaderDateFormat(X12DateFormat groupHeaderDateFormat) { - this.groupHeaderDateFormat = groupHeaderDateFormat; - return this; - } - - /** - * Get the groupHeaderTimeFormat value. - * - * @return the groupHeaderTimeFormat value - */ - public X12TimeFormat groupHeaderTimeFormat() { - return this.groupHeaderTimeFormat; - } - - /** - * Set the groupHeaderTimeFormat value. - * - * @param groupHeaderTimeFormat the groupHeaderTimeFormat value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withGroupHeaderTimeFormat(X12TimeFormat groupHeaderTimeFormat) { - this.groupHeaderTimeFormat = groupHeaderTimeFormat; - return this; - } - - /** - * Get the usageIndicator value. - * - * @return the usageIndicator value - */ - public UsageIndicator usageIndicator() { - return this.usageIndicator; - } - - /** - * Set the usageIndicator value. - * - * @param usageIndicator the usageIndicator value to set - * @return the X12EnvelopeSettings object itself. - */ - public X12EnvelopeSettings withUsageIndicator(UsageIndicator usageIndicator) { - this.usageIndicator = usageIndicator; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12FramingSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12FramingSettings.java deleted file mode 100755 index 11ee75026b4..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12FramingSettings.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 agreement framing settings. - */ -public class X12FramingSettings { - /** - * The data element separator. - */ - @JsonProperty(value = "dataElementSeparator", required = true) - private int dataElementSeparator; - - /** - * The component separator. - */ - @JsonProperty(value = "componentSeparator", required = true) - private int componentSeparator; - - /** - * The value indicating whether to replace separators in payload. - */ - @JsonProperty(value = "replaceSeparatorsInPayload", required = true) - private boolean replaceSeparatorsInPayload; - - /** - * The replacement character. - */ - @JsonProperty(value = "replaceCharacter", required = true) - private int replaceCharacter; - - /** - * The segment terminator. - */ - @JsonProperty(value = "segmentTerminator", required = true) - private int segmentTerminator; - - /** - * The X12 character set. Possible values include: 'NotSpecified', 'Basic', - * 'Extended', 'UTF8'. - */ - @JsonProperty(value = "characterSet", required = true) - private X12CharacterSet characterSet; - - /** - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF'. - */ - @JsonProperty(value = "segmentTerminatorSuffix", required = true) - private SegmentTerminatorSuffix segmentTerminatorSuffix; - - /** - * Get the dataElementSeparator value. - * - * @return the dataElementSeparator value - */ - public int dataElementSeparator() { - return this.dataElementSeparator; - } - - /** - * Set the dataElementSeparator value. - * - * @param dataElementSeparator the dataElementSeparator value to set - * @return the X12FramingSettings object itself. - */ - public X12FramingSettings withDataElementSeparator(int dataElementSeparator) { - this.dataElementSeparator = dataElementSeparator; - return this; - } - - /** - * Get the componentSeparator value. - * - * @return the componentSeparator value - */ - public int componentSeparator() { - return this.componentSeparator; - } - - /** - * Set the componentSeparator value. - * - * @param componentSeparator the componentSeparator value to set - * @return the X12FramingSettings object itself. - */ - public X12FramingSettings withComponentSeparator(int componentSeparator) { - this.componentSeparator = componentSeparator; - return this; - } - - /** - * Get the replaceSeparatorsInPayload value. - * - * @return the replaceSeparatorsInPayload value - */ - public boolean replaceSeparatorsInPayload() { - return this.replaceSeparatorsInPayload; - } - - /** - * Set the replaceSeparatorsInPayload value. - * - * @param replaceSeparatorsInPayload the replaceSeparatorsInPayload value to set - * @return the X12FramingSettings object itself. - */ - public X12FramingSettings withReplaceSeparatorsInPayload(boolean replaceSeparatorsInPayload) { - this.replaceSeparatorsInPayload = replaceSeparatorsInPayload; - return this; - } - - /** - * Get the replaceCharacter value. - * - * @return the replaceCharacter value - */ - public int replaceCharacter() { - return this.replaceCharacter; - } - - /** - * Set the replaceCharacter value. - * - * @param replaceCharacter the replaceCharacter value to set - * @return the X12FramingSettings object itself. - */ - public X12FramingSettings withReplaceCharacter(int replaceCharacter) { - this.replaceCharacter = replaceCharacter; - return this; - } - - /** - * Get the segmentTerminator value. - * - * @return the segmentTerminator value - */ - public int segmentTerminator() { - return this.segmentTerminator; - } - - /** - * Set the segmentTerminator value. - * - * @param segmentTerminator the segmentTerminator value to set - * @return the X12FramingSettings object itself. - */ - public X12FramingSettings withSegmentTerminator(int segmentTerminator) { - this.segmentTerminator = segmentTerminator; - return this; - } - - /** - * Get the characterSet value. - * - * @return the characterSet value - */ - public X12CharacterSet characterSet() { - return this.characterSet; - } - - /** - * Set the characterSet value. - * - * @param characterSet the characterSet value to set - * @return the X12FramingSettings object itself. - */ - public X12FramingSettings withCharacterSet(X12CharacterSet characterSet) { - this.characterSet = characterSet; - return this; - } - - /** - * Get the segmentTerminatorSuffix value. - * - * @return the segmentTerminatorSuffix value - */ - public SegmentTerminatorSuffix segmentTerminatorSuffix() { - return this.segmentTerminatorSuffix; - } - - /** - * Set the segmentTerminatorSuffix value. - * - * @param segmentTerminatorSuffix the segmentTerminatorSuffix value to set - * @return the X12FramingSettings object itself. - */ - public X12FramingSettings withSegmentTerminatorSuffix(SegmentTerminatorSuffix segmentTerminatorSuffix) { - this.segmentTerminatorSuffix = segmentTerminatorSuffix; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12MessageFilter.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12MessageFilter.java deleted file mode 100755 index 005d273c44d..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12MessageFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 message filter for odata query. - */ -public class X12MessageFilter { - /** - * The message filter type. Possible values include: 'NotSpecified', - * 'Include', 'Exclude'. - */ - @JsonProperty(value = "messageFilterType", required = true) - private MessageFilterType messageFilterType; - - /** - * Get the messageFilterType value. - * - * @return the messageFilterType value - */ - public MessageFilterType messageFilterType() { - return this.messageFilterType; - } - - /** - * Set the messageFilterType value. - * - * @param messageFilterType the messageFilterType value to set - * @return the X12MessageFilter object itself. - */ - public X12MessageFilter withMessageFilterType(MessageFilterType messageFilterType) { - this.messageFilterType = messageFilterType; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12MessageIdentifier.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12MessageIdentifier.java deleted file mode 100755 index 7f0814b428a..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12MessageIdentifier.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 message identifier. - */ -public class X12MessageIdentifier { - /** - * The message id. - */ - @JsonProperty(value = "messageId", required = true) - private String messageId; - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the X12MessageIdentifier object itself. - */ - public X12MessageIdentifier withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12OneWayAgreement.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12OneWayAgreement.java deleted file mode 100755 index 827d6dadc57..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12OneWayAgreement.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 oneway agreement. - */ -public class X12OneWayAgreement { - /** - * The sender business identity. - */ - @JsonProperty(value = "senderBusinessIdentity", required = true) - private BusinessIdentity senderBusinessIdentity; - - /** - * The receiver business identity. - */ - @JsonProperty(value = "receiverBusinessIdentity", required = true) - private BusinessIdentity receiverBusinessIdentity; - - /** - * The X12 protocol settings. - */ - @JsonProperty(value = "protocolSettings", required = true) - private X12ProtocolSettings protocolSettings; - - /** - * Get the senderBusinessIdentity value. - * - * @return the senderBusinessIdentity value - */ - public BusinessIdentity senderBusinessIdentity() { - return this.senderBusinessIdentity; - } - - /** - * Set the senderBusinessIdentity value. - * - * @param senderBusinessIdentity the senderBusinessIdentity value to set - * @return the X12OneWayAgreement object itself. - */ - public X12OneWayAgreement withSenderBusinessIdentity(BusinessIdentity senderBusinessIdentity) { - this.senderBusinessIdentity = senderBusinessIdentity; - return this; - } - - /** - * Get the receiverBusinessIdentity value. - * - * @return the receiverBusinessIdentity value - */ - public BusinessIdentity receiverBusinessIdentity() { - return this.receiverBusinessIdentity; - } - - /** - * Set the receiverBusinessIdentity value. - * - * @param receiverBusinessIdentity the receiverBusinessIdentity value to set - * @return the X12OneWayAgreement object itself. - */ - public X12OneWayAgreement withReceiverBusinessIdentity(BusinessIdentity receiverBusinessIdentity) { - this.receiverBusinessIdentity = receiverBusinessIdentity; - return this; - } - - /** - * Get the protocolSettings value. - * - * @return the protocolSettings value - */ - public X12ProtocolSettings protocolSettings() { - return this.protocolSettings; - } - - /** - * Set the protocolSettings value. - * - * @param protocolSettings the protocolSettings value to set - * @return the X12OneWayAgreement object itself. - */ - public X12OneWayAgreement withProtocolSettings(X12ProtocolSettings protocolSettings) { - this.protocolSettings = protocolSettings; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ProcessingSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ProcessingSettings.java deleted file mode 100755 index 11d8daafd90..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ProcessingSettings.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 processing settings. - */ -public class X12ProcessingSettings { - /** - * The value indicating whether to mask security information. - */ - @JsonProperty(value = "maskSecurityInfo", required = true) - private boolean maskSecurityInfo; - - /** - * The value indicating whether to convert numerical type to implied - * decimal. - */ - @JsonProperty(value = "convertImpliedDecimal", required = true) - private boolean convertImpliedDecimal; - - /** - * The value indicating whether to preserve interchange. - */ - @JsonProperty(value = "preserveInterchange", required = true) - private boolean preserveInterchange; - - /** - * The value indicating whether to suspend interchange on error. - */ - @JsonProperty(value = "suspendInterchangeOnError", required = true) - private boolean suspendInterchangeOnError; - - /** - * The value indicating whether to create empty xml tags for trailing - * separators. - */ - @JsonProperty(value = "createEmptyXmlTagsForTrailingSeparators", required = true) - private boolean createEmptyXmlTagsForTrailingSeparators; - - /** - * The value indicating whether to use dot as decimal separator. - */ - @JsonProperty(value = "useDotAsDecimalSeparator", required = true) - private boolean useDotAsDecimalSeparator; - - /** - * Get the maskSecurityInfo value. - * - * @return the maskSecurityInfo value - */ - public boolean maskSecurityInfo() { - return this.maskSecurityInfo; - } - - /** - * Set the maskSecurityInfo value. - * - * @param maskSecurityInfo the maskSecurityInfo value to set - * @return the X12ProcessingSettings object itself. - */ - public X12ProcessingSettings withMaskSecurityInfo(boolean maskSecurityInfo) { - this.maskSecurityInfo = maskSecurityInfo; - return this; - } - - /** - * Get the convertImpliedDecimal value. - * - * @return the convertImpliedDecimal value - */ - public boolean convertImpliedDecimal() { - return this.convertImpliedDecimal; - } - - /** - * Set the convertImpliedDecimal value. - * - * @param convertImpliedDecimal the convertImpliedDecimal value to set - * @return the X12ProcessingSettings object itself. - */ - public X12ProcessingSettings withConvertImpliedDecimal(boolean convertImpliedDecimal) { - this.convertImpliedDecimal = convertImpliedDecimal; - return this; - } - - /** - * Get the preserveInterchange value. - * - * @return the preserveInterchange value - */ - public boolean preserveInterchange() { - return this.preserveInterchange; - } - - /** - * Set the preserveInterchange value. - * - * @param preserveInterchange the preserveInterchange value to set - * @return the X12ProcessingSettings object itself. - */ - public X12ProcessingSettings withPreserveInterchange(boolean preserveInterchange) { - this.preserveInterchange = preserveInterchange; - return this; - } - - /** - * Get the suspendInterchangeOnError value. - * - * @return the suspendInterchangeOnError value - */ - public boolean suspendInterchangeOnError() { - return this.suspendInterchangeOnError; - } - - /** - * Set the suspendInterchangeOnError value. - * - * @param suspendInterchangeOnError the suspendInterchangeOnError value to set - * @return the X12ProcessingSettings object itself. - */ - public X12ProcessingSettings withSuspendInterchangeOnError(boolean suspendInterchangeOnError) { - this.suspendInterchangeOnError = suspendInterchangeOnError; - return this; - } - - /** - * Get the createEmptyXmlTagsForTrailingSeparators value. - * - * @return the createEmptyXmlTagsForTrailingSeparators value - */ - public boolean createEmptyXmlTagsForTrailingSeparators() { - return this.createEmptyXmlTagsForTrailingSeparators; - } - - /** - * Set the createEmptyXmlTagsForTrailingSeparators value. - * - * @param createEmptyXmlTagsForTrailingSeparators the createEmptyXmlTagsForTrailingSeparators value to set - * @return the X12ProcessingSettings object itself. - */ - public X12ProcessingSettings withCreateEmptyXmlTagsForTrailingSeparators(boolean createEmptyXmlTagsForTrailingSeparators) { - this.createEmptyXmlTagsForTrailingSeparators = createEmptyXmlTagsForTrailingSeparators; - return this; - } - - /** - * Get the useDotAsDecimalSeparator value. - * - * @return the useDotAsDecimalSeparator value - */ - public boolean useDotAsDecimalSeparator() { - return this.useDotAsDecimalSeparator; - } - - /** - * Set the useDotAsDecimalSeparator value. - * - * @param useDotAsDecimalSeparator the useDotAsDecimalSeparator value to set - * @return the X12ProcessingSettings object itself. - */ - public X12ProcessingSettings withUseDotAsDecimalSeparator(boolean useDotAsDecimalSeparator) { - this.useDotAsDecimalSeparator = useDotAsDecimalSeparator; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ProtocolSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ProtocolSettings.java deleted file mode 100755 index ee29a629687..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ProtocolSettings.java +++ /dev/null @@ -1,330 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 agreement protocol settings. - */ -public class X12ProtocolSettings { - /** - * The X12 validation settings. - */ - @JsonProperty(value = "validationSettings", required = true) - private X12ValidationSettings validationSettings; - - /** - * The X12 framing settings. - */ - @JsonProperty(value = "framingSettings", required = true) - private X12FramingSettings framingSettings; - - /** - * The X12 envelope settings. - */ - @JsonProperty(value = "envelopeSettings", required = true) - private X12EnvelopeSettings envelopeSettings; - - /** - * The X12 acknowledgment settings. - */ - @JsonProperty(value = "acknowledgementSettings", required = true) - private X12AcknowledgementSettings acknowledgementSettings; - - /** - * The X12 message filter. - */ - @JsonProperty(value = "messageFilter", required = true) - private X12MessageFilter messageFilter; - - /** - * The X12 security settings. - */ - @JsonProperty(value = "securitySettings", required = true) - private X12SecuritySettings securitySettings; - - /** - * The X12 processing settings. - */ - @JsonProperty(value = "processingSettings", required = true) - private X12ProcessingSettings processingSettings; - - /** - * The X12 envelope override settings. - */ - @JsonProperty(value = "envelopeOverrides") - private List envelopeOverrides; - - /** - * The X12 validation override settings. - */ - @JsonProperty(value = "validationOverrides") - private List validationOverrides; - - /** - * The X12 message filter list. - */ - @JsonProperty(value = "messageFilterList") - private List messageFilterList; - - /** - * The X12 schema references. - */ - @JsonProperty(value = "schemaReferences", required = true) - private List schemaReferences; - - /** - * The X12 delimiter override settings. - */ - @JsonProperty(value = "x12DelimiterOverrides") - private List x12DelimiterOverrides; - - /** - * Get the validationSettings value. - * - * @return the validationSettings value - */ - public X12ValidationSettings validationSettings() { - return this.validationSettings; - } - - /** - * Set the validationSettings value. - * - * @param validationSettings the validationSettings value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withValidationSettings(X12ValidationSettings validationSettings) { - this.validationSettings = validationSettings; - return this; - } - - /** - * Get the framingSettings value. - * - * @return the framingSettings value - */ - public X12FramingSettings framingSettings() { - return this.framingSettings; - } - - /** - * Set the framingSettings value. - * - * @param framingSettings the framingSettings value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withFramingSettings(X12FramingSettings framingSettings) { - this.framingSettings = framingSettings; - return this; - } - - /** - * Get the envelopeSettings value. - * - * @return the envelopeSettings value - */ - public X12EnvelopeSettings envelopeSettings() { - return this.envelopeSettings; - } - - /** - * Set the envelopeSettings value. - * - * @param envelopeSettings the envelopeSettings value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withEnvelopeSettings(X12EnvelopeSettings envelopeSettings) { - this.envelopeSettings = envelopeSettings; - return this; - } - - /** - * Get the acknowledgementSettings value. - * - * @return the acknowledgementSettings value - */ - public X12AcknowledgementSettings acknowledgementSettings() { - return this.acknowledgementSettings; - } - - /** - * Set the acknowledgementSettings value. - * - * @param acknowledgementSettings the acknowledgementSettings value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withAcknowledgementSettings(X12AcknowledgementSettings acknowledgementSettings) { - this.acknowledgementSettings = acknowledgementSettings; - return this; - } - - /** - * Get the messageFilter value. - * - * @return the messageFilter value - */ - public X12MessageFilter messageFilter() { - return this.messageFilter; - } - - /** - * Set the messageFilter value. - * - * @param messageFilter the messageFilter value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withMessageFilter(X12MessageFilter messageFilter) { - this.messageFilter = messageFilter; - return this; - } - - /** - * Get the securitySettings value. - * - * @return the securitySettings value - */ - public X12SecuritySettings securitySettings() { - return this.securitySettings; - } - - /** - * Set the securitySettings value. - * - * @param securitySettings the securitySettings value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withSecuritySettings(X12SecuritySettings securitySettings) { - this.securitySettings = securitySettings; - return this; - } - - /** - * Get the processingSettings value. - * - * @return the processingSettings value - */ - public X12ProcessingSettings processingSettings() { - return this.processingSettings; - } - - /** - * Set the processingSettings value. - * - * @param processingSettings the processingSettings value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withProcessingSettings(X12ProcessingSettings processingSettings) { - this.processingSettings = processingSettings; - return this; - } - - /** - * Get the envelopeOverrides value. - * - * @return the envelopeOverrides value - */ - public List envelopeOverrides() { - return this.envelopeOverrides; - } - - /** - * Set the envelopeOverrides value. - * - * @param envelopeOverrides the envelopeOverrides value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withEnvelopeOverrides(List envelopeOverrides) { - this.envelopeOverrides = envelopeOverrides; - return this; - } - - /** - * Get the validationOverrides value. - * - * @return the validationOverrides value - */ - public List validationOverrides() { - return this.validationOverrides; - } - - /** - * Set the validationOverrides value. - * - * @param validationOverrides the validationOverrides value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withValidationOverrides(List validationOverrides) { - this.validationOverrides = validationOverrides; - return this; - } - - /** - * Get the messageFilterList value. - * - * @return the messageFilterList value - */ - public List messageFilterList() { - return this.messageFilterList; - } - - /** - * Set the messageFilterList value. - * - * @param messageFilterList the messageFilterList value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withMessageFilterList(List messageFilterList) { - this.messageFilterList = messageFilterList; - return this; - } - - /** - * Get the schemaReferences value. - * - * @return the schemaReferences value - */ - public List schemaReferences() { - return this.schemaReferences; - } - - /** - * Set the schemaReferences value. - * - * @param schemaReferences the schemaReferences value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withSchemaReferences(List schemaReferences) { - this.schemaReferences = schemaReferences; - return this; - } - - /** - * Get the x12DelimiterOverrides value. - * - * @return the x12DelimiterOverrides value - */ - public List x12DelimiterOverrides() { - return this.x12DelimiterOverrides; - } - - /** - * Set the x12DelimiterOverrides value. - * - * @param x12DelimiterOverrides the x12DelimiterOverrides value to set - * @return the X12ProtocolSettings object itself. - */ - public X12ProtocolSettings withX12DelimiterOverrides(List x12DelimiterOverrides) { - this.x12DelimiterOverrides = x12DelimiterOverrides; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12SchemaReference.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12SchemaReference.java deleted file mode 100755 index 2d8bea72702..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12SchemaReference.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 schema reference. - */ -public class X12SchemaReference { - /** - * The message id. - */ - @JsonProperty(value = "messageId", required = true) - private String messageId; - - /** - * The sender application id. - */ - @JsonProperty(value = "senderApplicationId") - private String senderApplicationId; - - /** - * The schema version. - */ - @JsonProperty(value = "schemaVersion", required = true) - private String schemaVersion; - - /** - * The schema name. - */ - @JsonProperty(value = "schemaName", required = true) - private String schemaName; - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the X12SchemaReference object itself. - */ - public X12SchemaReference withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the senderApplicationId value. - * - * @return the senderApplicationId value - */ - public String senderApplicationId() { - return this.senderApplicationId; - } - - /** - * Set the senderApplicationId value. - * - * @param senderApplicationId the senderApplicationId value to set - * @return the X12SchemaReference object itself. - */ - public X12SchemaReference withSenderApplicationId(String senderApplicationId) { - this.senderApplicationId = senderApplicationId; - return this; - } - - /** - * Get the schemaVersion value. - * - * @return the schemaVersion value - */ - public String schemaVersion() { - return this.schemaVersion; - } - - /** - * Set the schemaVersion value. - * - * @param schemaVersion the schemaVersion value to set - * @return the X12SchemaReference object itself. - */ - public X12SchemaReference withSchemaVersion(String schemaVersion) { - this.schemaVersion = schemaVersion; - return this; - } - - /** - * Get the schemaName value. - * - * @return the schemaName value - */ - public String schemaName() { - return this.schemaName; - } - - /** - * Set the schemaName value. - * - * @param schemaName the schemaName value to set - * @return the X12SchemaReference object itself. - */ - public X12SchemaReference withSchemaName(String schemaName) { - this.schemaName = schemaName; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12SecuritySettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12SecuritySettings.java deleted file mode 100755 index 834120a4d34..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12SecuritySettings.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 agreement security settings. - */ -public class X12SecuritySettings { - /** - * The authorization qualifier. - */ - @JsonProperty(value = "authorizationQualifier", required = true) - private String authorizationQualifier; - - /** - * The authorization value. - */ - @JsonProperty(value = "authorizationValue") - private String authorizationValue; - - /** - * The security qualifier. - */ - @JsonProperty(value = "securityQualifier", required = true) - private String securityQualifier; - - /** - * The password value. - */ - @JsonProperty(value = "passwordValue") - private String passwordValue; - - /** - * Get the authorizationQualifier value. - * - * @return the authorizationQualifier value - */ - public String authorizationQualifier() { - return this.authorizationQualifier; - } - - /** - * Set the authorizationQualifier value. - * - * @param authorizationQualifier the authorizationQualifier value to set - * @return the X12SecuritySettings object itself. - */ - public X12SecuritySettings withAuthorizationQualifier(String authorizationQualifier) { - this.authorizationQualifier = authorizationQualifier; - return this; - } - - /** - * Get the authorizationValue value. - * - * @return the authorizationValue value - */ - public String authorizationValue() { - return this.authorizationValue; - } - - /** - * Set the authorizationValue value. - * - * @param authorizationValue the authorizationValue value to set - * @return the X12SecuritySettings object itself. - */ - public X12SecuritySettings withAuthorizationValue(String authorizationValue) { - this.authorizationValue = authorizationValue; - return this; - } - - /** - * Get the securityQualifier value. - * - * @return the securityQualifier value - */ - public String securityQualifier() { - return this.securityQualifier; - } - - /** - * Set the securityQualifier value. - * - * @param securityQualifier the securityQualifier value to set - * @return the X12SecuritySettings object itself. - */ - public X12SecuritySettings withSecurityQualifier(String securityQualifier) { - this.securityQualifier = securityQualifier; - return this; - } - - /** - * Get the passwordValue value. - * - * @return the passwordValue value - */ - public String passwordValue() { - return this.passwordValue; - } - - /** - * Set the passwordValue value. - * - * @param passwordValue the passwordValue value to set - * @return the X12SecuritySettings object itself. - */ - public X12SecuritySettings withPasswordValue(String passwordValue) { - this.passwordValue = passwordValue; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12TimeFormat.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12TimeFormat.java deleted file mode 100755 index 2bbabf8e592..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12TimeFormat.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for X12TimeFormat. - */ -public enum X12TimeFormat { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value HHMM. */ - HHMM("HHMM"), - - /** Enum value HHMMSS. */ - HHMMSS("HHMMSS"), - - /** Enum value HHMMSSdd. */ - HHMMSSDD("HHMMSSdd"), - - /** Enum value HHMMSSd. */ - HHMMSSD("HHMMSSd"); - - /** The actual serialized value for a X12TimeFormat instance. */ - private String value; - - X12TimeFormat(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a X12TimeFormat instance. - * - * @param value the serialized value to parse. - * @return the parsed X12TimeFormat object, or null if unable to parse. - */ - @JsonCreator - public static X12TimeFormat fromString(String value) { - X12TimeFormat[] items = X12TimeFormat.values(); - for (X12TimeFormat item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ValidationOverride.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ValidationOverride.java deleted file mode 100755 index 9983cfecf82..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ValidationOverride.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 validation override settings. - */ -public class X12ValidationOverride { - /** - * The message id on which the validation settings has to be applied. - */ - @JsonProperty(value = "messageId", required = true) - private String messageId; - - /** - * The value indicating whether to validate EDI types. - */ - @JsonProperty(value = "validateEdiTypes", required = true) - private boolean validateEdiTypes; - - /** - * The value indicating whether to validate XSD types. - */ - @JsonProperty(value = "validateXsdTypes", required = true) - private boolean validateXsdTypes; - - /** - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - */ - @JsonProperty(value = "allowLeadingAndTrailingSpacesAndZeroes", required = true) - private boolean allowLeadingAndTrailingSpacesAndZeroes; - - /** - * The value indicating whether to validate character Set. - */ - @JsonProperty(value = "validateCharacterSet", required = true) - private boolean validateCharacterSet; - - /** - * The value indicating whether to trim leading and trailing spaces and - * zeroes. - */ - @JsonProperty(value = "trimLeadingAndTrailingSpacesAndZeroes", required = true) - private boolean trimLeadingAndTrailingSpacesAndZeroes; - - /** - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory'. - */ - @JsonProperty(value = "trailingSeparatorPolicy", required = true) - private TrailingSeparatorPolicy trailingSeparatorPolicy; - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the X12ValidationOverride object itself. - */ - public X12ValidationOverride withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the validateEdiTypes value. - * - * @return the validateEdiTypes value - */ - public boolean validateEdiTypes() { - return this.validateEdiTypes; - } - - /** - * Set the validateEdiTypes value. - * - * @param validateEdiTypes the validateEdiTypes value to set - * @return the X12ValidationOverride object itself. - */ - public X12ValidationOverride withValidateEdiTypes(boolean validateEdiTypes) { - this.validateEdiTypes = validateEdiTypes; - return this; - } - - /** - * Get the validateXsdTypes value. - * - * @return the validateXsdTypes value - */ - public boolean validateXsdTypes() { - return this.validateXsdTypes; - } - - /** - * Set the validateXsdTypes value. - * - * @param validateXsdTypes the validateXsdTypes value to set - * @return the X12ValidationOverride object itself. - */ - public X12ValidationOverride withValidateXsdTypes(boolean validateXsdTypes) { - this.validateXsdTypes = validateXsdTypes; - return this; - } - - /** - * Get the allowLeadingAndTrailingSpacesAndZeroes value. - * - * @return the allowLeadingAndTrailingSpacesAndZeroes value - */ - public boolean allowLeadingAndTrailingSpacesAndZeroes() { - return this.allowLeadingAndTrailingSpacesAndZeroes; - } - - /** - * Set the allowLeadingAndTrailingSpacesAndZeroes value. - * - * @param allowLeadingAndTrailingSpacesAndZeroes the allowLeadingAndTrailingSpacesAndZeroes value to set - * @return the X12ValidationOverride object itself. - */ - public X12ValidationOverride withAllowLeadingAndTrailingSpacesAndZeroes(boolean allowLeadingAndTrailingSpacesAndZeroes) { - this.allowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes; - return this; - } - - /** - * Get the validateCharacterSet value. - * - * @return the validateCharacterSet value - */ - public boolean validateCharacterSet() { - return this.validateCharacterSet; - } - - /** - * Set the validateCharacterSet value. - * - * @param validateCharacterSet the validateCharacterSet value to set - * @return the X12ValidationOverride object itself. - */ - public X12ValidationOverride withValidateCharacterSet(boolean validateCharacterSet) { - this.validateCharacterSet = validateCharacterSet; - return this; - } - - /** - * Get the trimLeadingAndTrailingSpacesAndZeroes value. - * - * @return the trimLeadingAndTrailingSpacesAndZeroes value - */ - public boolean trimLeadingAndTrailingSpacesAndZeroes() { - return this.trimLeadingAndTrailingSpacesAndZeroes; - } - - /** - * Set the trimLeadingAndTrailingSpacesAndZeroes value. - * - * @param trimLeadingAndTrailingSpacesAndZeroes the trimLeadingAndTrailingSpacesAndZeroes value to set - * @return the X12ValidationOverride object itself. - */ - public X12ValidationOverride withTrimLeadingAndTrailingSpacesAndZeroes(boolean trimLeadingAndTrailingSpacesAndZeroes) { - this.trimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes; - return this; - } - - /** - * Get the trailingSeparatorPolicy value. - * - * @return the trailingSeparatorPolicy value - */ - public TrailingSeparatorPolicy trailingSeparatorPolicy() { - return this.trailingSeparatorPolicy; - } - - /** - * Set the trailingSeparatorPolicy value. - * - * @param trailingSeparatorPolicy the trailingSeparatorPolicy value to set - * @return the X12ValidationOverride object itself. - */ - public X12ValidationOverride withTrailingSeparatorPolicy(TrailingSeparatorPolicy trailingSeparatorPolicy) { - this.trailingSeparatorPolicy = trailingSeparatorPolicy; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ValidationSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ValidationSettings.java deleted file mode 100755 index 6154b72c0ae..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12ValidationSettings.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The X12 agreement validation settings. - */ -public class X12ValidationSettings { - /** - * The value indicating whether to validate character set in the message. - */ - @JsonProperty(value = "validateCharacterSet", required = true) - private boolean validateCharacterSet; - - /** - * The value indicating whether to check for duplicate interchange control - * number. - */ - @JsonProperty(value = "checkDuplicateInterchangeControlNumber", required = true) - private boolean checkDuplicateInterchangeControlNumber; - - /** - * The validity period of interchange control number. - */ - @JsonProperty(value = "interchangeControlNumberValidityDays", required = true) - private int interchangeControlNumberValidityDays; - - /** - * The value indicating whether to check for duplicate group control - * number. - */ - @JsonProperty(value = "checkDuplicateGroupControlNumber", required = true) - private boolean checkDuplicateGroupControlNumber; - - /** - * The value indicating whether to check for duplicate transaction set - * control number. - */ - @JsonProperty(value = "checkDuplicateTransactionSetControlNumber", required = true) - private boolean checkDuplicateTransactionSetControlNumber; - - /** - * The value indicating whether to Whether to validate EDI types. - */ - @JsonProperty(value = "validateEdiTypes", required = true) - private boolean validateEdiTypes; - - /** - * The value indicating whether to Whether to validate XSD types. - */ - @JsonProperty(value = "validateXsdTypes", required = true) - private boolean validateXsdTypes; - - /** - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - */ - @JsonProperty(value = "allowLeadingAndTrailingSpacesAndZeroes", required = true) - private boolean allowLeadingAndTrailingSpacesAndZeroes; - - /** - * The value indicating whether to trim leading and trailing spaces and - * zeroes. - */ - @JsonProperty(value = "trimLeadingAndTrailingSpacesAndZeroes", required = true) - private boolean trimLeadingAndTrailingSpacesAndZeroes; - - /** - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory'. - */ - @JsonProperty(value = "trailingSeparatorPolicy", required = true) - private TrailingSeparatorPolicy trailingSeparatorPolicy; - - /** - * Get the validateCharacterSet value. - * - * @return the validateCharacterSet value - */ - public boolean validateCharacterSet() { - return this.validateCharacterSet; - } - - /** - * Set the validateCharacterSet value. - * - * @param validateCharacterSet the validateCharacterSet value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withValidateCharacterSet(boolean validateCharacterSet) { - this.validateCharacterSet = validateCharacterSet; - return this; - } - - /** - * Get the checkDuplicateInterchangeControlNumber value. - * - * @return the checkDuplicateInterchangeControlNumber value - */ - public boolean checkDuplicateInterchangeControlNumber() { - return this.checkDuplicateInterchangeControlNumber; - } - - /** - * Set the checkDuplicateInterchangeControlNumber value. - * - * @param checkDuplicateInterchangeControlNumber the checkDuplicateInterchangeControlNumber value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withCheckDuplicateInterchangeControlNumber(boolean checkDuplicateInterchangeControlNumber) { - this.checkDuplicateInterchangeControlNumber = checkDuplicateInterchangeControlNumber; - return this; - } - - /** - * Get the interchangeControlNumberValidityDays value. - * - * @return the interchangeControlNumberValidityDays value - */ - public int interchangeControlNumberValidityDays() { - return this.interchangeControlNumberValidityDays; - } - - /** - * Set the interchangeControlNumberValidityDays value. - * - * @param interchangeControlNumberValidityDays the interchangeControlNumberValidityDays value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withInterchangeControlNumberValidityDays(int interchangeControlNumberValidityDays) { - this.interchangeControlNumberValidityDays = interchangeControlNumberValidityDays; - return this; - } - - /** - * Get the checkDuplicateGroupControlNumber value. - * - * @return the checkDuplicateGroupControlNumber value - */ - public boolean checkDuplicateGroupControlNumber() { - return this.checkDuplicateGroupControlNumber; - } - - /** - * Set the checkDuplicateGroupControlNumber value. - * - * @param checkDuplicateGroupControlNumber the checkDuplicateGroupControlNumber value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withCheckDuplicateGroupControlNumber(boolean checkDuplicateGroupControlNumber) { - this.checkDuplicateGroupControlNumber = checkDuplicateGroupControlNumber; - return this; - } - - /** - * Get the checkDuplicateTransactionSetControlNumber value. - * - * @return the checkDuplicateTransactionSetControlNumber value - */ - public boolean checkDuplicateTransactionSetControlNumber() { - return this.checkDuplicateTransactionSetControlNumber; - } - - /** - * Set the checkDuplicateTransactionSetControlNumber value. - * - * @param checkDuplicateTransactionSetControlNumber the checkDuplicateTransactionSetControlNumber value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withCheckDuplicateTransactionSetControlNumber(boolean checkDuplicateTransactionSetControlNumber) { - this.checkDuplicateTransactionSetControlNumber = checkDuplicateTransactionSetControlNumber; - return this; - } - - /** - * Get the validateEdiTypes value. - * - * @return the validateEdiTypes value - */ - public boolean validateEdiTypes() { - return this.validateEdiTypes; - } - - /** - * Set the validateEdiTypes value. - * - * @param validateEdiTypes the validateEdiTypes value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withValidateEdiTypes(boolean validateEdiTypes) { - this.validateEdiTypes = validateEdiTypes; - return this; - } - - /** - * Get the validateXsdTypes value. - * - * @return the validateXsdTypes value - */ - public boolean validateXsdTypes() { - return this.validateXsdTypes; - } - - /** - * Set the validateXsdTypes value. - * - * @param validateXsdTypes the validateXsdTypes value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withValidateXsdTypes(boolean validateXsdTypes) { - this.validateXsdTypes = validateXsdTypes; - return this; - } - - /** - * Get the allowLeadingAndTrailingSpacesAndZeroes value. - * - * @return the allowLeadingAndTrailingSpacesAndZeroes value - */ - public boolean allowLeadingAndTrailingSpacesAndZeroes() { - return this.allowLeadingAndTrailingSpacesAndZeroes; - } - - /** - * Set the allowLeadingAndTrailingSpacesAndZeroes value. - * - * @param allowLeadingAndTrailingSpacesAndZeroes the allowLeadingAndTrailingSpacesAndZeroes value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withAllowLeadingAndTrailingSpacesAndZeroes(boolean allowLeadingAndTrailingSpacesAndZeroes) { - this.allowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes; - return this; - } - - /** - * Get the trimLeadingAndTrailingSpacesAndZeroes value. - * - * @return the trimLeadingAndTrailingSpacesAndZeroes value - */ - public boolean trimLeadingAndTrailingSpacesAndZeroes() { - return this.trimLeadingAndTrailingSpacesAndZeroes; - } - - /** - * Set the trimLeadingAndTrailingSpacesAndZeroes value. - * - * @param trimLeadingAndTrailingSpacesAndZeroes the trimLeadingAndTrailingSpacesAndZeroes value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withTrimLeadingAndTrailingSpacesAndZeroes(boolean trimLeadingAndTrailingSpacesAndZeroes) { - this.trimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes; - return this; - } - - /** - * Get the trailingSeparatorPolicy value. - * - * @return the trailingSeparatorPolicy value - */ - public TrailingSeparatorPolicy trailingSeparatorPolicy() { - return this.trailingSeparatorPolicy; - } - - /** - * Set the trailingSeparatorPolicy value. - * - * @param trailingSeparatorPolicy the trailingSeparatorPolicy value to set - * @return the X12ValidationSettings object itself. - */ - public X12ValidationSettings withTrailingSeparatorPolicy(TrailingSeparatorPolicy trailingSeparatorPolicy) { - this.trailingSeparatorPolicy = trailingSeparatorPolicy; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java deleted file mode 100755 index 65862e62045..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java +++ /dev/null @@ -1,736 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Agreements. - */ -public class AgreementsInner { - /** The Retrofit service to perform REST calls. */ - private AgreementsService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of AgreementsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public AgreementsInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(AgreementsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Agreements to be - * used by Retrofit to perform actually REST calls. - */ - interface AgreementsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Agreements listByIntegrationAccounts" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements") - Observable> listByIntegrationAccounts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Agreements get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("agreementName") String agreementName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Agreements createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("agreementName") String agreementName, @Query("api-version") String apiVersion, @Body IntegrationAccountAgreementInner agreement, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Agreements delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("agreementName") String agreementName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Agreements listByIntegrationAccountsNext" }) - @GET - Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountAgreementInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountAgreementInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountAgreementInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountAgreementInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountAgreementInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountAgreementInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account agreements. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountAgreementInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account agreements. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountAgreementInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountAgreementInner object if successful. - */ - public IntegrationAccountAgreementInner get(String resourceGroupName, String integrationAccountName, String agreementName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName).toBlocking().single().body(); - } - - /** - * Gets an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String integrationAccountName, String agreementName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName), serviceCallback); - } - - /** - * Gets an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountAgreementInner object - */ - public Observable getAsync(String resourceGroupName, String integrationAccountName, String agreementName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName).map(new Func1, IntegrationAccountAgreementInner>() { - @Override - public IntegrationAccountAgreementInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountAgreementInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String agreementName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (agreementName == null) { - throw new IllegalArgumentException("Parameter agreementName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, integrationAccountName, agreementName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @param agreement The integration account agreement. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountAgreementInner object if successful. - */ - public IntegrationAccountAgreementInner createOrUpdate(String resourceGroupName, String integrationAccountName, String agreementName, IntegrationAccountAgreementInner agreement) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName, agreement).toBlocking().single().body(); - } - - /** - * Creates or updates an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @param agreement The integration account agreement. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String agreementName, IntegrationAccountAgreementInner agreement, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName, agreement), serviceCallback); - } - - /** - * Creates or updates an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @param agreement The integration account agreement. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountAgreementInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String agreementName, IntegrationAccountAgreementInner agreement) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName, agreement).map(new Func1, IntegrationAccountAgreementInner>() { - @Override - public IntegrationAccountAgreementInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @param agreement The integration account agreement. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountAgreementInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String agreementName, IntegrationAccountAgreementInner agreement) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (agreementName == null) { - throw new IllegalArgumentException("Parameter agreementName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (agreement == null) { - throw new IllegalArgumentException("Parameter agreement is required and cannot be null."); - } - Validator.validate(agreement); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, agreementName, this.client.apiVersion(), agreement, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String integrationAccountName, String agreementName) { - deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName).toBlocking().single().body(); - } - - /** - * Deletes an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String integrationAccountName, String agreementName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName), serviceCallback); - } - - /** - * Deletes an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String integrationAccountName, String agreementName) { - return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an integration account agreement. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param agreementName The integration account agreement name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String agreementName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (agreementName == null) { - throw new IllegalArgumentException("Parameter agreementName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, integrationAccountName, agreementName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of integration account agreements. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountAgreementInner> object if successful. - */ - public PagedList listByIntegrationAccountsNext(final String nextPageLink) { - ServiceResponse> response = listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account agreements. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account agreements. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountAgreementInner> object - */ - public Observable> listByIntegrationAccountsNextAsync(final String nextPageLink) { - return listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account agreements. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountAgreementInner> object - */ - public Observable>> listByIntegrationAccountsNextWithServiceResponseAsync(final String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account agreements. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountAgreementInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByIntegrationAccountsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/CallbackUrlInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/CallbackUrlInner.java deleted file mode 100755 index 08da1650f3e..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/CallbackUrlInner.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The callback url. - */ -public class CallbackUrlInner { - /** - * The URL value. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the CallbackUrlInner object itself. - */ - public CallbackUrlInner withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/CertificatesInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/CertificatesInner.java deleted file mode 100755 index b360ec7fa09..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/CertificatesInner.java +++ /dev/null @@ -1,730 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Certificates. - */ -public class CertificatesInner { - /** The Retrofit service to perform REST calls. */ - private CertificatesService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of CertificatesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public CertificatesInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(CertificatesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Certificates to be - * used by Retrofit to perform actually REST calls. - */ - interface CertificatesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Certificates listByIntegrationAccounts" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates") - Observable> listByIntegrationAccounts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Certificates get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Certificates createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Body IntegrationAccountCertificateInner certificate, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Certificates delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Certificates listByIntegrationAccountsNext" }) - @GET - Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountCertificateInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountCertificateInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountCertificateInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountCertificateInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountCertificateInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName, final Integer top) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountCertificateInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account certificates. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountCertificateInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final Integer top) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account certificates. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - ServiceResponse> * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountCertificateInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName, final Integer top) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountCertificateInner object if successful. - */ - public IntegrationAccountCertificateInner get(String resourceGroupName, String integrationAccountName, String certificateName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName).toBlocking().single().body(); - } - - /** - * Gets an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String integrationAccountName, String certificateName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName), serviceCallback); - } - - /** - * Gets an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountCertificateInner object - */ - public Observable getAsync(String resourceGroupName, String integrationAccountName, String certificateName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName).map(new Func1, IntegrationAccountCertificateInner>() { - @Override - public IntegrationAccountCertificateInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountCertificateInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String certificateName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (certificateName == null) { - throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, integrationAccountName, certificateName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @param certificate The integration account certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountCertificateInner object if successful. - */ - public IntegrationAccountCertificateInner createOrUpdate(String resourceGroupName, String integrationAccountName, String certificateName, IntegrationAccountCertificateInner certificate) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName, certificate).toBlocking().single().body(); - } - - /** - * Creates or updates an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @param certificate The integration account certificate. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String certificateName, IntegrationAccountCertificateInner certificate, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName, certificate), serviceCallback); - } - - /** - * Creates or updates an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @param certificate The integration account certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountCertificateInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String certificateName, IntegrationAccountCertificateInner certificate) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName, certificate).map(new Func1, IntegrationAccountCertificateInner>() { - @Override - public IntegrationAccountCertificateInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @param certificate The integration account certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountCertificateInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String certificateName, IntegrationAccountCertificateInner certificate) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (certificateName == null) { - throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (certificate == null) { - throw new IllegalArgumentException("Parameter certificate is required and cannot be null."); - } - Validator.validate(certificate); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, certificateName, this.client.apiVersion(), certificate, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String integrationAccountName, String certificateName) { - deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName).toBlocking().single().body(); - } - - /** - * Deletes an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String integrationAccountName, String certificateName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName), serviceCallback); - } - - /** - * Deletes an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String integrationAccountName, String certificateName) { - return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an integration account certificate. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param certificateName The integration account certificate name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String certificateName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (certificateName == null) { - throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, integrationAccountName, certificateName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of integration account certificates. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountCertificateInner> object if successful. - */ - public PagedList listByIntegrationAccountsNext(final String nextPageLink) { - ServiceResponse> response = listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account certificates. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account certificates. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountCertificateInner> object - */ - public Observable> listByIntegrationAccountsNextAsync(final String nextPageLink) { - return listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account certificates. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountCertificateInner> object - */ - public Observable>> listByIntegrationAccountsNextWithServiceResponseAsync(final String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account certificates. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountCertificateInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByIntegrationAccountsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/GetCallbackUrlParametersInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/GetCallbackUrlParametersInner.java deleted file mode 100755 index d16c56b2bf5..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/GetCallbackUrlParametersInner.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.KeyType; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The callback url parameters. - */ -public class GetCallbackUrlParametersInner { - /** - * The expiry time. - */ - @JsonProperty(value = "notAfter") - private DateTime notAfter; - - /** - * The key type. Possible values include: 'NotSpecified', 'Primary', - * 'Secondary'. - */ - @JsonProperty(value = "keyType") - private KeyType keyType; - - /** - * Get the notAfter value. - * - * @return the notAfter value - */ - public DateTime notAfter() { - return this.notAfter; - } - - /** - * Set the notAfter value. - * - * @param notAfter the notAfter value to set - * @return the GetCallbackUrlParametersInner object itself. - */ - public GetCallbackUrlParametersInner withNotAfter(DateTime notAfter) { - this.notAfter = notAfter; - return this; - } - - /** - * Get the keyType value. - * - * @return the keyType value - */ - public KeyType keyType() { - return this.keyType; - } - - /** - * Set the keyType value. - * - * @param keyType the keyType value to set - * @return the GetCallbackUrlParametersInner object itself. - */ - public GetCallbackUrlParametersInner withKeyType(KeyType keyType) { - this.keyType = keyType; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAgreementInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAgreementInner.java deleted file mode 100755 index 736db779c7b..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAgreementInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.AgreementType; -import com.microsoft.azure.management.logic.BusinessIdentity; -import com.microsoft.azure.management.logic.AgreementContent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The integration account agreement. - */ -@JsonFlatten -public class IntegrationAccountAgreementInner extends Resource { - /** - * The created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * The changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * The metadata. - */ - @JsonProperty(value = "properties.metadata") - private Object metadata; - - /** - * The agreement type. Possible values include: 'NotSpecified', 'AS2', - * 'X12', 'Edifact'. - */ - @JsonProperty(value = "properties.agreementType", required = true) - private AgreementType agreementType; - - /** - * The integration account partner that is set as host partner for this - * agreement. - */ - @JsonProperty(value = "properties.hostPartner", required = true) - private String hostPartner; - - /** - * The integration account partner that is set as guest partner for this - * agreement. - */ - @JsonProperty(value = "properties.guestPartner", required = true) - private String guestPartner; - - /** - * The business identity of the host partner. - */ - @JsonProperty(value = "properties.hostIdentity", required = true) - private BusinessIdentity hostIdentity; - - /** - * The business identity of the guest partner. - */ - @JsonProperty(value = "properties.guestIdentity", required = true) - private BusinessIdentity guestIdentity; - - /** - * The agreement content. - */ - @JsonProperty(value = "properties.content", required = true) - private AgreementContent content; - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public Object metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the IntegrationAccountAgreementInner object itself. - */ - public IntegrationAccountAgreementInner withMetadata(Object metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the agreementType value. - * - * @return the agreementType value - */ - public AgreementType agreementType() { - return this.agreementType; - } - - /** - * Set the agreementType value. - * - * @param agreementType the agreementType value to set - * @return the IntegrationAccountAgreementInner object itself. - */ - public IntegrationAccountAgreementInner withAgreementType(AgreementType agreementType) { - this.agreementType = agreementType; - return this; - } - - /** - * Get the hostPartner value. - * - * @return the hostPartner value - */ - public String hostPartner() { - return this.hostPartner; - } - - /** - * Set the hostPartner value. - * - * @param hostPartner the hostPartner value to set - * @return the IntegrationAccountAgreementInner object itself. - */ - public IntegrationAccountAgreementInner withHostPartner(String hostPartner) { - this.hostPartner = hostPartner; - return this; - } - - /** - * Get the guestPartner value. - * - * @return the guestPartner value - */ - public String guestPartner() { - return this.guestPartner; - } - - /** - * Set the guestPartner value. - * - * @param guestPartner the guestPartner value to set - * @return the IntegrationAccountAgreementInner object itself. - */ - public IntegrationAccountAgreementInner withGuestPartner(String guestPartner) { - this.guestPartner = guestPartner; - return this; - } - - /** - * Get the hostIdentity value. - * - * @return the hostIdentity value - */ - public BusinessIdentity hostIdentity() { - return this.hostIdentity; - } - - /** - * Set the hostIdentity value. - * - * @param hostIdentity the hostIdentity value to set - * @return the IntegrationAccountAgreementInner object itself. - */ - public IntegrationAccountAgreementInner withHostIdentity(BusinessIdentity hostIdentity) { - this.hostIdentity = hostIdentity; - return this; - } - - /** - * Get the guestIdentity value. - * - * @return the guestIdentity value - */ - public BusinessIdentity guestIdentity() { - return this.guestIdentity; - } - - /** - * Set the guestIdentity value. - * - * @param guestIdentity the guestIdentity value to set - * @return the IntegrationAccountAgreementInner object itself. - */ - public IntegrationAccountAgreementInner withGuestIdentity(BusinessIdentity guestIdentity) { - this.guestIdentity = guestIdentity; - return this; - } - - /** - * Get the content value. - * - * @return the content value - */ - public AgreementContent content() { - return this.content; - } - - /** - * Set the content value. - * - * @param content the content value to set - * @return the IntegrationAccountAgreementInner object itself. - */ - public IntegrationAccountAgreementInner withContent(AgreementContent content) { - this.content = content; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountCertificateInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountCertificateInner.java deleted file mode 100755 index 253011bfb85..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountCertificateInner.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.KeyVaultKeyReference; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The integration account certificate. - */ -@JsonFlatten -public class IntegrationAccountCertificateInner extends Resource { - /** - * The created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * The changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * The metadata. - */ - @JsonProperty(value = "properties.metadata") - private Object metadata; - - /** - * The key details in the key vault. - */ - @JsonProperty(value = "properties.key") - private KeyVaultKeyReference key; - - /** - * The public certificate. - */ - @JsonProperty(value = "properties.publicCertificate") - private String publicCertificate; - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public Object metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the IntegrationAccountCertificateInner object itself. - */ - public IntegrationAccountCertificateInner withMetadata(Object metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the key value. - * - * @return the key value - */ - public KeyVaultKeyReference key() { - return this.key; - } - - /** - * Set the key value. - * - * @param key the key value to set - * @return the IntegrationAccountCertificateInner object itself. - */ - public IntegrationAccountCertificateInner withKey(KeyVaultKeyReference key) { - this.key = key; - return this; - } - - /** - * Get the publicCertificate value. - * - * @return the publicCertificate value - */ - public String publicCertificate() { - return this.publicCertificate; - } - - /** - * Set the publicCertificate value. - * - * @param publicCertificate the publicCertificate value to set - * @return the IntegrationAccountCertificateInner object itself. - */ - public IntegrationAccountCertificateInner withPublicCertificate(String publicCertificate) { - this.publicCertificate = publicCertificate; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountInner.java deleted file mode 100755 index 54b4274d16b..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountInner.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.logic.IntegrationAccountSku; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; - -/** - * The integration account. - */ -public class IntegrationAccountInner extends Resource { - /** - * The integration account properties. - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * The sku. - */ - @JsonProperty(value = "sku") - private IntegrationAccountSku sku; - - /** - * Get the properties value. - * - * @return the properties value - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the IntegrationAccountInner object itself. - */ - public IntegrationAccountInner withProperties(Object properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public IntegrationAccountSku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the IntegrationAccountInner object itself. - */ - public IntegrationAccountInner withSku(IntegrationAccountSku sku) { - this.sku = sku; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountMapInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountMapInner.java deleted file mode 100755 index bde4898504a..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountMapInner.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.logic.MapType; -import com.microsoft.azure.management.logic.IntegrationAccountMapPropertiesParametersSchema; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.ContentLink; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The integration account map. - */ -@JsonFlatten -public class IntegrationAccountMapInner extends Resource { - /** - * The map type. Possible values include: 'NotSpecified', 'Xslt'. - */ - @JsonProperty(value = "properties.mapType", required = true) - private MapType mapType; - - /** - * The parameters schema of integration account map. - */ - @JsonProperty(value = "properties.parametersSchema") - private IntegrationAccountMapPropertiesParametersSchema parametersSchema; - - /** - * The created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * The changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * The content. - */ - @JsonProperty(value = "properties.content") - private String content; - - /** - * The content type. - */ - @JsonProperty(value = "properties.contentType") - private String contentType; - - /** - * The content link. - */ - @JsonProperty(value = "properties.contentLink", access = JsonProperty.Access.WRITE_ONLY) - private ContentLink contentLink; - - /** - * The metadata. - */ - @JsonProperty(value = "properties.metadata") - private Object metadata; - - /** - * Get the mapType value. - * - * @return the mapType value - */ - public MapType mapType() { - return this.mapType; - } - - /** - * Set the mapType value. - * - * @param mapType the mapType value to set - * @return the IntegrationAccountMapInner object itself. - */ - public IntegrationAccountMapInner withMapType(MapType mapType) { - this.mapType = mapType; - return this; - } - - /** - * Get the parametersSchema value. - * - * @return the parametersSchema value - */ - public IntegrationAccountMapPropertiesParametersSchema parametersSchema() { - return this.parametersSchema; - } - - /** - * Set the parametersSchema value. - * - * @param parametersSchema the parametersSchema value to set - * @return the IntegrationAccountMapInner object itself. - */ - public IntegrationAccountMapInner withParametersSchema(IntegrationAccountMapPropertiesParametersSchema parametersSchema) { - this.parametersSchema = parametersSchema; - return this; - } - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the content value. - * - * @return the content value - */ - public String content() { - return this.content; - } - - /** - * Set the content value. - * - * @param content the content value to set - * @return the IntegrationAccountMapInner object itself. - */ - public IntegrationAccountMapInner withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the contentType value. - * - * @return the contentType value - */ - public String contentType() { - return this.contentType; - } - - /** - * Set the contentType value. - * - * @param contentType the contentType value to set - * @return the IntegrationAccountMapInner object itself. - */ - public IntegrationAccountMapInner withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the contentLink value. - * - * @return the contentLink value - */ - public ContentLink contentLink() { - return this.contentLink; - } - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public Object metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the IntegrationAccountMapInner object itself. - */ - public IntegrationAccountMapInner withMetadata(Object metadata) { - this.metadata = metadata; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountPartnerInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountPartnerInner.java deleted file mode 100755 index 4fcb62051bd..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountPartnerInner.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.logic.PartnerType; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.PartnerContent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The integration account partner. - */ -@JsonFlatten -public class IntegrationAccountPartnerInner extends Resource { - /** - * The partner type. Possible values include: 'NotSpecified', 'B2B'. - */ - @JsonProperty(value = "properties.partnerType", required = true) - private PartnerType partnerType; - - /** - * The created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * The changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * The metadata. - */ - @JsonProperty(value = "properties.metadata") - private Object metadata; - - /** - * The partner content. - */ - @JsonProperty(value = "properties.content", required = true) - private PartnerContent content; - - /** - * Get the partnerType value. - * - * @return the partnerType value - */ - public PartnerType partnerType() { - return this.partnerType; - } - - /** - * Set the partnerType value. - * - * @param partnerType the partnerType value to set - * @return the IntegrationAccountPartnerInner object itself. - */ - public IntegrationAccountPartnerInner withPartnerType(PartnerType partnerType) { - this.partnerType = partnerType; - return this; - } - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public Object metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the IntegrationAccountPartnerInner object itself. - */ - public IntegrationAccountPartnerInner withMetadata(Object metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the content value. - * - * @return the content value - */ - public PartnerContent content() { - return this.content; - } - - /** - * Set the content value. - * - * @param content the content value to set - * @return the IntegrationAccountPartnerInner object itself. - */ - public IntegrationAccountPartnerInner withContent(PartnerContent content) { - this.content = content; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountSchemaInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountSchemaInner.java deleted file mode 100755 index 77957e73d41..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountSchemaInner.java +++ /dev/null @@ -1,250 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.logic.SchemaType; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.ContentLink; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The integration account schema. - */ -@JsonFlatten -public class IntegrationAccountSchemaInner extends Resource { - /** - * The schema type. Possible values include: 'NotSpecified', 'Xml'. - */ - @JsonProperty(value = "properties.schemaType", required = true) - private SchemaType schemaType; - - /** - * The target namespace of the schema. - */ - @JsonProperty(value = "properties.targetNamespace") - private String targetNamespace; - - /** - * The document name. - */ - @JsonProperty(value = "properties.documentName") - private String documentName; - - /** - * The file name. - */ - @JsonProperty(value = "properties.fileName") - private String fileName; - - /** - * The created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * The changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * The metadata. - */ - @JsonProperty(value = "properties.metadata") - private Object metadata; - - /** - * The content. - */ - @JsonProperty(value = "properties.content") - private String content; - - /** - * The content type. - */ - @JsonProperty(value = "properties.contentType") - private String contentType; - - /** - * The content link. - */ - @JsonProperty(value = "properties.contentLink", access = JsonProperty.Access.WRITE_ONLY) - private ContentLink contentLink; - - /** - * Get the schemaType value. - * - * @return the schemaType value - */ - public SchemaType schemaType() { - return this.schemaType; - } - - /** - * Set the schemaType value. - * - * @param schemaType the schemaType value to set - * @return the IntegrationAccountSchemaInner object itself. - */ - public IntegrationAccountSchemaInner withSchemaType(SchemaType schemaType) { - this.schemaType = schemaType; - return this; - } - - /** - * Get the targetNamespace value. - * - * @return the targetNamespace value - */ - public String targetNamespace() { - return this.targetNamespace; - } - - /** - * Set the targetNamespace value. - * - * @param targetNamespace the targetNamespace value to set - * @return the IntegrationAccountSchemaInner object itself. - */ - public IntegrationAccountSchemaInner withTargetNamespace(String targetNamespace) { - this.targetNamespace = targetNamespace; - return this; - } - - /** - * Get the documentName value. - * - * @return the documentName value - */ - public String documentName() { - return this.documentName; - } - - /** - * Set the documentName value. - * - * @param documentName the documentName value to set - * @return the IntegrationAccountSchemaInner object itself. - */ - public IntegrationAccountSchemaInner withDocumentName(String documentName) { - this.documentName = documentName; - return this; - } - - /** - * Get the fileName value. - * - * @return the fileName value - */ - public String fileName() { - return this.fileName; - } - - /** - * Set the fileName value. - * - * @param fileName the fileName value to set - * @return the IntegrationAccountSchemaInner object itself. - */ - public IntegrationAccountSchemaInner withFileName(String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public Object metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the IntegrationAccountSchemaInner object itself. - */ - public IntegrationAccountSchemaInner withMetadata(Object metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the content value. - * - * @return the content value - */ - public String content() { - return this.content; - } - - /** - * Set the content value. - * - * @param content the content value to set - * @return the IntegrationAccountSchemaInner object itself. - */ - public IntegrationAccountSchemaInner withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the contentType value. - * - * @return the contentType value - */ - public String contentType() { - return this.contentType; - } - - /** - * Set the contentType value. - * - * @param contentType the contentType value to set - * @return the IntegrationAccountSchemaInner object itself. - */ - public IntegrationAccountSchemaInner withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the contentLink value. - * - * @return the contentLink value - */ - public ContentLink contentLink() { - return this.contentLink; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountSessionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountSessionInner.java deleted file mode 100755 index b256c3c1bd7..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountSessionInner.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The integration account session. - */ -@JsonFlatten -public class IntegrationAccountSessionInner extends Resource { - /** - * The created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * The changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * The session content. - */ - @JsonProperty(value = "properties.content") - private Object content; - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the content value. - * - * @return the content value - */ - public Object content() { - return this.content; - } - - /** - * Set the content value. - * - * @param content the content value to set - * @return the IntegrationAccountSessionInner object itself. - */ - public IntegrationAccountSessionInner withContent(Object content) { - this.content = content; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java deleted file mode 100755 index 8dccea2e63f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java +++ /dev/null @@ -1,1225 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in IntegrationAccounts. - */ -public class IntegrationAccountsInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private IntegrationAccountsService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of IntegrationAccountsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public IntegrationAccountsInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(IntegrationAccountsService.class); - this.client = client; - } - - /** - * The interface defining all the services for IntegrationAccounts to be - * used by Retrofit to perform actually REST calls. - */ - interface IntegrationAccountsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listBySubscription" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body IntegrationAccountInner integrationAccount, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body IntegrationAccountInner integrationAccount, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts getCallbackUrl" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl") - Observable> getCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listBySubscriptionNext" }) - @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of integration accounts by subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountInner> object if successful. - */ - public PagedList listBySubscription() { - ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync() { - return listBySubscriptionSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountInner> object if successful. - */ - public PagedList listBySubscription(final Integer top) { - ServiceResponse> response = listBySubscriptionSinglePageAsync(top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param top The number of items to be included in the result. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable> listBySubscriptionAsync(final Integer top) { - return listBySubscriptionWithServiceResponseAsync(top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync(final Integer top) { - return listBySubscriptionSinglePageAsync(top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration accounts by subscription. - * - ServiceResponse> * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync(final Integer top) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName, final Integer top) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @param top The number of items to be included in the result. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final Integer top) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param resourceGroupName The resource group name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final Integer top) { - return listByResourceGroupSinglePageAsync(resourceGroupName, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration accounts by resource group. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final Integer top) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountInner object if successful. - */ - public IntegrationAccountInner getByResourceGroup(String resourceGroupName, String integrationAccountName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); - } - - /** - * Gets an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); - } - - /** - * Gets an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String integrationAccountName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1, IntegrationAccountInner>() { - @Override - public IntegrationAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param integrationAccount The integration account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountInner object if successful. - */ - public IntegrationAccountInner createOrUpdate(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, integrationAccount).toBlocking().single().body(); - } - - /** - * Creates or updates an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param integrationAccount The integration account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, integrationAccount), serviceCallback); - } - - /** - * Creates or updates an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param integrationAccount The integration account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, integrationAccount).map(new Func1, IntegrationAccountInner>() { - @Override - public IntegrationAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param integrationAccount The integration account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (integrationAccount == null) { - throw new IllegalArgumentException("Parameter integrationAccount is required and cannot be null."); - } - Validator.validate(integrationAccount); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), integrationAccount, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param integrationAccount The integration account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountInner object if successful. - */ - public IntegrationAccountInner update(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { - return updateWithServiceResponseAsync(resourceGroupName, integrationAccountName, integrationAccount).toBlocking().single().body(); - } - - /** - * Updates an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param integrationAccount The integration account. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, integrationAccountName, integrationAccount), serviceCallback); - } - - /** - * Updates an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param integrationAccount The integration account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountInner object - */ - public Observable updateAsync(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { - return updateWithServiceResponseAsync(resourceGroupName, integrationAccountName, integrationAccount).map(new Func1, IntegrationAccountInner>() { - @Override - public IntegrationAccountInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param integrationAccount The integration account. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (integrationAccount == null) { - throw new IllegalArgumentException("Parameter integrationAccount is required and cannot be null."); - } - Validator.validate(integrationAccount); - return service.update(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), integrationAccount, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String integrationAccountName) { - deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); - } - - /** - * Deletes an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); - } - - /** - * Deletes an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String integrationAccountName) { - return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an integration account. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the integration account callback URL. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param parameters The callback URL parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CallbackUrlInner object if successful. - */ - public CallbackUrlInner getCallbackUrl(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { - return getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).toBlocking().single().body(); - } - - /** - * Gets the integration account callback URL. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param parameters The callback URL parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters), serviceCallback); - } - - /** - * Gets the integration account callback URL. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param parameters The callback URL parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CallbackUrlInner object - */ - public Observable getCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { - return getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).map(new Func1, CallbackUrlInner>() { - @Override - public CallbackUrlInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the integration account callback URL. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param parameters The callback URL parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CallbackUrlInner object - */ - public Observable> getCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - return service.getCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getCallbackUrlDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getCallbackUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountInner> object if successful. - */ - public PagedList listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration accounts by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration accounts by subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration accounts by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration accounts by resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManagementClientImpl.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManagementClientImpl.java deleted file mode 100755 index d1b901bff08..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManagementClientImpl.java +++ /dev/null @@ -1,621 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.logic.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * Initializes a new instance of the LogicManagementClientImpl class. - */ -public class LogicManagementClientImpl extends AzureServiceClient { - /** The Retrofit service to perform REST calls. */ - private LogicManagementClientService service; - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** The subscription id. */ - private String subscriptionId; - - /** - * Gets The subscription id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets The subscription id. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public LogicManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** The API version. */ - private String apiVersion; - - /** - * Gets The API version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public LogicManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public LogicManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public LogicManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The WorkflowsInner object to access its operations. - */ - private WorkflowsInner workflows; - - /** - * Gets the WorkflowsInner object to access its operations. - * @return the WorkflowsInner object. - */ - public WorkflowsInner workflows() { - return this.workflows; - } - - /** - * The WorkflowVersionsInner object to access its operations. - */ - private WorkflowVersionsInner workflowVersions; - - /** - * Gets the WorkflowVersionsInner object to access its operations. - * @return the WorkflowVersionsInner object. - */ - public WorkflowVersionsInner workflowVersions() { - return this.workflowVersions; - } - - /** - * The WorkflowTriggersInner object to access its operations. - */ - private WorkflowTriggersInner workflowTriggers; - - /** - * Gets the WorkflowTriggersInner object to access its operations. - * @return the WorkflowTriggersInner object. - */ - public WorkflowTriggersInner workflowTriggers() { - return this.workflowTriggers; - } - - /** - * The WorkflowTriggerHistoriesInner object to access its operations. - */ - private WorkflowTriggerHistoriesInner workflowTriggerHistories; - - /** - * Gets the WorkflowTriggerHistoriesInner object to access its operations. - * @return the WorkflowTriggerHistoriesInner object. - */ - public WorkflowTriggerHistoriesInner workflowTriggerHistories() { - return this.workflowTriggerHistories; - } - - /** - * The WorkflowRunsInner object to access its operations. - */ - private WorkflowRunsInner workflowRuns; - - /** - * Gets the WorkflowRunsInner object to access its operations. - * @return the WorkflowRunsInner object. - */ - public WorkflowRunsInner workflowRuns() { - return this.workflowRuns; - } - - /** - * The WorkflowRunActionsInner object to access its operations. - */ - private WorkflowRunActionsInner workflowRunActions; - - /** - * Gets the WorkflowRunActionsInner object to access its operations. - * @return the WorkflowRunActionsInner object. - */ - public WorkflowRunActionsInner workflowRunActions() { - return this.workflowRunActions; - } - - /** - * The IntegrationAccountsInner object to access its operations. - */ - private IntegrationAccountsInner integrationAccounts; - - /** - * Gets the IntegrationAccountsInner object to access its operations. - * @return the IntegrationAccountsInner object. - */ - public IntegrationAccountsInner integrationAccounts() { - return this.integrationAccounts; - } - - /** - * The SchemasInner object to access its operations. - */ - private SchemasInner schemas; - - /** - * Gets the SchemasInner object to access its operations. - * @return the SchemasInner object. - */ - public SchemasInner schemas() { - return this.schemas; - } - - /** - * The MapsInner object to access its operations. - */ - private MapsInner maps; - - /** - * Gets the MapsInner object to access its operations. - * @return the MapsInner object. - */ - public MapsInner maps() { - return this.maps; - } - - /** - * The PartnersInner object to access its operations. - */ - private PartnersInner partners; - - /** - * Gets the PartnersInner object to access its operations. - * @return the PartnersInner object. - */ - public PartnersInner partners() { - return this.partners; - } - - /** - * The AgreementsInner object to access its operations. - */ - private AgreementsInner agreements; - - /** - * Gets the AgreementsInner object to access its operations. - * @return the AgreementsInner object. - */ - public AgreementsInner agreements() { - return this.agreements; - } - - /** - * The CertificatesInner object to access its operations. - */ - private CertificatesInner certificates; - - /** - * Gets the CertificatesInner object to access its operations. - * @return the CertificatesInner object. - */ - public CertificatesInner certificates() { - return this.certificates; - } - - /** - * The SessionsInner object to access its operations. - */ - private SessionsInner sessions; - - /** - * Gets the SessionsInner object to access its operations. - * @return the SessionsInner object. - */ - public SessionsInner sessions() { - return this.sessions; - } - - /** - * Initializes an instance of LogicManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public LogicManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of LogicManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public LogicManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of LogicManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public LogicManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2016-06-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.workflows = new WorkflowsInner(restClient().retrofit(), this); - this.workflowVersions = new WorkflowVersionsInner(restClient().retrofit(), this); - this.workflowTriggers = new WorkflowTriggersInner(restClient().retrofit(), this); - this.workflowTriggerHistories = new WorkflowTriggerHistoriesInner(restClient().retrofit(), this); - this.workflowRuns = new WorkflowRunsInner(restClient().retrofit(), this); - this.workflowRunActions = new WorkflowRunActionsInner(restClient().retrofit(), this); - this.integrationAccounts = new IntegrationAccountsInner(restClient().retrofit(), this); - this.schemas = new SchemasInner(restClient().retrofit(), this); - this.maps = new MapsInner(restClient().retrofit(), this); - this.partners = new PartnersInner(restClient().retrofit(), this); - this.agreements = new AgreementsInner(restClient().retrofit(), this); - this.certificates = new CertificatesInner(restClient().retrofit(), this); - this.sessions = new SessionsInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - initializeService(); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "LogicManagementClient", "2016-06-01"); - } - - private void initializeService() { - service = restClient().retrofit().create(LogicManagementClientService.class); - } - - /** - * The interface defining all the services for LogicManagementClient to be - * used by Retrofit to perform actually REST calls. - */ - interface LogicManagementClientService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.LogicManagementClient listOperations" }) - @GET("providers/Microsoft.Logic/operations") - Observable> listOperations(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.LogicManagementClient listOperationsNext" }) - @GET - Observable> listOperationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available Logic REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listOperations() { - ServiceResponse> response = listOperationsSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available Logic REST API operations. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listOperationsAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listOperationsSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listOperationsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available Logic REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listOperationsAsync() { - return listOperationsWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available Logic REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listOperationsWithServiceResponseAsync() { - return listOperationsSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available Logic REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listOperationsSinglePageAsync() { - if (this.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); - } - return service.listOperations(this.apiVersion(), this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listOperationsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listOperationsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all of the available Logic REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listOperationsNext(final String nextPageLink) { - ServiceResponse> response = listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available Logic REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listOperationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listOperationsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listOperationsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available Logic REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listOperationsNextAsync(final String nextPageLink) { - return listOperationsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available Logic REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listOperationsNextWithServiceResponseAsync(final String nextPageLink) { - return listOperationsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available Logic REST API operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listOperationsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listOperationsNext(nextUrl, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listOperationsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listOperationsNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManager.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManager.java deleted file mode 100755 index 0176daf5a3b..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure Logic resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class LogicManager extends Manager { - /** - * Get a Configurable instance that can be used to create LogicManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new LogicManager.ConfigurableImpl(); - } - /** - * Creates an instance of LogicManager that exposes Logic resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the LogicManager - */ - public static LogicManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new LogicManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of LogicManager that exposes Logic resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the LogicManager - */ - public static LogicManager authenticate(RestClient restClient, String subscriptionId) { - return new LogicManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of LogicManager that exposes Logic management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing Logic management API entry points that work across subscriptions - */ - LogicManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public LogicManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return LogicManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private LogicManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new LogicManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java deleted file mode 100755 index df914d042b3..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java +++ /dev/null @@ -1,736 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Maps. - */ -public class MapsInner { - /** The Retrofit service to perform REST calls. */ - private MapsService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of MapsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public MapsInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(MapsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Maps to be - * used by Retrofit to perform actually REST calls. - */ - interface MapsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Maps listByIntegrationAccounts" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps") - Observable> listByIntegrationAccounts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Maps get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("mapName") String mapName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Maps createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("mapName") String mapName, @Query("api-version") String apiVersion, @Body IntegrationAccountMapInner map, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Maps delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("mapName") String mapName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Maps listByIntegrationAccountsNext" }) - @GET - Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountMapInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountMapInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountMapInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountMapInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountMapInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountMapInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account maps. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountMapInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account maps. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountMapInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountMapInner object if successful. - */ - public IntegrationAccountMapInner get(String resourceGroupName, String integrationAccountName, String mapName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName).toBlocking().single().body(); - } - - /** - * Gets an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String integrationAccountName, String mapName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName), serviceCallback); - } - - /** - * Gets an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountMapInner object - */ - public Observable getAsync(String resourceGroupName, String integrationAccountName, String mapName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName).map(new Func1, IntegrationAccountMapInner>() { - @Override - public IntegrationAccountMapInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountMapInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String mapName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (mapName == null) { - throw new IllegalArgumentException("Parameter mapName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, integrationAccountName, mapName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @param map The integration account map. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountMapInner object if successful. - */ - public IntegrationAccountMapInner createOrUpdate(String resourceGroupName, String integrationAccountName, String mapName, IntegrationAccountMapInner map) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, map).toBlocking().single().body(); - } - - /** - * Creates or updates an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @param map The integration account map. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String mapName, IntegrationAccountMapInner map, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, map), serviceCallback); - } - - /** - * Creates or updates an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @param map The integration account map. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountMapInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String mapName, IntegrationAccountMapInner map) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, map).map(new Func1, IntegrationAccountMapInner>() { - @Override - public IntegrationAccountMapInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @param map The integration account map. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountMapInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String mapName, IntegrationAccountMapInner map) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (mapName == null) { - throw new IllegalArgumentException("Parameter mapName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (map == null) { - throw new IllegalArgumentException("Parameter map is required and cannot be null."); - } - Validator.validate(map); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, mapName, this.client.apiVersion(), map, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String integrationAccountName, String mapName) { - deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName).toBlocking().single().body(); - } - - /** - * Deletes an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String integrationAccountName, String mapName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName), serviceCallback); - } - - /** - * Deletes an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String integrationAccountName, String mapName) { - return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an integration account map. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param mapName The integration account map name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String mapName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (mapName == null) { - throw new IllegalArgumentException("Parameter mapName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, integrationAccountName, mapName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of integration account maps. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountMapInner> object if successful. - */ - public PagedList listByIntegrationAccountsNext(final String nextPageLink) { - ServiceResponse> response = listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account maps. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account maps. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountMapInner> object - */ - public Observable> listByIntegrationAccountsNextAsync(final String nextPageLink) { - return listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account maps. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountMapInner> object - */ - public Observable>> listByIntegrationAccountsNextWithServiceResponseAsync(final String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account maps. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountMapInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByIntegrationAccountsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/OperationInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/OperationInner.java deleted file mode 100755 index 4619479b539..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/OperationInner.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.logic.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Logic REST API operation. - */ -public class OperationInner { - /** - * Operation name: {provider}/{resource}/{operation}. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The object that represents the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl.java deleted file mode 100755 index 21732f19427..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PartnersInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PartnersInner.java deleted file mode 100755 index 8ff9eee1662..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PartnersInner.java +++ /dev/null @@ -1,736 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Partners. - */ -public class PartnersInner { - /** The Retrofit service to perform REST calls. */ - private PartnersService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of PartnersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public PartnersInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(PartnersService.class); - this.client = client; - } - - /** - * The interface defining all the services for Partners to be - * used by Retrofit to perform actually REST calls. - */ - interface PartnersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Partners listByIntegrationAccounts" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners") - Observable> listByIntegrationAccounts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Partners get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("partnerName") String partnerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Partners createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("partnerName") String partnerName, @Query("api-version") String apiVersion, @Body IntegrationAccountPartnerInner partner, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Partners delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("partnerName") String partnerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Partners listByIntegrationAccountsNext" }) - @GET - Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountPartnerInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountPartnerInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountPartnerInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountPartnerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountPartnerInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountPartnerInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account partners. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountPartnerInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account partners. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountPartnerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountPartnerInner object if successful. - */ - public IntegrationAccountPartnerInner get(String resourceGroupName, String integrationAccountName, String partnerName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName).toBlocking().single().body(); - } - - /** - * Gets an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String integrationAccountName, String partnerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName), serviceCallback); - } - - /** - * Gets an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountPartnerInner object - */ - public Observable getAsync(String resourceGroupName, String integrationAccountName, String partnerName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName).map(new Func1, IntegrationAccountPartnerInner>() { - @Override - public IntegrationAccountPartnerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountPartnerInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String partnerName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (partnerName == null) { - throw new IllegalArgumentException("Parameter partnerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, integrationAccountName, partnerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @param partner The integration account partner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountPartnerInner object if successful. - */ - public IntegrationAccountPartnerInner createOrUpdate(String resourceGroupName, String integrationAccountName, String partnerName, IntegrationAccountPartnerInner partner) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, partner).toBlocking().single().body(); - } - - /** - * Creates or updates an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @param partner The integration account partner. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String partnerName, IntegrationAccountPartnerInner partner, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, partner), serviceCallback); - } - - /** - * Creates or updates an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @param partner The integration account partner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountPartnerInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String partnerName, IntegrationAccountPartnerInner partner) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, partner).map(new Func1, IntegrationAccountPartnerInner>() { - @Override - public IntegrationAccountPartnerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @param partner The integration account partner. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountPartnerInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String partnerName, IntegrationAccountPartnerInner partner) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (partnerName == null) { - throw new IllegalArgumentException("Parameter partnerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (partner == null) { - throw new IllegalArgumentException("Parameter partner is required and cannot be null."); - } - Validator.validate(partner); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, partnerName, this.client.apiVersion(), partner, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String integrationAccountName, String partnerName) { - deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName).toBlocking().single().body(); - } - - /** - * Deletes an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String integrationAccountName, String partnerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName), serviceCallback); - } - - /** - * Deletes an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String integrationAccountName, String partnerName) { - return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an integration account partner. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param partnerName The integration account partner name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String partnerName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (partnerName == null) { - throw new IllegalArgumentException("Parameter partnerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, integrationAccountName, partnerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of integration account partners. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountPartnerInner> object if successful. - */ - public PagedList listByIntegrationAccountsNext(final String nextPageLink) { - ServiceResponse> response = listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account partners. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account partners. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountPartnerInner> object - */ - public Observable> listByIntegrationAccountsNextAsync(final String nextPageLink) { - return listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account partners. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountPartnerInner> object - */ - public Observable>> listByIntegrationAccountsNextWithServiceResponseAsync(final String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account partners. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountPartnerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByIntegrationAccountsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SchemasInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SchemasInner.java deleted file mode 100755 index cdc237413cb..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SchemasInner.java +++ /dev/null @@ -1,736 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Schemas. - */ -public class SchemasInner { - /** The Retrofit service to perform REST calls. */ - private SchemasService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of SchemasInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public SchemasInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(SchemasService.class); - this.client = client; - } - - /** - * The interface defining all the services for Schemas to be - * used by Retrofit to perform actually REST calls. - */ - interface SchemasService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Schemas listByIntegrationAccounts" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas") - Observable> listByIntegrationAccounts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Schemas get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("schemaName") String schemaName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Schemas createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("schemaName") String schemaName, @Query("api-version") String apiVersion, @Body IntegrationAccountSchemaInner schema, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Schemas delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("schemaName") String schemaName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Schemas listByIntegrationAccountsNext" }) - @GET - Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountSchemaInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSchemaInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSchemaInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountSchemaInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountSchemaInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSchemaInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account schemas. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSchemaInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account schemas. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountSchemaInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountSchemaInner object if successful. - */ - public IntegrationAccountSchemaInner get(String resourceGroupName, String integrationAccountName, String schemaName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName).toBlocking().single().body(); - } - - /** - * Gets an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String integrationAccountName, String schemaName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName), serviceCallback); - } - - /** - * Gets an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountSchemaInner object - */ - public Observable getAsync(String resourceGroupName, String integrationAccountName, String schemaName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName).map(new Func1, IntegrationAccountSchemaInner>() { - @Override - public IntegrationAccountSchemaInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountSchemaInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String schemaName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (schemaName == null) { - throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, integrationAccountName, schemaName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @param schema The integration account schema. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountSchemaInner object if successful. - */ - public IntegrationAccountSchemaInner createOrUpdate(String resourceGroupName, String integrationAccountName, String schemaName, IntegrationAccountSchemaInner schema) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName, schema).toBlocking().single().body(); - } - - /** - * Creates or updates an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @param schema The integration account schema. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String schemaName, IntegrationAccountSchemaInner schema, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName, schema), serviceCallback); - } - - /** - * Creates or updates an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @param schema The integration account schema. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountSchemaInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String schemaName, IntegrationAccountSchemaInner schema) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName, schema).map(new Func1, IntegrationAccountSchemaInner>() { - @Override - public IntegrationAccountSchemaInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @param schema The integration account schema. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountSchemaInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String schemaName, IntegrationAccountSchemaInner schema) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (schemaName == null) { - throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (schema == null) { - throw new IllegalArgumentException("Parameter schema is required and cannot be null."); - } - Validator.validate(schema); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, schemaName, this.client.apiVersion(), schema, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String integrationAccountName, String schemaName) { - deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName).toBlocking().single().body(); - } - - /** - * Deletes an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String integrationAccountName, String schemaName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName), serviceCallback); - } - - /** - * Deletes an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String integrationAccountName, String schemaName) { - return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an integration account schema. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param schemaName The integration account schema name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String schemaName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (schemaName == null) { - throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, integrationAccountName, schemaName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of integration account schemas. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountSchemaInner> object if successful. - */ - public PagedList listByIntegrationAccountsNext(final String nextPageLink) { - ServiceResponse> response = listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account schemas. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account schemas. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSchemaInner> object - */ - public Observable> listByIntegrationAccountsNextAsync(final String nextPageLink) { - return listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account schemas. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSchemaInner> object - */ - public Observable>> listByIntegrationAccountsNextWithServiceResponseAsync(final String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account schemas. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountSchemaInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByIntegrationAccountsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SessionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SessionsInner.java deleted file mode 100755 index 17312b2aba3..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SessionsInner.java +++ /dev/null @@ -1,736 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.logic.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Sessions. - */ -public class SessionsInner { - /** The Retrofit service to perform REST calls. */ - private SessionsService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of SessionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public SessionsInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(SessionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Sessions to be - * used by Retrofit to perform actually REST calls. - */ - interface SessionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Sessions listByIntegrationAccounts" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions") - Observable> listByIntegrationAccounts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Sessions get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("sessionName") String sessionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Sessions createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("sessionName") String sessionName, @Query("api-version") String apiVersion, @Body IntegrationAccountSessionInner session, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Sessions delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("sessionName") String sessionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Sessions listByIntegrationAccountsNext" }) - @GET - Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountSessionInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSessionInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSessionInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountSessionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountSessionInner> object if successful. - */ - public PagedList listByIntegrationAccounts(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - ServiceResponse> response = listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSessionInner> object - */ - public Observable> listByIntegrationAccountsAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsWithServiceResponseAsync(resourceGroupName, integrationAccountName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account sessions. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSessionInner> object - */ - public Observable>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account sessions. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountSessionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsSinglePageAsync(final String resourceGroupName, final String integrationAccountName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByIntegrationAccounts(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountSessionInner object if successful. - */ - public IntegrationAccountSessionInner get(String resourceGroupName, String integrationAccountName, String sessionName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName).toBlocking().single().body(); - } - - /** - * Gets an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String integrationAccountName, String sessionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName), serviceCallback); - } - - /** - * Gets an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountSessionInner object - */ - public Observable getAsync(String resourceGroupName, String integrationAccountName, String sessionName) { - return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName).map(new Func1, IntegrationAccountSessionInner>() { - @Override - public IntegrationAccountSessionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountSessionInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String sessionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (sessionName == null) { - throw new IllegalArgumentException("Parameter sessionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, integrationAccountName, sessionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Creates or updates an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @param session The integration account session. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the IntegrationAccountSessionInner object if successful. - */ - public IntegrationAccountSessionInner createOrUpdate(String resourceGroupName, String integrationAccountName, String sessionName, IntegrationAccountSessionInner session) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName, session).toBlocking().single().body(); - } - - /** - * Creates or updates an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @param session The integration account session. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String sessionName, IntegrationAccountSessionInner session, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName, session), serviceCallback); - } - - /** - * Creates or updates an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @param session The integration account session. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountSessionInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String sessionName, IntegrationAccountSessionInner session) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName, session).map(new Func1, IntegrationAccountSessionInner>() { - @Override - public IntegrationAccountSessionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @param session The integration account session. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IntegrationAccountSessionInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String sessionName, IntegrationAccountSessionInner session) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (sessionName == null) { - throw new IllegalArgumentException("Parameter sessionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (session == null) { - throw new IllegalArgumentException("Parameter session is required and cannot be null."); - } - Validator.validate(session); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, sessionName, this.client.apiVersion(), session, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String integrationAccountName, String sessionName) { - deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName).toBlocking().single().body(); - } - - /** - * Deletes an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String integrationAccountName, String sessionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName), serviceCallback); - } - - /** - * Deletes an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String integrationAccountName, String sessionName) { - return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, sessionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an integration account session. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param sessionName The integration account session name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String sessionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (sessionName == null) { - throw new IllegalArgumentException("Parameter sessionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, integrationAccountName, sessionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets a list of integration account sessions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IntegrationAccountSessionInner> object if successful. - */ - public PagedList listByIntegrationAccountsNext(final String nextPageLink) { - ServiceResponse> response = listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of integration account sessions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByIntegrationAccountsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByIntegrationAccountsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of integration account sessions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSessionInner> object - */ - public Observable> listByIntegrationAccountsNextAsync(final String nextPageLink) { - return listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of integration account sessions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IntegrationAccountSessionInner> object - */ - public Observable>> listByIntegrationAccountsNextWithServiceResponseAsync(final String nextPageLink) { - return listByIntegrationAccountsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of integration account sessions. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IntegrationAccountSessionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByIntegrationAccountsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByIntegrationAccountsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByIntegrationAccountsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByIntegrationAccountsNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowInner.java deleted file mode 100755 index e2411506d1b..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowInner.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.logic.WorkflowProvisioningState; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.WorkflowState; -import com.microsoft.azure.management.logic.Sku; -import com.microsoft.azure.management.logic.ResourceReference; -import java.util.Map; -import com.microsoft.azure.management.logic.WorkflowParameter; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The workflow type. - */ -@JsonFlatten -public class WorkflowInner extends Resource { - /** - * Gets the provisioning state. Possible values include: 'NotSpecified', - * 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', - * 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Moving', 'Updating', - * 'Registering', 'Registered', 'Unregistering', 'Unregistered', - * 'Completed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowProvisioningState provisioningState; - - /** - * Gets the created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * Gets the changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * The state. Possible values include: 'NotSpecified', 'Completed', - * 'Enabled', 'Disabled', 'Deleted', 'Suspended'. - */ - @JsonProperty(value = "properties.state") - private WorkflowState state; - - /** - * Gets the version. - */ - @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /** - * Gets the access endpoint. - */ - @JsonProperty(value = "properties.accessEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String accessEndpoint; - - /** - * The sku. - */ - @JsonProperty(value = "properties.sku") - private Sku sku; - - /** - * The integration account. - */ - @JsonProperty(value = "properties.integrationAccount") - private ResourceReference integrationAccount; - - /** - * The definition. - */ - @JsonProperty(value = "properties.definition") - private Object definition; - - /** - * The parameters. - */ - @JsonProperty(value = "properties.parameters") - private Map parameters; - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public WorkflowProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the state value. - * - * @return the state value - */ - public WorkflowState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the WorkflowInner object itself. - */ - public WorkflowInner withState(WorkflowState state) { - this.state = state; - return this; - } - - /** - * Get the version value. - * - * @return the version value - */ - public String version() { - return this.version; - } - - /** - * Get the accessEndpoint value. - * - * @return the accessEndpoint value - */ - public String accessEndpoint() { - return this.accessEndpoint; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the WorkflowInner object itself. - */ - public WorkflowInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the integrationAccount value. - * - * @return the integrationAccount value - */ - public ResourceReference integrationAccount() { - return this.integrationAccount; - } - - /** - * Set the integrationAccount value. - * - * @param integrationAccount the integrationAccount value to set - * @return the WorkflowInner object itself. - */ - public WorkflowInner withIntegrationAccount(ResourceReference integrationAccount) { - this.integrationAccount = integrationAccount; - return this; - } - - /** - * Get the definition value. - * - * @return the definition value - */ - public Object definition() { - return this.definition; - } - - /** - * Set the definition value. - * - * @param definition the definition value to set - * @return the WorkflowInner object itself. - */ - public WorkflowInner withDefinition(Object definition) { - this.definition = definition; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public Map parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the WorkflowInner object itself. - */ - public WorkflowInner withParameters(Map parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionInner.java deleted file mode 100755 index 3f75bb5b710..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionInner.java +++ /dev/null @@ -1,245 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.WorkflowStatus; -import com.microsoft.azure.management.logic.Correlation; -import com.microsoft.azure.management.logic.ContentLink; -import java.util.List; -import com.microsoft.azure.management.logic.RetryHistory; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; - -/** - * The workflow run action. - */ -@JsonFlatten -public class WorkflowRunActionInner extends SubResource { - /** - * Gets the start time. - */ - @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime startTime; - - /** - * Gets the end time. - */ - @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime endTime; - - /** - * Gets the status. Possible values include: 'NotSpecified', 'Paused', - * 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', - * 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored'. - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowStatus status; - - /** - * Gets the code. - */ - @JsonProperty(value = "properties.code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * Gets the error. - */ - @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY) - private Object error; - - /** - * Gets the tracking id. - */ - @JsonProperty(value = "properties.trackingId", access = JsonProperty.Access.WRITE_ONLY) - private String trackingId; - - /** - * The correlation properties. - */ - @JsonProperty(value = "properties.correlation") - private Correlation correlation; - - /** - * Gets the link to inputs. - */ - @JsonProperty(value = "properties.inputsLink", access = JsonProperty.Access.WRITE_ONLY) - private ContentLink inputsLink; - - /** - * Gets the link to outputs. - */ - @JsonProperty(value = "properties.outputsLink", access = JsonProperty.Access.WRITE_ONLY) - private ContentLink outputsLink; - - /** - * Gets the tracked properties. - */ - @JsonProperty(value = "properties.trackedProperties", access = JsonProperty.Access.WRITE_ONLY) - private Object trackedProperties; - - /** - * Gets the retry histories. - */ - @JsonProperty(value = "properties.retryHistory") - private List retryHistory; - - /** - * Gets the workflow run action name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets the workflow run action type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Get the status value. - * - * @return the status value - */ - public WorkflowStatus status() { - return this.status; - } - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the error value. - * - * @return the error value - */ - public Object error() { - return this.error; - } - - /** - * Get the trackingId value. - * - * @return the trackingId value - */ - public String trackingId() { - return this.trackingId; - } - - /** - * Get the correlation value. - * - * @return the correlation value - */ - public Correlation correlation() { - return this.correlation; - } - - /** - * Set the correlation value. - * - * @param correlation the correlation value to set - * @return the WorkflowRunActionInner object itself. - */ - public WorkflowRunActionInner withCorrelation(Correlation correlation) { - this.correlation = correlation; - return this; - } - - /** - * Get the inputsLink value. - * - * @return the inputsLink value - */ - public ContentLink inputsLink() { - return this.inputsLink; - } - - /** - * Get the outputsLink value. - * - * @return the outputsLink value - */ - public ContentLink outputsLink() { - return this.outputsLink; - } - - /** - * Get the trackedProperties value. - * - * @return the trackedProperties value - */ - public Object trackedProperties() { - return this.trackedProperties; - } - - /** - * Get the retryHistory value. - * - * @return the retryHistory value - */ - public List retryHistory() { - return this.retryHistory; - } - - /** - * Set the retryHistory value. - * - * @param retryHistory the retryHistory value to set - * @return the WorkflowRunActionInner object itself. - */ - public WorkflowRunActionInner withRetryHistory(List retryHistory) { - this.retryHistory = retryHistory; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java deleted file mode 100755 index b52ee9f586f..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java +++ /dev/null @@ -1,552 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WorkflowRunActions. - */ -public class WorkflowRunActionsInner { - /** The Retrofit service to perform REST calls. */ - private WorkflowRunActionsService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of WorkflowRunActionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WorkflowRunActionsInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(WorkflowRunActionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for WorkflowRunActions to be - * used by Retrofit to perform actually REST calls. - */ - interface WorkflowRunActionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActions list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActions get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActions listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowRunActionInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName, final String runName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, runName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final String runName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName, runName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunActionInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName, final String runName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunActionInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName) { - return listSinglePageAsync(resourceGroupName, workflowName, runName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowRunActionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (runName == null) { - throw new IllegalArgumentException("Parameter runName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, runName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowRunActionInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName, final String runName, final Integer top, final String filter) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, runName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final String runName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName, runName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunActionInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName, final String runName, final Integer top, final String filter) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow run actions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunActionInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final Integer top, final String filter) { - return listSinglePageAsync(resourceGroupName, workflowName, runName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow run actions. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param workflowName The workflow name. - ServiceResponse> * @param runName The workflow run name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowRunActionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (runName == null) { - throw new IllegalArgumentException("Parameter runName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, runName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a workflow run action. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param actionName The workflow action name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowRunActionInner object if successful. - */ - public WorkflowRunActionInner get(String resourceGroupName, String workflowName, String runName, String actionName) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); - } - - /** - * Gets a workflow run action. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param actionName The workflow action name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); - } - - /** - * Gets a workflow run action. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param actionName The workflow action name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowRunActionInner object - */ - public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, WorkflowRunActionInner>() { - @Override - public WorkflowRunActionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a workflow run action. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param actionName The workflow action name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowRunActionInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (runName == null) { - throw new IllegalArgumentException("Parameter runName is required and cannot be null."); - } - if (actionName == null) { - throw new IllegalArgumentException("Parameter actionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of workflow run actions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowRunActionInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow run actions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow run actions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunActionInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow run actions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunActionInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow run actions. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowRunActionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunInner.java deleted file mode 100755 index f35f53f0c60..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunInner.java +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.WorkflowStatus; -import com.microsoft.azure.management.logic.Correlation; -import com.microsoft.azure.management.logic.ResourceReference; -import com.microsoft.azure.management.logic.WorkflowRunTrigger; -import java.util.Map; -import com.microsoft.azure.management.logic.WorkflowOutputParameter; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; - -/** - * The workflow run. - */ -@JsonFlatten -public class WorkflowRunInner extends SubResource { - /** - * Gets the start time. - */ - @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime startTime; - - /** - * Gets the end time. - */ - @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime endTime; - - /** - * Gets the status. Possible values include: 'NotSpecified', 'Paused', - * 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', - * 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored'. - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowStatus status; - - /** - * Gets the code. - */ - @JsonProperty(value = "properties.code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * Gets the error. - */ - @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY) - private Object error; - - /** - * Gets the correlation id. - */ - @JsonProperty(value = "properties.correlationId", access = JsonProperty.Access.WRITE_ONLY) - private String correlationId; - - /** - * The run correlation. - */ - @JsonProperty(value = "properties.correlation") - private Correlation correlation; - - /** - * Gets the reference to workflow version. - */ - @JsonProperty(value = "properties.workflow", access = JsonProperty.Access.WRITE_ONLY) - private ResourceReference workflow; - - /** - * Gets the fired trigger. - */ - @JsonProperty(value = "properties.trigger", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowRunTrigger trigger; - - /** - * Gets the outputs. - */ - @JsonProperty(value = "properties.outputs", access = JsonProperty.Access.WRITE_ONLY) - private Map outputs; - - /** - * Gets the response of the flow run. - */ - @JsonProperty(value = "properties.response", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowRunTrigger response; - - /** - * Gets the workflow run name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets the workflow run type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Get the status value. - * - * @return the status value - */ - public WorkflowStatus status() { - return this.status; - } - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the error value. - * - * @return the error value - */ - public Object error() { - return this.error; - } - - /** - * Get the correlationId value. - * - * @return the correlationId value - */ - public String correlationId() { - return this.correlationId; - } - - /** - * Get the correlation value. - * - * @return the correlation value - */ - public Correlation correlation() { - return this.correlation; - } - - /** - * Set the correlation value. - * - * @param correlation the correlation value to set - * @return the WorkflowRunInner object itself. - */ - public WorkflowRunInner withCorrelation(Correlation correlation) { - this.correlation = correlation; - return this; - } - - /** - * Get the workflow value. - * - * @return the workflow value - */ - public ResourceReference workflow() { - return this.workflow; - } - - /** - * Get the trigger value. - * - * @return the trigger value - */ - public WorkflowRunTrigger trigger() { - return this.trigger; - } - - /** - * Get the outputs value. - * - * @return the outputs value - */ - public Map outputs() { - return this.outputs; - } - - /** - * Get the response value. - * - * @return the response value - */ - public WorkflowRunTrigger response() { - return this.response; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunsInner.java deleted file mode 100755 index 4855d92a298..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunsInner.java +++ /dev/null @@ -1,626 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WorkflowRuns. - */ -public class WorkflowRunsInner { - /** The Retrofit service to perform REST calls. */ - private WorkflowRunsService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of WorkflowRunsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WorkflowRunsInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(WorkflowRunsService.class); - this.client = client; - } - - /** - * The interface defining all the services for WorkflowRuns to be - * used by Retrofit to perform actually REST calls. - */ - interface WorkflowRunsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRuns list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRuns get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRuns cancel" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel") - Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRuns listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowRunInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName) { - return listSinglePageAsync(resourceGroupName, workflowName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowRunInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowRunInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow runs. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { - return listSinglePageAsync(resourceGroupName, workflowName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow runs. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param workflowName The workflow name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowRunInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a workflow run. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowRunInner object if successful. - */ - public WorkflowRunInner get(String resourceGroupName, String workflowName, String runName) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, runName).toBlocking().single().body(); - } - - /** - * Gets a workflow run. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String workflowName, String runName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName), serviceCallback); - } - - /** - * Gets a workflow run. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowRunInner object - */ - public Observable getAsync(String resourceGroupName, String workflowName, String runName) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, runName).map(new Func1, WorkflowRunInner>() { - @Override - public WorkflowRunInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a workflow run. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowRunInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (runName == null) { - throw new IllegalArgumentException("Parameter runName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, workflowName, runName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Cancels a workflow run. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void cancel(String resourceGroupName, String workflowName, String runName) { - cancelWithServiceResponseAsync(resourceGroupName, workflowName, runName).toBlocking().single().body(); - } - - /** - * Cancels a workflow run. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture cancelAsync(String resourceGroupName, String workflowName, String runName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(resourceGroupName, workflowName, runName), serviceCallback); - } - - /** - * Cancels a workflow run. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable cancelAsync(String resourceGroupName, String workflowName, String runName) { - return cancelWithServiceResponseAsync(resourceGroupName, workflowName, runName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Cancels a workflow run. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param runName The workflow run name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> cancelWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (runName == null) { - throw new IllegalArgumentException("Parameter runName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.cancel(this.client.subscriptionId(), resourceGroupName, workflowName, runName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = cancelDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse cancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of workflow runs. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowRunInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow runs. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow runs. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow runs. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowRunInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow runs. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowRunInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerCallbackUrlInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerCallbackUrlInner.java deleted file mode 100755 index bd9e62697e0..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerCallbackUrlInner.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import java.util.List; -import com.microsoft.azure.management.logic.WorkflowTriggerListCallbackUrlQueries; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The workflow trigger callback URL. - */ -public class WorkflowTriggerCallbackUrlInner { - /** - * Gets the workflow trigger callback URL. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /** - * Gets the workflow trigger callback URL HTTP method. - */ - @JsonProperty(value = "method", access = JsonProperty.Access.WRITE_ONLY) - private String method; - - /** - * Gets the workflow trigger callback URL base path. - */ - @JsonProperty(value = "basePath", access = JsonProperty.Access.WRITE_ONLY) - private String basePath; - - /** - * Gets the workflow trigger callback URL relative path. - */ - @JsonProperty(value = "relativePath", access = JsonProperty.Access.WRITE_ONLY) - private String relativePath; - - /** - * Gets the workflow trigger callback URL relative path parameters. - */ - @JsonProperty(value = "relativePathParameters") - private List relativePathParameters; - - /** - * Gets the workflow trigger callback URL query parameters. - */ - @JsonProperty(value = "queries") - private WorkflowTriggerListCallbackUrlQueries queries; - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Get the method value. - * - * @return the method value - */ - public String method() { - return this.method; - } - - /** - * Get the basePath value. - * - * @return the basePath value - */ - public String basePath() { - return this.basePath; - } - - /** - * Get the relativePath value. - * - * @return the relativePath value - */ - public String relativePath() { - return this.relativePath; - } - - /** - * Get the relativePathParameters value. - * - * @return the relativePathParameters value - */ - public List relativePathParameters() { - return this.relativePathParameters; - } - - /** - * Set the relativePathParameters value. - * - * @param relativePathParameters the relativePathParameters value to set - * @return the WorkflowTriggerCallbackUrlInner object itself. - */ - public WorkflowTriggerCallbackUrlInner withRelativePathParameters(List relativePathParameters) { - this.relativePathParameters = relativePathParameters; - return this; - } - - /** - * Get the queries value. - * - * @return the queries value - */ - public WorkflowTriggerListCallbackUrlQueries queries() { - return this.queries; - } - - /** - * Set the queries value. - * - * @param queries the queries value to set - * @return the WorkflowTriggerCallbackUrlInner object itself. - */ - public WorkflowTriggerCallbackUrlInner withQueries(WorkflowTriggerListCallbackUrlQueries queries) { - this.queries = queries; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerHistoriesInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerHistoriesInner.java deleted file mode 100755 index 2eed14c2451..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerHistoriesInner.java +++ /dev/null @@ -1,656 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WorkflowTriggerHistories. - */ -public class WorkflowTriggerHistoriesInner { - /** The Retrofit service to perform REST calls. */ - private WorkflowTriggerHistoriesService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of WorkflowTriggerHistoriesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WorkflowTriggerHistoriesInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(WorkflowTriggerHistoriesService.class); - this.client = client; - } - - /** - * The interface defining all the services for WorkflowTriggerHistories to be - * used by Retrofit to perform actually REST calls. - */ - interface WorkflowTriggerHistoriesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggerHistories list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggerHistories get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Path("historyName") String historyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggerHistories resubmit" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit") - Observable> resubmit(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Path("historyName") String historyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggerHistories listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowTriggerHistoryInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName, final String triggerName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, triggerName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final String triggerName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName, triggerName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerHistoryInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName, final String triggerName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, triggerName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerHistoryInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String triggerName) { - return listSinglePageAsync(resourceGroupName, workflowName, triggerName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowTriggerHistoryInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String triggerName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowTriggerHistoryInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName, final String triggerName, final Integer top, final String filter) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, triggerName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final String triggerName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName, triggerName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerHistoryInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName, final String triggerName, final Integer top, final String filter) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerHistoryInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String triggerName, final Integer top, final String filter) { - return listSinglePageAsync(resourceGroupName, workflowName, triggerName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow trigger histories. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param workflowName The workflow name. - ServiceResponse> * @param triggerName The workflow trigger name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowTriggerHistoryInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String triggerName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a workflow trigger history. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowTriggerHistoryInner object if successful. - */ - public WorkflowTriggerHistoryInner get(String resourceGroupName, String workflowName, String triggerName, String historyName) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, historyName).toBlocking().single().body(); - } - - /** - * Gets a workflow trigger history. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String workflowName, String triggerName, String historyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, historyName), serviceCallback); - } - - /** - * Gets a workflow trigger history. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerHistoryInner object - */ - public Observable getAsync(String resourceGroupName, String workflowName, String triggerName, String historyName) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, historyName).map(new Func1, WorkflowTriggerHistoryInner>() { - @Override - public WorkflowTriggerHistoryInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a workflow trigger history. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerHistoryInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName, String historyName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (historyName == null) { - throw new IllegalArgumentException("Parameter historyName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, historyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Resubmits a workflow run based on the trigger history. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void resubmit(String resourceGroupName, String workflowName, String triggerName, String historyName) { - resubmitWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, historyName).toBlocking().single().body(); - } - - /** - * Resubmits a workflow run based on the trigger history. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture resubmitAsync(String resourceGroupName, String workflowName, String triggerName, String historyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(resubmitWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, historyName), serviceCallback); - } - - /** - * Resubmits a workflow run based on the trigger history. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable resubmitAsync(String resourceGroupName, String workflowName, String triggerName, String historyName) { - return resubmitWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, historyName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Resubmits a workflow run based on the trigger history. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> resubmitWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName, String historyName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (historyName == null) { - throw new IllegalArgumentException("Parameter historyName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.resubmit(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, historyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = resubmitDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse resubmitDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowTriggerHistoryInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow trigger histories. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerHistoryInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow trigger histories. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerHistoryInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow trigger histories. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowTriggerHistoryInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerHistoryInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerHistoryInner.java deleted file mode 100755 index fad9ebebcf9..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerHistoryInner.java +++ /dev/null @@ -1,233 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.WorkflowStatus; -import com.microsoft.azure.management.logic.Correlation; -import com.microsoft.azure.management.logic.ContentLink; -import com.microsoft.azure.management.logic.ResourceReference; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; - -/** - * The workflow trigger history. - */ -@JsonFlatten -public class WorkflowTriggerHistoryInner extends SubResource { - /** - * Gets the start time. - */ - @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime startTime; - - /** - * Gets the end time. - */ - @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime endTime; - - /** - * Gets the status. Possible values include: 'NotSpecified', 'Paused', - * 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', - * 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored'. - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowStatus status; - - /** - * Gets the code. - */ - @JsonProperty(value = "properties.code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * Gets the error. - */ - @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY) - private Object error; - - /** - * Gets the tracking id. - */ - @JsonProperty(value = "properties.trackingId", access = JsonProperty.Access.WRITE_ONLY) - private String trackingId; - - /** - * The run correlation. - */ - @JsonProperty(value = "properties.correlation") - private Correlation correlation; - - /** - * Gets the link to input parameters. - */ - @JsonProperty(value = "properties.inputsLink", access = JsonProperty.Access.WRITE_ONLY) - private ContentLink inputsLink; - - /** - * Gets the link to output parameters. - */ - @JsonProperty(value = "properties.outputsLink", access = JsonProperty.Access.WRITE_ONLY) - private ContentLink outputsLink; - - /** - * Gets a value indicating whether trigger was fired. - */ - @JsonProperty(value = "properties.fired", access = JsonProperty.Access.WRITE_ONLY) - private Boolean fired; - - /** - * Gets the reference to workflow run. - */ - @JsonProperty(value = "properties.run", access = JsonProperty.Access.WRITE_ONLY) - private ResourceReference run; - - /** - * Gets the workflow trigger history name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets the workflow trigger history type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Get the status value. - * - * @return the status value - */ - public WorkflowStatus status() { - return this.status; - } - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the error value. - * - * @return the error value - */ - public Object error() { - return this.error; - } - - /** - * Get the trackingId value. - * - * @return the trackingId value - */ - public String trackingId() { - return this.trackingId; - } - - /** - * Get the correlation value. - * - * @return the correlation value - */ - public Correlation correlation() { - return this.correlation; - } - - /** - * Set the correlation value. - * - * @param correlation the correlation value to set - * @return the WorkflowTriggerHistoryInner object itself. - */ - public WorkflowTriggerHistoryInner withCorrelation(Correlation correlation) { - this.correlation = correlation; - return this; - } - - /** - * Get the inputsLink value. - * - * @return the inputsLink value - */ - public ContentLink inputsLink() { - return this.inputsLink; - } - - /** - * Get the outputsLink value. - * - * @return the outputsLink value - */ - public ContentLink outputsLink() { - return this.outputsLink; - } - - /** - * Get the fired value. - * - * @return the fired value - */ - public Boolean fired() { - return this.fired; - } - - /** - * Get the run value. - * - * @return the run value - */ - public ResourceReference run() { - return this.run; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerInner.java deleted file mode 100755 index 9b66b4bb402..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggerInner.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.logic.WorkflowTriggerProvisioningState; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.WorkflowState; -import com.microsoft.azure.management.logic.WorkflowStatus; -import com.microsoft.azure.management.logic.WorkflowTriggerRecurrence; -import com.microsoft.azure.management.logic.ResourceReference; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; - -/** - * The workflow trigger. - */ -@JsonFlatten -public class WorkflowTriggerInner extends SubResource { - /** - * Gets the provisioning state. Possible values include: 'NotSpecified', - * 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', - * 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Moving', 'Updating', - * 'Registering', 'Registered', 'Unregistering', 'Unregistered', - * 'Completed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowTriggerProvisioningState provisioningState; - - /** - * Gets the created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * Gets the changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * Gets the state. Possible values include: 'NotSpecified', 'Completed', - * 'Enabled', 'Disabled', 'Deleted', 'Suspended'. - */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowState state; - - /** - * Gets the status. Possible values include: 'NotSpecified', 'Paused', - * 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', - * 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored'. - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowStatus status; - - /** - * Gets the last execution time. - */ - @JsonProperty(value = "properties.lastExecutionTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastExecutionTime; - - /** - * Gets the next execution time. - */ - @JsonProperty(value = "properties.nextExecutionTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime nextExecutionTime; - - /** - * Gets the workflow trigger recurrence. - */ - @JsonProperty(value = "properties.recurrence", access = JsonProperty.Access.WRITE_ONLY) - private WorkflowTriggerRecurrence recurrence; - - /** - * Gets the reference to workflow. - */ - @JsonProperty(value = "properties.workflow", access = JsonProperty.Access.WRITE_ONLY) - private ResourceReference workflow; - - /** - * Gets the workflow trigger name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets the workflow trigger type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public WorkflowTriggerProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the state value. - * - * @return the state value - */ - public WorkflowState state() { - return this.state; - } - - /** - * Get the status value. - * - * @return the status value - */ - public WorkflowStatus status() { - return this.status; - } - - /** - * Get the lastExecutionTime value. - * - * @return the lastExecutionTime value - */ - public DateTime lastExecutionTime() { - return this.lastExecutionTime; - } - - /** - * Get the nextExecutionTime value. - * - * @return the nextExecutionTime value - */ - public DateTime nextExecutionTime() { - return this.nextExecutionTime; - } - - /** - * Get the recurrence value. - * - * @return the recurrence value - */ - public WorkflowTriggerRecurrence recurrence() { - return this.recurrence; - } - - /** - * Get the workflow value. - * - * @return the workflow value - */ - public ResourceReference workflow() { - return this.workflow; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java deleted file mode 100755 index 4e04a89636b..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java +++ /dev/null @@ -1,724 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WorkflowTriggers. - */ -public class WorkflowTriggersInner { - /** The Retrofit service to perform REST calls. */ - private WorkflowTriggersService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of WorkflowTriggersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WorkflowTriggersInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(WorkflowTriggersService.class); - this.client = client; - } - - /** - * The interface defining all the services for WorkflowTriggers to be - * used by Retrofit to perform actually REST calls. - */ - interface WorkflowTriggersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggers list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggers get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggers run" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run") - Observable> run(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggers listCallbackUrl" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl") - Observable> listCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggers listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowTriggerInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName) { - return listSinglePageAsync(resourceGroupName, workflowName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowTriggerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowTriggerInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { - return listSinglePageAsync(resourceGroupName, workflowName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow triggers. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param workflowName The workflow name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowTriggerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowTriggerInner object if successful. - */ - public WorkflowTriggerInner get(String resourceGroupName, String workflowName, String triggerName) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body(); - } - - /** - * Gets a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback); - } - - /** - * Gets a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerInner object - */ - public Observable getAsync(String resourceGroupName, String workflowName, String triggerName) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1, WorkflowTriggerInner>() { - @Override - public WorkflowTriggerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Runs a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws RestException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the Object object if successful. - */ - public Object run(String resourceGroupName, String workflowName, String triggerName) { - return runWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body(); - } - - /** - * Runs a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture runAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(runWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback); - } - - /** - * Runs a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable runAsync(String resourceGroupName, String workflowName, String triggerName) { - return runWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Runs a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable> runWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.run(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = runDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse runDelegate(Response response) throws RestException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .registerError(RestException.class) - .build(response); - } - - /** - * Gets the callback URL for a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowTriggerCallbackUrlInner object if successful. - */ - public WorkflowTriggerCallbackUrlInner listCallbackUrl(String resourceGroupName, String workflowName, String triggerName) { - return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body(); - } - - /** - * Gets the callback URL for a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listCallbackUrlAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback); - } - - /** - * Gets the callback URL for a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerCallbackUrlInner object - */ - public Observable listCallbackUrlAsync(String resourceGroupName, String workflowName, String triggerName) { - return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1, WorkflowTriggerCallbackUrlInner>() { - @Override - public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the callback URL for a workflow trigger. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerCallbackUrlInner object - */ - public Observable> listCallbackUrlWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listCallbackUrl(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listCallbackUrlDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listCallbackUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of workflow triggers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowTriggerInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow triggers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow triggers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow triggers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowTriggerInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow triggers. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowTriggerInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowVersionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowVersionInner.java deleted file mode 100755 index f6164a30b45..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowVersionInner.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.WorkflowState; -import com.microsoft.azure.management.logic.Sku; -import com.microsoft.azure.management.logic.ResourceReference; -import java.util.Map; -import com.microsoft.azure.management.logic.WorkflowParameter; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The workflow version. - */ -@JsonFlatten -public class WorkflowVersionInner extends Resource { - /** - * Gets the created time. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdTime; - - /** - * Gets the changed time. - */ - @JsonProperty(value = "properties.changedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime changedTime; - - /** - * The state. Possible values include: 'NotSpecified', 'Completed', - * 'Enabled', 'Disabled', 'Deleted', 'Suspended'. - */ - @JsonProperty(value = "properties.state") - private WorkflowState state; - - /** - * Gets the version. - */ - @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /** - * Gets the access endpoint. - */ - @JsonProperty(value = "properties.accessEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String accessEndpoint; - - /** - * The sku. - */ - @JsonProperty(value = "properties.sku") - private Sku sku; - - /** - * The integration account. - */ - @JsonProperty(value = "properties.integrationAccount") - private ResourceReference integrationAccount; - - /** - * The definition. - */ - @JsonProperty(value = "properties.definition") - private Object definition; - - /** - * The parameters. - */ - @JsonProperty(value = "properties.parameters") - private Map parameters; - - /** - * Get the createdTime value. - * - * @return the createdTime value - */ - public DateTime createdTime() { - return this.createdTime; - } - - /** - * Get the changedTime value. - * - * @return the changedTime value - */ - public DateTime changedTime() { - return this.changedTime; - } - - /** - * Get the state value. - * - * @return the state value - */ - public WorkflowState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the WorkflowVersionInner object itself. - */ - public WorkflowVersionInner withState(WorkflowState state) { - this.state = state; - return this; - } - - /** - * Get the version value. - * - * @return the version value - */ - public String version() { - return this.version; - } - - /** - * Get the accessEndpoint value. - * - * @return the accessEndpoint value - */ - public String accessEndpoint() { - return this.accessEndpoint; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the WorkflowVersionInner object itself. - */ - public WorkflowVersionInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the integrationAccount value. - * - * @return the integrationAccount value - */ - public ResourceReference integrationAccount() { - return this.integrationAccount; - } - - /** - * Set the integrationAccount value. - * - * @param integrationAccount the integrationAccount value to set - * @return the WorkflowVersionInner object itself. - */ - public WorkflowVersionInner withIntegrationAccount(ResourceReference integrationAccount) { - this.integrationAccount = integrationAccount; - return this; - } - - /** - * Get the definition value. - * - * @return the definition value - */ - public Object definition() { - return this.definition; - } - - /** - * Set the definition value. - * - * @param definition the definition value to set - * @return the WorkflowVersionInner object itself. - */ - public WorkflowVersionInner withDefinition(Object definition) { - this.definition = definition; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public Map parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the WorkflowVersionInner object itself. - */ - public WorkflowVersionInner withParameters(Map parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowVersionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowVersionsInner.java deleted file mode 100755 index 2a417efdcc9..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowVersionsInner.java +++ /dev/null @@ -1,729 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WorkflowVersions. - */ -public class WorkflowVersionsInner { - /** The Retrofit service to perform REST calls. */ - private WorkflowVersionsService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of WorkflowVersionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WorkflowVersionsInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(WorkflowVersionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for WorkflowVersions to be - * used by Retrofit to perform actually REST calls. - */ - interface WorkflowVersionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowVersions list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowVersions get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("versionId") String versionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowVersions listCallbackUrl" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl") - Observable> listCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("versionId") String versionId, @Path("triggerName") String triggerName, @Body GetCallbackUrlParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowVersions listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowVersionInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowVersionInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowVersionInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName) { - return listSinglePageAsync(resourceGroupName, workflowName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowVersionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowVersionInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String workflowName, final Integer top) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, workflowName, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowVersionInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String workflowName, final Integer top) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow versions. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowVersionInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final Integer top) { - return listSinglePageAsync(resourceGroupName, workflowName, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow versions. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param workflowName The workflow name. - ServiceResponse> * @param top The number of items to be included in the result. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowVersionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final Integer top) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowVersionInner object if successful. - */ - public WorkflowVersionInner get(String resourceGroupName, String workflowName, String versionId) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, versionId).toBlocking().single().body(); - } - - /** - * Gets a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String workflowName, String versionId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, versionId), serviceCallback); - } - - /** - * Gets a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowVersionInner object - */ - public Observable getAsync(String resourceGroupName, String workflowName, String versionId) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, versionId).map(new Func1, WorkflowVersionInner>() { - @Override - public WorkflowVersionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowVersionInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String versionId) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (versionId == null) { - throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, workflowName, versionId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists the callback URL for a trigger of a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowTriggerCallbackUrlInner object if successful. - */ - public WorkflowTriggerCallbackUrlInner listCallbackUrl(String resourceGroupName, String workflowName, String versionId, String triggerName) { - return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, versionId, triggerName).toBlocking().single().body(); - } - - /** - * Lists the callback URL for a trigger of a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param triggerName The workflow trigger name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listCallbackUrlAsync(String resourceGroupName, String workflowName, String versionId, String triggerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, versionId, triggerName), serviceCallback); - } - - /** - * Lists the callback URL for a trigger of a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerCallbackUrlInner object - */ - public Observable listCallbackUrlAsync(String resourceGroupName, String workflowName, String versionId, String triggerName) { - return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, versionId, triggerName).map(new Func1, WorkflowTriggerCallbackUrlInner>() { - @Override - public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists the callback URL for a trigger of a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param triggerName The workflow trigger name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerCallbackUrlInner object - */ - public Observable> listCallbackUrlWithServiceResponseAsync(String resourceGroupName, String workflowName, String versionId, String triggerName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (versionId == null) { - throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final GetCallbackUrlParametersInner parameters = null; - return service.listCallbackUrl(this.client.subscriptionId(), resourceGroupName, workflowName, versionId, triggerName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listCallbackUrlDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists the callback URL for a trigger of a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param triggerName The workflow trigger name. - * @param parameters The callback URL parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowTriggerCallbackUrlInner object if successful. - */ - public WorkflowTriggerCallbackUrlInner listCallbackUrl(String resourceGroupName, String workflowName, String versionId, String triggerName, GetCallbackUrlParametersInner parameters) { - return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, versionId, triggerName, parameters).toBlocking().single().body(); - } - - /** - * Lists the callback URL for a trigger of a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param triggerName The workflow trigger name. - * @param parameters The callback URL parameters. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listCallbackUrlAsync(String resourceGroupName, String workflowName, String versionId, String triggerName, GetCallbackUrlParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, versionId, triggerName, parameters), serviceCallback); - } - - /** - * Lists the callback URL for a trigger of a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param triggerName The workflow trigger name. - * @param parameters The callback URL parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerCallbackUrlInner object - */ - public Observable listCallbackUrlAsync(String resourceGroupName, String workflowName, String versionId, String triggerName, GetCallbackUrlParametersInner parameters) { - return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, versionId, triggerName, parameters).map(new Func1, WorkflowTriggerCallbackUrlInner>() { - @Override - public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists the callback URL for a trigger of a workflow version. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param versionId The workflow versionId. - * @param triggerName The workflow trigger name. - * @param parameters The callback URL parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowTriggerCallbackUrlInner object - */ - public Observable> listCallbackUrlWithServiceResponseAsync(String resourceGroupName, String workflowName, String versionId, String triggerName, GetCallbackUrlParametersInner parameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (versionId == null) { - throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); - } - if (triggerName == null) { - throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.listCallbackUrl(this.client.subscriptionId(), resourceGroupName, workflowName, versionId, triggerName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listCallbackUrlDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listCallbackUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of workflow versions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowVersionInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflow versions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflow versions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowVersionInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflow versions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowVersionInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflow versions. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowVersionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowsInner.java deleted file mode 100755 index 45d85f62f75..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowsInner.java +++ /dev/null @@ -1,1868 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.logic.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.logic.GenerateUpgradedDefinitionParameters; -import com.microsoft.azure.management.logic.KeyType; -import com.microsoft.azure.management.logic.RegenerateActionParameter; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Workflows. - */ -public class WorkflowsInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private WorkflowsService service; - /** The service client containing this operation class. */ - private LogicManagementClientImpl client; - - /** - * Initializes an instance of WorkflowsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WorkflowsInner(Retrofit retrofit, LogicManagementClientImpl client) { - this.service = retrofit.create(WorkflowsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Workflows to be - * used by Retrofit to perform actually REST calls. - */ - interface WorkflowsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listBySubscription" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Body WorkflowInner workflow, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Body WorkflowInner workflow, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows disable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable") - Observable> disable(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows enable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable") - Observable> enable(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows generateUpgradedDefinition" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition") - Observable> generateUpgradedDefinition(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body GenerateUpgradedDefinitionParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listSwagger" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger") - Observable> listSwagger(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows regenerateAccessKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey") - Observable> regenerateAccessKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateActionParameter keyType, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows validate" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate") - Observable> validate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Body WorkflowInner workflow, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listBySubscriptionNext" }) - @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of workflows by subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowInner> object if successful. - */ - public PagedList listBySubscription() { - ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflows by subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflows by subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflows by subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync() { - return listBySubscriptionSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflows by subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of workflows by subscription. - * - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowInner> object if successful. - */ - public PagedList listBySubscription(final Integer top, final String filter) { - ServiceResponse> response = listBySubscriptionSinglePageAsync(top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflows by subscription. - * - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflows by subscription. - * - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable> listBySubscriptionAsync(final Integer top, final String filter) { - return listBySubscriptionWithServiceResponseAsync(top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflows by subscription. - * - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync(final Integer top, final String filter) { - return listBySubscriptionSinglePageAsync(top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflows by subscription. - * - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync(final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final String filter = null; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName, final Integer top, final String filter) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, top, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final Integer top, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName, top, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final Integer top, final String filter) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, top, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflows by resource group. - * - * @param resourceGroupName The resource group name. - * @param top The number of items to be included in the result. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final Integer top, final String filter) { - return listByResourceGroupSinglePageAsync(resourceGroupName, top, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflows by resource group. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param top The number of items to be included in the result. - ServiceResponse> * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final Integer top, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowInner object if successful. - */ - public WorkflowInner getByResourceGroup(String resourceGroupName, String workflowName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); - } - - /** - * Gets a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String workflowName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, workflowName), serviceCallback); - } - - /** - * Gets a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String workflowName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1, WorkflowInner>() { - @Override - public WorkflowInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param workflow The workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowInner object if successful. - */ - public WorkflowInner createOrUpdate(String resourceGroupName, String workflowName, WorkflowInner workflow) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, workflowName, workflow).toBlocking().single().body(); - } - - /** - * Creates or updates a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param workflow The workflow. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workflowName, WorkflowInner workflow, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workflowName, workflow), serviceCallback); - } - - /** - * Creates or updates a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param workflow The workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String workflowName, WorkflowInner workflow) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, workflowName, workflow).map(new Func1, WorkflowInner>() { - @Override - public WorkflowInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param workflow The workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workflowName, WorkflowInner workflow) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (workflow == null) { - throw new IllegalArgumentException("Parameter workflow is required and cannot be null."); - } - Validator.validate(workflow); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), workflow, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param workflow The workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkflowInner object if successful. - */ - public WorkflowInner update(String resourceGroupName, String workflowName, WorkflowInner workflow) { - return updateWithServiceResponseAsync(resourceGroupName, workflowName, workflow).toBlocking().single().body(); - } - - /** - * Updates a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param workflow The workflow. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String workflowName, WorkflowInner workflow, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workflowName, workflow), serviceCallback); - } - - /** - * Updates a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param workflow The workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowInner object - */ - public Observable updateAsync(String resourceGroupName, String workflowName, WorkflowInner workflow) { - return updateWithServiceResponseAsync(resourceGroupName, workflowName, workflow).map(new Func1, WorkflowInner>() { - @Override - public WorkflowInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param workflow The workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String workflowName, WorkflowInner workflow) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (workflow == null) { - throw new IllegalArgumentException("Parameter workflow is required and cannot be null."); - } - Validator.validate(workflow); - return service.update(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), workflow, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String workflowName) { - deleteWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); - } - - /** - * Deletes a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String workflowName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workflowName), serviceCallback); - } - - /** - * Deletes a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String workflowName) { - return deleteWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Disables a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void disable(String resourceGroupName, String workflowName) { - disableWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); - } - - /** - * Disables a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture disableAsync(String resourceGroupName, String workflowName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(disableWithServiceResponseAsync(resourceGroupName, workflowName), serviceCallback); - } - - /** - * Disables a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable disableAsync(String resourceGroupName, String workflowName) { - return disableWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Disables a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> disableWithServiceResponseAsync(String resourceGroupName, String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.disable(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = disableDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse disableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Enables a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void enable(String resourceGroupName, String workflowName) { - enableWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); - } - - /** - * Enables a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture enableAsync(String resourceGroupName, String workflowName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(enableWithServiceResponseAsync(resourceGroupName, workflowName), serviceCallback); - } - - /** - * Enables a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable enableAsync(String resourceGroupName, String workflowName) { - return enableWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Enables a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> enableWithServiceResponseAsync(String resourceGroupName, String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.enable(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = enableDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse enableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Generates the upgraded definition for a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the Object object if successful. - */ - public Object generateUpgradedDefinition(String resourceGroupName, String workflowName) { - return generateUpgradedDefinitionWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); - } - - /** - * Generates the upgraded definition for a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture generateUpgradedDefinitionAsync(String resourceGroupName, String workflowName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generateUpgradedDefinitionWithServiceResponseAsync(resourceGroupName, workflowName), serviceCallback); - } - - /** - * Generates the upgraded definition for a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable generateUpgradedDefinitionAsync(String resourceGroupName, String workflowName) { - return generateUpgradedDefinitionWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Generates the upgraded definition for a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable> generateUpgradedDefinitionWithServiceResponseAsync(String resourceGroupName, String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String targetSchemaVersion = null; - GenerateUpgradedDefinitionParameters parameters = new GenerateUpgradedDefinitionParameters(); - parameters.withTargetSchemaVersion(null); - return service.generateUpgradedDefinition(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = generateUpgradedDefinitionDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Generates the upgraded definition for a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param targetSchemaVersion The target schema version. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the Object object if successful. - */ - public Object generateUpgradedDefinition(String resourceGroupName, String workflowName, String targetSchemaVersion) { - return generateUpgradedDefinitionWithServiceResponseAsync(resourceGroupName, workflowName, targetSchemaVersion).toBlocking().single().body(); - } - - /** - * Generates the upgraded definition for a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param targetSchemaVersion The target schema version. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture generateUpgradedDefinitionAsync(String resourceGroupName, String workflowName, String targetSchemaVersion, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generateUpgradedDefinitionWithServiceResponseAsync(resourceGroupName, workflowName, targetSchemaVersion), serviceCallback); - } - - /** - * Generates the upgraded definition for a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param targetSchemaVersion The target schema version. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable generateUpgradedDefinitionAsync(String resourceGroupName, String workflowName, String targetSchemaVersion) { - return generateUpgradedDefinitionWithServiceResponseAsync(resourceGroupName, workflowName, targetSchemaVersion).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Generates the upgraded definition for a workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param targetSchemaVersion The target schema version. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable> generateUpgradedDefinitionWithServiceResponseAsync(String resourceGroupName, String workflowName, String targetSchemaVersion) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - GenerateUpgradedDefinitionParameters parameters = new GenerateUpgradedDefinitionParameters(); - parameters.withTargetSchemaVersion(targetSchemaVersion); - return service.generateUpgradedDefinition(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = generateUpgradedDefinitionDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse generateUpgradedDefinitionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an OpenAPI definition for the workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the Object object if successful. - */ - public Object listSwagger(String resourceGroupName, String workflowName) { - return listSwaggerWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); - } - - /** - * Gets an OpenAPI definition for the workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listSwaggerAsync(String resourceGroupName, String workflowName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listSwaggerWithServiceResponseAsync(resourceGroupName, workflowName), serviceCallback); - } - - /** - * Gets an OpenAPI definition for the workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable listSwaggerAsync(String resourceGroupName, String workflowName) { - return listSwaggerWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an OpenAPI definition for the workflow. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object - */ - public Observable> listSwaggerWithServiceResponseAsync(String resourceGroupName, String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSwagger(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listSwaggerDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listSwaggerDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Regenerates the callback URL access key for request triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void regenerateAccessKey(String resourceGroupName, String workflowName) { - regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); - } - - /** - * Regenerates the callback URL access key for request triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateAccessKeyAsync(String resourceGroupName, String workflowName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, workflowName), serviceCallback); - } - - /** - * Regenerates the callback URL access key for request triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable regenerateAccessKeyAsync(String resourceGroupName, String workflowName) { - return regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the callback URL access key for request triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> regenerateAccessKeyWithServiceResponseAsync(String resourceGroupName, String workflowName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final KeyType keyType = null; - RegenerateActionParameter keyType1 = new RegenerateActionParameter(); - keyType1.withKeyType(null); - return service.regenerateAccessKey(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), keyType1, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateAccessKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Regenerates the callback URL access key for request triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void regenerateAccessKey(String resourceGroupName, String workflowName, KeyType keyType) { - regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, workflowName, keyType).toBlocking().single().body(); - } - - /** - * Regenerates the callback URL access key for request triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateAccessKeyAsync(String resourceGroupName, String workflowName, KeyType keyType, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, workflowName, keyType), serviceCallback); - } - - /** - * Regenerates the callback URL access key for request triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable regenerateAccessKeyAsync(String resourceGroupName, String workflowName, KeyType keyType) { - return regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, workflowName, keyType).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the callback URL access key for request triggers. - * - * @param resourceGroupName The resource group name. - * @param workflowName The workflow name. - * @param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> regenerateAccessKeyWithServiceResponseAsync(String resourceGroupName, String workflowName, KeyType keyType) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - RegenerateActionParameter keyType1 = new RegenerateActionParameter(); - keyType1.withKeyType(keyType); - return service.regenerateAccessKey(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), keyType1, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateAccessKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateAccessKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Validates the workflow definition. - * - * @param resourceGroupName The resource group name. - * @param location The workflow location. - * @param workflowName The workflow name. - * @param workflow The workflow definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void validate(String resourceGroupName, String location, String workflowName, WorkflowInner workflow) { - validateWithServiceResponseAsync(resourceGroupName, location, workflowName, workflow).toBlocking().single().body(); - } - - /** - * Validates the workflow definition. - * - * @param resourceGroupName The resource group name. - * @param location The workflow location. - * @param workflowName The workflow name. - * @param workflow The workflow definition. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture validateAsync(String resourceGroupName, String location, String workflowName, WorkflowInner workflow, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(validateWithServiceResponseAsync(resourceGroupName, location, workflowName, workflow), serviceCallback); - } - - /** - * Validates the workflow definition. - * - * @param resourceGroupName The resource group name. - * @param location The workflow location. - * @param workflowName The workflow name. - * @param workflow The workflow definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable validateAsync(String resourceGroupName, String location, String workflowName, WorkflowInner workflow) { - return validateWithServiceResponseAsync(resourceGroupName, location, workflowName, workflow).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Validates the workflow definition. - * - * @param resourceGroupName The resource group name. - * @param location The workflow location. - * @param workflowName The workflow name. - * @param workflow The workflow definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> validateWithServiceResponseAsync(String resourceGroupName, String location, String workflowName, WorkflowInner workflow) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (workflow == null) { - throw new IllegalArgumentException("Parameter workflow is required and cannot be null."); - } - Validator.validate(workflow); - return service.validate(this.client.subscriptionId(), resourceGroupName, location, workflowName, this.client.apiVersion(), workflow, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = validateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse validateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of workflows by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowInner> object if successful. - */ - public PagedList listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflows by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflows by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflows by subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflows by subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of workflows by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WorkflowInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets a list of workflows by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets a list of workflows by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets a list of workflows by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WorkflowInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of workflows by resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/package-info.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/package-info.java deleted file mode 100755 index b9873593d58..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for LogicManagementClient. - * REST API for Azure Logic Apps. - */ -package com.microsoft.azure.management.logic.implementation; diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/package-info.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/package-info.java deleted file mode 100755 index 199258afefd..00000000000 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for LogicManagementClient. - * REST API for Azure Logic Apps. - */ -package com.microsoft.azure.management.logic; diff --git a/azure-mgmt-machinelearning/pom.xml b/azure-mgmt-machinelearning/pom.xml deleted file mode 100755 index 25d3bc1ac1b..00000000000 --- a/azure-mgmt-machinelearning/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-machinelearning - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for MachineLearning Management - This package contains Microsoft MachineLearning Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetItem.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetItem.java deleted file mode 100755 index ef6aeb18fd0..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetItem.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.Map; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about an asset associated with the web service. - */ -public class AssetItem { - /** - * Asset's friendly name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Asset's Id. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Asset's type. Possible values include: 'Module', 'Resource'. - */ - @JsonProperty(value = "type", required = true) - private AssetType type; - - /** - * Access information for the asset. - */ - @JsonProperty(value = "locationInfo", required = true) - private BlobLocation locationInfo; - - /** - * Information about the asset's input ports. - */ - @JsonProperty(value = "inputPorts") - private Map inputPorts; - - /** - * Information about the asset's output ports. - */ - @JsonProperty(value = "outputPorts") - private Map outputPorts; - - /** - * If the asset is a custom module, this holds the module's metadata. - */ - @JsonProperty(value = "metadata") - private Map metadata; - - /** - * If the asset is a custom module, this holds the module's parameters. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the AssetItem object itself. - */ - public AssetItem withName(String name) { - this.name = name; - return this; - } - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the AssetItem object itself. - */ - public AssetItem withId(String id) { - this.id = id; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public AssetType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the AssetItem object itself. - */ - public AssetItem withType(AssetType type) { - this.type = type; - return this; - } - - /** - * Get the locationInfo value. - * - * @return the locationInfo value - */ - public BlobLocation locationInfo() { - return this.locationInfo; - } - - /** - * Set the locationInfo value. - * - * @param locationInfo the locationInfo value to set - * @return the AssetItem object itself. - */ - public AssetItem withLocationInfo(BlobLocation locationInfo) { - this.locationInfo = locationInfo; - return this; - } - - /** - * Get the inputPorts value. - * - * @return the inputPorts value - */ - public Map inputPorts() { - return this.inputPorts; - } - - /** - * Set the inputPorts value. - * - * @param inputPorts the inputPorts value to set - * @return the AssetItem object itself. - */ - public AssetItem withInputPorts(Map inputPorts) { - this.inputPorts = inputPorts; - return this; - } - - /** - * Get the outputPorts value. - * - * @return the outputPorts value - */ - public Map outputPorts() { - return this.outputPorts; - } - - /** - * Set the outputPorts value. - * - * @param outputPorts the outputPorts value to set - * @return the AssetItem object itself. - */ - public AssetItem withOutputPorts(Map outputPorts) { - this.outputPorts = outputPorts; - return this; - } - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the AssetItem object itself. - */ - public AssetItem withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the AssetItem object itself. - */ - public AssetItem withParameters(List parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetType.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetType.java deleted file mode 100755 index 5995ad46af4..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AssetType. - */ -public final class AssetType { - /** Static value Module for AssetType. */ - public static final AssetType MODULE = new AssetType("Module"); - - /** Static value Resource for AssetType. */ - public static final AssetType RESOURCE = new AssetType("Resource"); - - private String value; - - /** - * Creates a custom value for AssetType. - * @param value the custom value - */ - public AssetType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof AssetType)) { - return false; - } - if (obj == this) { - return true; - } - AssetType rhs = (AssetType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AsyncOperationErrorInfo.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AsyncOperationErrorInfo.java deleted file mode 100755 index 1f860ce7c02..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AsyncOperationErrorInfo.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The error detail information for async operation. - */ -public class AsyncOperationErrorInfo { - /** - * The error code. - */ - @JsonProperty(value = "code") - private String code; - - /** - * The error target. - */ - @JsonProperty(value = "target") - private String target; - - /** - * The error message. - */ - @JsonProperty(value = "message") - private String message; - - /** - * An array containing error information. - */ - @JsonProperty(value = "details") - private List details; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the AsyncOperationErrorInfo object itself. - */ - public AsyncOperationErrorInfo withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the target value. - * - * @return the target value - */ - public String target() { - return this.target; - } - - /** - * Set the target value. - * - * @param target the target value to set - * @return the AsyncOperationErrorInfo object itself. - */ - public AsyncOperationErrorInfo withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the AsyncOperationErrorInfo object itself. - */ - public AsyncOperationErrorInfo withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the details value. - * - * @return the details value - */ - public List details() { - return this.details; - } - - /** - * Set the details value. - * - * @param details the details value to set - * @return the AsyncOperationErrorInfo object itself. - */ - public AsyncOperationErrorInfo withDetails(List details) { - this.details = details; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/BlobLocation.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/BlobLocation.java deleted file mode 100755 index 3f667465816..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/BlobLocation.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes the access location for a blob. - */ -public class BlobLocation { - /** - * The URI from which the blob is accessible from. For example, aml://abc - * for system assets or https://xyz for user assets or payload. - */ - @JsonProperty(value = "uri", required = true) - private String uri; - - /** - * Access credentials for the blob, if applicable (e.g. blob specified by - * storage account connection string + blob URI). - */ - @JsonProperty(value = "credentials") - private String credentials; - - /** - * Get the uri value. - * - * @return the uri value - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri value. - * - * @param uri the uri value to set - * @return the BlobLocation object itself. - */ - public BlobLocation withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the credentials value. - * - * @return the credentials value - */ - public String credentials() { - return this.credentials; - } - - /** - * Set the credentials value. - * - * @param credentials the credentials value to set - * @return the BlobLocation object itself. - */ - public BlobLocation withCredentials(String credentials) { - this.credentials = credentials; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnFormat.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnFormat.java deleted file mode 100755 index 2ccd591535f..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnFormat.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ColumnFormat. - */ -public final class ColumnFormat { - /** Static value Byte for ColumnFormat. */ - public static final ColumnFormat BYTE = new ColumnFormat("Byte"); - - /** Static value Char for ColumnFormat. */ - public static final ColumnFormat CHAR = new ColumnFormat("Char"); - - /** Static value Complex64 for ColumnFormat. */ - public static final ColumnFormat COMPLEX64 = new ColumnFormat("Complex64"); - - /** Static value Complex128 for ColumnFormat. */ - public static final ColumnFormat COMPLEX128 = new ColumnFormat("Complex128"); - - /** Static value Date-time for ColumnFormat. */ - public static final ColumnFormat DATE_TIME = new ColumnFormat("Date-time"); - - /** Static value Date-timeOffset for ColumnFormat. */ - public static final ColumnFormat DATE_TIME_OFFSET = new ColumnFormat("Date-timeOffset"); - - /** Static value Double for ColumnFormat. */ - public static final ColumnFormat DOUBLE = new ColumnFormat("Double"); - - /** Static value Duration for ColumnFormat. */ - public static final ColumnFormat DURATION = new ColumnFormat("Duration"); - - /** Static value Float for ColumnFormat. */ - public static final ColumnFormat FLOAT = new ColumnFormat("Float"); - - /** Static value Int8 for ColumnFormat. */ - public static final ColumnFormat INT8 = new ColumnFormat("Int8"); - - /** Static value Int16 for ColumnFormat. */ - public static final ColumnFormat INT16 = new ColumnFormat("Int16"); - - /** Static value Int32 for ColumnFormat. */ - public static final ColumnFormat INT32 = new ColumnFormat("Int32"); - - /** Static value Int64 for ColumnFormat. */ - public static final ColumnFormat INT64 = new ColumnFormat("Int64"); - - /** Static value Uint8 for ColumnFormat. */ - public static final ColumnFormat UINT8 = new ColumnFormat("Uint8"); - - /** Static value Uint16 for ColumnFormat. */ - public static final ColumnFormat UINT16 = new ColumnFormat("Uint16"); - - /** Static value Uint32 for ColumnFormat. */ - public static final ColumnFormat UINT32 = new ColumnFormat("Uint32"); - - /** Static value Uint64 for ColumnFormat. */ - public static final ColumnFormat UINT64 = new ColumnFormat("Uint64"); - - private String value; - - /** - * Creates a custom value for ColumnFormat. - * @param value the custom value - */ - public ColumnFormat(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ColumnFormat)) { - return false; - } - if (obj == this) { - return true; - } - ColumnFormat rhs = (ColumnFormat) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnSpecification.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnSpecification.java deleted file mode 100755 index 0a5d69a399c..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnSpecification.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Swagger 2.0 schema for a column within the data table representing a web - * service input or output. See Swagger specification: - * http://swagger.io/specification/. - */ -public class ColumnSpecification { - /** - * Data type of the column. Possible values include: 'Boolean', 'Integer', - * 'Number', 'String'. - */ - @JsonProperty(value = "type", required = true) - private ColumnType type; - - /** - * Additional format information for the data type. Possible values - * include: 'Byte', 'Char', 'Complex64', 'Complex128', 'Date-time', - * 'Date-timeOffset', 'Double', 'Duration', 'Float', 'Int8', 'Int16', - * 'Int32', 'Int64', 'Uint8', 'Uint16', 'Uint32', 'Uint64'. - */ - @JsonProperty(value = "format") - private ColumnFormat format; - - /** - * If the data type is categorical, this provides the list of accepted - * categories. - */ - @JsonProperty(value = "enum") - private List enumProperty; - - /** - * Flag indicating if the type supports null values or not. - */ - @JsonProperty(value = "x-ms-isnullable") - private Boolean xMsIsnullable; - - /** - * Flag indicating whether the categories are treated as an ordered set or - * not, if this is a categorical column. - */ - @JsonProperty(value = "x-ms-isordered") - private Boolean xMsIsordered; - - /** - * Get the type value. - * - * @return the type value - */ - public ColumnType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ColumnSpecification object itself. - */ - public ColumnSpecification withType(ColumnType type) { - this.type = type; - return this; - } - - /** - * Get the format value. - * - * @return the format value - */ - public ColumnFormat format() { - return this.format; - } - - /** - * Set the format value. - * - * @param format the format value to set - * @return the ColumnSpecification object itself. - */ - public ColumnSpecification withFormat(ColumnFormat format) { - this.format = format; - return this; - } - - /** - * Get the enumProperty value. - * - * @return the enumProperty value - */ - public List enumProperty() { - return this.enumProperty; - } - - /** - * Set the enumProperty value. - * - * @param enumProperty the enumProperty value to set - * @return the ColumnSpecification object itself. - */ - public ColumnSpecification withEnumProperty(List enumProperty) { - this.enumProperty = enumProperty; - return this; - } - - /** - * Get the xMsIsnullable value. - * - * @return the xMsIsnullable value - */ - public Boolean xMsIsnullable() { - return this.xMsIsnullable; - } - - /** - * Set the xMsIsnullable value. - * - * @param xMsIsnullable the xMsIsnullable value to set - * @return the ColumnSpecification object itself. - */ - public ColumnSpecification withXMsIsnullable(Boolean xMsIsnullable) { - this.xMsIsnullable = xMsIsnullable; - return this; - } - - /** - * Get the xMsIsordered value. - * - * @return the xMsIsordered value - */ - public Boolean xMsIsordered() { - return this.xMsIsordered; - } - - /** - * Set the xMsIsordered value. - * - * @param xMsIsordered the xMsIsordered value to set - * @return the ColumnSpecification object itself. - */ - public ColumnSpecification withXMsIsordered(Boolean xMsIsordered) { - this.xMsIsordered = xMsIsordered; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnType.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnType.java deleted file mode 100755 index 70399a28995..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ColumnType.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ColumnType. - */ -public final class ColumnType { - /** Static value Boolean for ColumnType. */ - public static final ColumnType BOOLEAN = new ColumnType("Boolean"); - - /** Static value Integer for ColumnType. */ - public static final ColumnType INTEGER = new ColumnType("Integer"); - - /** Static value Number for ColumnType. */ - public static final ColumnType NUMBER = new ColumnType("Number"); - - /** Static value String for ColumnType. */ - public static final ColumnType STRING = new ColumnType("String"); - - private String value; - - /** - * Creates a custom value for ColumnType. - * @param value the custom value - */ - public ColumnType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ColumnType)) { - return false; - } - if (obj == this) { - return true; - } - ColumnType rhs = (ColumnType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/CommitmentPlan.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/CommitmentPlan.java deleted file mode 100755 index 2636e1eef74..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/CommitmentPlan.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about the machine learning commitment plan associated with the - * web service. - */ -public class CommitmentPlan { - /** - * Specifies the Azure Resource Manager ID of the commitment plan - * associated with the web service. - */ - @JsonProperty(value = "id", required = true) - private String id; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the CommitmentPlan object itself. - */ - public CommitmentPlan withId(String id) { - this.id = id; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/DiagnosticsConfiguration.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/DiagnosticsConfiguration.java deleted file mode 100755 index 69dc6fe320f..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/DiagnosticsConfiguration.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Diagnostics settings for an Azure ML web service. - */ -public class DiagnosticsConfiguration { - /** - * Specifies the verbosity of the diagnostic output. Valid values are: None - * - disables tracing; Error - collects only error (stderr) traces; All - - * collects all traces (stdout and stderr). Possible values include: - * 'None', 'Error', 'All'. - */ - @JsonProperty(value = "level", required = true) - private DiagnosticsLevel level; - - /** - * Specifies the date and time when the logging will cease. If null, - * diagnostic collection is not time limited. - */ - @JsonProperty(value = "expiry") - private DateTime expiry; - - /** - * Get the level value. - * - * @return the level value - */ - public DiagnosticsLevel level() { - return this.level; - } - - /** - * Set the level value. - * - * @param level the level value to set - * @return the DiagnosticsConfiguration object itself. - */ - public DiagnosticsConfiguration withLevel(DiagnosticsLevel level) { - this.level = level; - return this; - } - - /** - * Get the expiry value. - * - * @return the expiry value - */ - public DateTime expiry() { - return this.expiry; - } - - /** - * Set the expiry value. - * - * @param expiry the expiry value to set - * @return the DiagnosticsConfiguration object itself. - */ - public DiagnosticsConfiguration withExpiry(DateTime expiry) { - this.expiry = expiry; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/DiagnosticsLevel.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/DiagnosticsLevel.java deleted file mode 100755 index 009f24892da..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/DiagnosticsLevel.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for DiagnosticsLevel. - */ -public final class DiagnosticsLevel { - /** Static value None for DiagnosticsLevel. */ - public static final DiagnosticsLevel NONE = new DiagnosticsLevel("None"); - - /** Static value Error for DiagnosticsLevel. */ - public static final DiagnosticsLevel ERROR = new DiagnosticsLevel("Error"); - - /** Static value All for DiagnosticsLevel. */ - public static final DiagnosticsLevel ALL = new DiagnosticsLevel("All"); - - private String value; - - /** - * Creates a custom value for DiagnosticsLevel. - * @param value the custom value - */ - public DiagnosticsLevel(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof DiagnosticsLevel)) { - return false; - } - if (obj == this) { - return true; - } - DiagnosticsLevel rhs = (DiagnosticsLevel) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ExampleRequest.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ExampleRequest.java deleted file mode 100755 index 12daf808a80..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ExampleRequest.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.Map; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Sample input data for the service's input(s). - */ -public class ExampleRequest { - /** - * Sample input data for the web service's input(s) given as an input name - * to sample input values matrix map. - */ - @JsonProperty(value = "inputs") - private Map>> inputs; - - /** - * Sample input data for the web service's global parameters. - */ - @JsonProperty(value = "globalParameters") - private Map globalParameters; - - /** - * Get the inputs value. - * - * @return the inputs value - */ - public Map>> inputs() { - return this.inputs; - } - - /** - * Set the inputs value. - * - * @param inputs the inputs value to set - * @return the ExampleRequest object itself. - */ - public ExampleRequest withInputs(Map>> inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the globalParameters value. - * - * @return the globalParameters value - */ - public Map globalParameters() { - return this.globalParameters; - } - - /** - * Set the globalParameters value. - * - * @param globalParameters the globalParameters value to set - * @return the ExampleRequest object itself. - */ - public ExampleRequest withGlobalParameters(Map globalParameters) { - this.globalParameters = globalParameters; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphEdge.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphEdge.java deleted file mode 100755 index 2bc5442c234..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphEdge.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines an edge within the web service's graph. - */ -public class GraphEdge { - /** - * The source graph node's identifier. - */ - @JsonProperty(value = "sourceNodeId") - private String sourceNodeId; - - /** - * The identifier of the source node's port that the edge connects from. - */ - @JsonProperty(value = "sourcePortId") - private String sourcePortId; - - /** - * The destination graph node's identifier. - */ - @JsonProperty(value = "targetNodeId") - private String targetNodeId; - - /** - * The identifier of the destination node's port that the edge connects - * into. - */ - @JsonProperty(value = "targetPortId") - private String targetPortId; - - /** - * Get the sourceNodeId value. - * - * @return the sourceNodeId value - */ - public String sourceNodeId() { - return this.sourceNodeId; - } - - /** - * Set the sourceNodeId value. - * - * @param sourceNodeId the sourceNodeId value to set - * @return the GraphEdge object itself. - */ - public GraphEdge withSourceNodeId(String sourceNodeId) { - this.sourceNodeId = sourceNodeId; - return this; - } - - /** - * Get the sourcePortId value. - * - * @return the sourcePortId value - */ - public String sourcePortId() { - return this.sourcePortId; - } - - /** - * Set the sourcePortId value. - * - * @param sourcePortId the sourcePortId value to set - * @return the GraphEdge object itself. - */ - public GraphEdge withSourcePortId(String sourcePortId) { - this.sourcePortId = sourcePortId; - return this; - } - - /** - * Get the targetNodeId value. - * - * @return the targetNodeId value - */ - public String targetNodeId() { - return this.targetNodeId; - } - - /** - * Set the targetNodeId value. - * - * @param targetNodeId the targetNodeId value to set - * @return the GraphEdge object itself. - */ - public GraphEdge withTargetNodeId(String targetNodeId) { - this.targetNodeId = targetNodeId; - return this; - } - - /** - * Get the targetPortId value. - * - * @return the targetPortId value - */ - public String targetPortId() { - return this.targetPortId; - } - - /** - * Set the targetPortId value. - * - * @param targetPortId the targetPortId value to set - * @return the GraphEdge object itself. - */ - public GraphEdge withTargetPortId(String targetPortId) { - this.targetPortId = targetPortId; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphNode.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphNode.java deleted file mode 100755 index 9c6ebc43517..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphNode.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Specifies a node in the web service graph. The node can either be an input, - * output or asset node, so only one of the corresponding id properties is - * populated at any given time. - */ -public class GraphNode { - /** - * The id of the asset represented by this node. - */ - @JsonProperty(value = "assetId") - private String assetId; - - /** - * The id of the input element represented by this node. - */ - @JsonProperty(value = "inputId") - private String inputId; - - /** - * The id of the output element represented by this node. - */ - @JsonProperty(value = "outputId") - private String outputId; - - /** - * If applicable, parameters of the node. Global graph parameters map into - * these, with values set at runtime. - */ - @JsonProperty(value = "parameters") - private Map parameters; - - /** - * Get the assetId value. - * - * @return the assetId value - */ - public String assetId() { - return this.assetId; - } - - /** - * Set the assetId value. - * - * @param assetId the assetId value to set - * @return the GraphNode object itself. - */ - public GraphNode withAssetId(String assetId) { - this.assetId = assetId; - return this; - } - - /** - * Get the inputId value. - * - * @return the inputId value - */ - public String inputId() { - return this.inputId; - } - - /** - * Set the inputId value. - * - * @param inputId the inputId value to set - * @return the GraphNode object itself. - */ - public GraphNode withInputId(String inputId) { - this.inputId = inputId; - return this; - } - - /** - * Get the outputId value. - * - * @return the outputId value - */ - public String outputId() { - return this.outputId; - } - - /** - * Set the outputId value. - * - * @param outputId the outputId value to set - * @return the GraphNode object itself. - */ - public GraphNode withOutputId(String outputId) { - this.outputId = outputId; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public Map parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the GraphNode object itself. - */ - public GraphNode withParameters(Map parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphPackage.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphPackage.java deleted file mode 100755 index 310f452d75c..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphPackage.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.Map; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines the graph of modules making up the machine learning solution. - */ -public class GraphPackage { - /** - * The set of nodes making up the graph, provided as a nodeId to GraphNode - * map. - */ - @JsonProperty(value = "nodes") - private Map nodes; - - /** - * The list of edges making up the graph. - */ - @JsonProperty(value = "edges") - private List edges; - - /** - * The collection of global parameters for the graph, given as a global - * parameter name to GraphParameter map. Each parameter here has a 1:1 - * match with the global parameters values map declared at the - * WebServiceProperties level. - */ - @JsonProperty(value = "graphParameters") - private Map graphParameters; - - /** - * Get the nodes value. - * - * @return the nodes value - */ - public Map nodes() { - return this.nodes; - } - - /** - * Set the nodes value. - * - * @param nodes the nodes value to set - * @return the GraphPackage object itself. - */ - public GraphPackage withNodes(Map nodes) { - this.nodes = nodes; - return this; - } - - /** - * Get the edges value. - * - * @return the edges value - */ - public List edges() { - return this.edges; - } - - /** - * Set the edges value. - * - * @param edges the edges value to set - * @return the GraphPackage object itself. - */ - public GraphPackage withEdges(List edges) { - this.edges = edges; - return this; - } - - /** - * Get the graphParameters value. - * - * @return the graphParameters value - */ - public Map graphParameters() { - return this.graphParameters; - } - - /** - * Set the graphParameters value. - * - * @param graphParameters the graphParameters value to set - * @return the GraphPackage object itself. - */ - public GraphPackage withGraphParameters(Map graphParameters) { - this.graphParameters = graphParameters; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphParameter.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphParameter.java deleted file mode 100755 index ba0f2bcd488..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphParameter.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines a global parameter in the graph. - */ -public class GraphParameter { - /** - * Description of this graph parameter. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Graph parameter's type. Possible values include: 'String', 'Int', - * 'Float', 'Enumerated', 'Script', 'Mode', 'Credential', 'Boolean', - * 'Double', 'ColumnPicker', 'ParameterRange', 'DataGatewayName'. - */ - @JsonProperty(value = "type", required = true) - private ParameterType type; - - /** - * Association links for this parameter to nodes in the graph. - */ - @JsonProperty(value = "links", required = true) - private List links; - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the GraphParameter object itself. - */ - public GraphParameter withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public ParameterType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the GraphParameter object itself. - */ - public GraphParameter withType(ParameterType type) { - this.type = type; - return this; - } - - /** - * Get the links value. - * - * @return the links value - */ - public List links() { - return this.links; - } - - /** - * Set the links value. - * - * @param links the links value to set - * @return the GraphParameter object itself. - */ - public GraphParameter withLinks(List links) { - this.links = links; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphParameterLink.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphParameterLink.java deleted file mode 100755 index e30d6df143a..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/GraphParameterLink.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Association link for a graph global parameter to a node in the graph. - */ -public class GraphParameterLink { - /** - * The graph node's identifier. - */ - @JsonProperty(value = "nodeId", required = true) - private String nodeId; - - /** - * The identifier of the node parameter that the global parameter maps to. - */ - @JsonProperty(value = "parameterKey", required = true) - private String parameterKey; - - /** - * Get the nodeId value. - * - * @return the nodeId value - */ - public String nodeId() { - return this.nodeId; - } - - /** - * Set the nodeId value. - * - * @param nodeId the nodeId value to set - * @return the GraphParameterLink object itself. - */ - public GraphParameterLink withNodeId(String nodeId) { - this.nodeId = nodeId; - return this; - } - - /** - * Get the parameterKey value. - * - * @return the parameterKey value - */ - public String parameterKey() { - return this.parameterKey; - } - - /** - * Set the parameterKey value. - * - * @param parameterKey the parameterKey value to set - * @return the GraphParameterLink object itself. - */ - public GraphParameterLink withParameterKey(String parameterKey) { - this.parameterKey = parameterKey; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/InputPort.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/InputPort.java deleted file mode 100755 index 2aebdf9921e..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/InputPort.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Asset input port. - */ -public class InputPort { - /** - * Port data type. Possible values include: 'Dataset'. - */ - @JsonProperty(value = "type") - private InputPortType type; - - /** - * Get the type value. - * - * @return the type value - */ - public InputPortType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the InputPort object itself. - */ - public InputPort withType(InputPortType type) { - this.type = type; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/InputPortType.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/InputPortType.java deleted file mode 100755 index ddfaa5f0937..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/InputPortType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for InputPortType. - */ -public final class InputPortType { - /** Static value Dataset for InputPortType. */ - public static final InputPortType DATASET = new InputPortType("Dataset"); - - private String value; - - /** - * Creates a custom value for InputPortType. - * @param value the custom value - */ - public InputPortType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof InputPortType)) { - return false; - } - if (obj == this) { - return true; - } - InputPortType rhs = (InputPortType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/MachineLearningWorkspace.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/MachineLearningWorkspace.java deleted file mode 100755 index 06a125dacdf..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/MachineLearningWorkspace.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Information about the machine learning workspace containing the experiment - * that is source for the web service. - */ -public class MachineLearningWorkspace { - /** - * Specifies the workspace ID of the machine learning workspace associated - * with the web service. - */ - @JsonProperty(value = "id", required = true) - private String id; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the MachineLearningWorkspace object itself. - */ - public MachineLearningWorkspace withId(String id) { - this.id = id; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModeValueInfo.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModeValueInfo.java deleted file mode 100755 index 72c1d8ea6a9..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModeValueInfo.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Nested parameter definition. - */ -public class ModeValueInfo { - /** - * The interface string name for the nested parameter. - */ - @JsonProperty(value = "interfaceString") - private String interfaceString; - - /** - * The definition of the parameter. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * Get the interfaceString value. - * - * @return the interfaceString value - */ - public String interfaceString() { - return this.interfaceString; - } - - /** - * Set the interfaceString value. - * - * @param interfaceString the interfaceString value to set - * @return the ModeValueInfo object itself. - */ - public ModeValueInfo withInterfaceString(String interfaceString) { - this.interfaceString = interfaceString; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the ModeValueInfo object itself. - */ - public ModeValueInfo withParameters(List parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModuleAssetParameter.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModuleAssetParameter.java deleted file mode 100755 index f86247804ad..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModuleAssetParameter.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameter definition for a module asset. - */ -public class ModuleAssetParameter { - /** - * Parameter name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Parameter type. - */ - @JsonProperty(value = "parameterType") - private String parameterType; - - /** - * Definitions for nested interface parameters if this is a complex module - * parameter. - */ - @JsonProperty(value = "modeValuesInfo") - private Map modeValuesInfo; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ModuleAssetParameter object itself. - */ - public ModuleAssetParameter withName(String name) { - this.name = name; - return this; - } - - /** - * Get the parameterType value. - * - * @return the parameterType value - */ - public String parameterType() { - return this.parameterType; - } - - /** - * Set the parameterType value. - * - * @param parameterType the parameterType value to set - * @return the ModuleAssetParameter object itself. - */ - public ModuleAssetParameter withParameterType(String parameterType) { - this.parameterType = parameterType; - return this; - } - - /** - * Get the modeValuesInfo value. - * - * @return the modeValuesInfo value - */ - public Map modeValuesInfo() { - return this.modeValuesInfo; - } - - /** - * Set the modeValuesInfo value. - * - * @param modeValuesInfo the modeValuesInfo value to set - * @return the ModuleAssetParameter object itself. - */ - public ModuleAssetParameter withModeValuesInfo(Map modeValuesInfo) { - this.modeValuesInfo = modeValuesInfo; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/OutputPort.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/OutputPort.java deleted file mode 100755 index 1de8413e4c8..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/OutputPort.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Asset output port. - */ -public class OutputPort { - /** - * Port data type. Possible values include: 'Dataset'. - */ - @JsonProperty(value = "type") - private OutputPortType type; - - /** - * Get the type value. - * - * @return the type value - */ - public OutputPortType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the OutputPort object itself. - */ - public OutputPort withType(OutputPortType type) { - this.type = type; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/OutputPortType.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/OutputPortType.java deleted file mode 100755 index c5295b24d4d..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/OutputPortType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for OutputPortType. - */ -public final class OutputPortType { - /** Static value Dataset for OutputPortType. */ - public static final OutputPortType DATASET = new OutputPortType("Dataset"); - - private String value; - - /** - * Creates a custom value for OutputPortType. - * @param value the custom value - */ - public OutputPortType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof OutputPortType)) { - return false; - } - if (obj == this) { - return true; - } - OutputPortType rhs = (OutputPortType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ParameterType.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ParameterType.java deleted file mode 100755 index 011f32c023c..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ParameterType.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ParameterType. - */ -public final class ParameterType { - /** Static value String for ParameterType. */ - public static final ParameterType STRING = new ParameterType("String"); - - /** Static value Int for ParameterType. */ - public static final ParameterType INT = new ParameterType("Int"); - - /** Static value Float for ParameterType. */ - public static final ParameterType FLOAT = new ParameterType("Float"); - - /** Static value Enumerated for ParameterType. */ - public static final ParameterType ENUMERATED = new ParameterType("Enumerated"); - - /** Static value Script for ParameterType. */ - public static final ParameterType SCRIPT = new ParameterType("Script"); - - /** Static value Mode for ParameterType. */ - public static final ParameterType MODE = new ParameterType("Mode"); - - /** Static value Credential for ParameterType. */ - public static final ParameterType CREDENTIAL = new ParameterType("Credential"); - - /** Static value Boolean for ParameterType. */ - public static final ParameterType BOOLEAN = new ParameterType("Boolean"); - - /** Static value Double for ParameterType. */ - public static final ParameterType DOUBLE = new ParameterType("Double"); - - /** Static value ColumnPicker for ParameterType. */ - public static final ParameterType COLUMN_PICKER = new ParameterType("ColumnPicker"); - - /** Static value ParameterRange for ParameterType. */ - public static final ParameterType PARAMETER_RANGE = new ParameterType("ParameterRange"); - - /** Static value DataGatewayName for ParameterType. */ - public static final ParameterType DATA_GATEWAY_NAME = new ParameterType("DataGatewayName"); - - private String value; - - /** - * Creates a custom value for ParameterType. - * @param value the custom value - */ - public ParameterType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ParameterType)) { - return false; - } - if (obj == this) { - return true; - } - ParameterType rhs = (ParameterType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ProvisioningState.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ProvisioningState.java deleted file mode 100755 index 632433803fc..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ProvisioningState.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ProvisioningState. - */ -public final class ProvisioningState { - /** Static value Unknown for ProvisioningState. */ - public static final ProvisioningState UNKNOWN = new ProvisioningState("Unknown"); - - /** Static value Provisioning for ProvisioningState. */ - public static final ProvisioningState PROVISIONING = new ProvisioningState("Provisioning"); - - /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = new ProvisioningState("Succeeded"); - - /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = new ProvisioningState("Failed"); - - private String value; - - /** - * Creates a custom value for ProvisioningState. - * @param value the custom value - */ - public ProvisioningState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ProvisioningState)) { - return false; - } - if (obj == this) { - return true; - } - ProvisioningState rhs = (ProvisioningState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/RealtimeConfiguration.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/RealtimeConfiguration.java deleted file mode 100755 index e01e83c63e4..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/RealtimeConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Holds the available configuration options for an Azure ML web service - * endpoint. - */ -public class RealtimeConfiguration { - /** - * Specifies the maximum concurrent calls that can be made to the web - * service. Minimum value: 4, Maximum value: 200. - */ - @JsonProperty(value = "maxConcurrentCalls") - private Integer maxConcurrentCalls; - - /** - * Get the maxConcurrentCalls value. - * - * @return the maxConcurrentCalls value - */ - public Integer maxConcurrentCalls() { - return this.maxConcurrentCalls; - } - - /** - * Set the maxConcurrentCalls value. - * - * @param maxConcurrentCalls the maxConcurrentCalls value to set - * @return the RealtimeConfiguration object itself. - */ - public RealtimeConfiguration withMaxConcurrentCalls(Integer maxConcurrentCalls) { - this.maxConcurrentCalls = maxConcurrentCalls; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ServiceInputOutputSpecification.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ServiceInputOutputSpecification.java deleted file mode 100755 index 2534a856c4e..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ServiceInputOutputSpecification.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The swagger 2.0 schema describing the service's inputs or outputs. See - * Swagger specification: http://swagger.io/specification/. - */ -public class ServiceInputOutputSpecification { - /** - * The title of your Swagger schema. - */ - @JsonProperty(value = "title") - private String title; - - /** - * The description of the Swagger schema. - */ - @JsonProperty(value = "description") - private String description; - - /** - * The type of the entity described in swagger. Always 'object'. - */ - @JsonProperty(value = "type", required = true) - private String type; - - /** - * Specifies a collection that contains the column schema for each input or - * output of the web service. For more information, see the Swagger - * specification. - */ - @JsonProperty(value = "properties", required = true) - private Map properties; - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the ServiceInputOutputSpecification object itself. - */ - public ServiceInputOutputSpecification withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the ServiceInputOutputSpecification object itself. - */ - public ServiceInputOutputSpecification withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ServiceInputOutputSpecification object itself. - */ - public ServiceInputOutputSpecification withType(String type) { - this.type = type; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the ServiceInputOutputSpecification object itself. - */ - public ServiceInputOutputSpecification withProperties(Map properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/StorageAccount.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/StorageAccount.java deleted file mode 100755 index c2dc2d0b76e..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/StorageAccount.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Access information for a storage account. - */ -public class StorageAccount { - /** - * Specifies the name of the storage account. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Specifies the key used to access the storage account. - */ - @JsonProperty(value = "key") - private String key; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the StorageAccount object itself. - */ - public StorageAccount withName(String name) { - this.name = name; - return this; - } - - /** - * Get the key value. - * - * @return the key value - */ - public String key() { - return this.key; - } - - /** - * Set the key value. - * - * @param key the key value to set - * @return the StorageAccount object itself. - */ - public StorageAccount withKey(String key) { - this.key = key; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/TableSpecification.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/TableSpecification.java deleted file mode 100755 index 2d8ea8893a7..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/TableSpecification.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The swagger 2.0 schema describing a single service input or output. See - * Swagger specification: http://swagger.io/specification/. - */ -public class TableSpecification { - /** - * Swagger schema title. - */ - @JsonProperty(value = "title") - private String title; - - /** - * Swagger schema description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * The type of the entity described in swagger. - */ - @JsonProperty(value = "type", required = true) - private String type; - - /** - * The format, if 'type' is not 'object'. - */ - @JsonProperty(value = "format") - private String format; - - /** - * The set of columns within the data table. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the TableSpecification object itself. - */ - public TableSpecification withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the TableSpecification object itself. - */ - public TableSpecification withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the TableSpecification object itself. - */ - public TableSpecification withType(String type) { - this.type = type; - return this; - } - - /** - * Get the format value. - * - * @return the format value - */ - public String format() { - return this.format; - } - - /** - * Set the format value. - * - * @param format the format value to set - * @return the TableSpecification object itself. - */ - public TableSpecification withFormat(String format) { - this.format = format; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the TableSpecification object itself. - */ - public TableSpecification withProperties(Map properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServiceParameter.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServiceParameter.java deleted file mode 100755 index ef52b984a67..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServiceParameter.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Web Service Parameter object for node and global parameter. - */ -public class WebServiceParameter { - /** - * The parameter value. - */ - @JsonProperty(value = "value") - private Object value; - - /** - * If the parameter value in 'value' field is encrypted, the thumbprint of - * the certificate should be put here. - */ - @JsonProperty(value = "certificateThumbprint") - private String certificateThumbprint; - - /** - * Get the value value. - * - * @return the value value - */ - public Object value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the WebServiceParameter object itself. - */ - public WebServiceParameter withValue(Object value) { - this.value = value; - return this; - } - - /** - * Get the certificateThumbprint value. - * - * @return the certificateThumbprint value - */ - public String certificateThumbprint() { - return this.certificateThumbprint; - } - - /** - * Set the certificateThumbprint value. - * - * @param certificateThumbprint the certificateThumbprint value to set - * @return the WebServiceParameter object itself. - */ - public WebServiceParameter withCertificateThumbprint(String certificateThumbprint) { - this.certificateThumbprint = certificateThumbprint; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServiceProperties.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServiceProperties.java deleted file mode 100755 index 6a4fe5ea629..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServiceProperties.java +++ /dev/null @@ -1,560 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.machinelearning.implementation.WebServiceKeysInner; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * The set of properties specific to the Azure ML web service resource. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "packageType") -@JsonTypeName("WebServiceProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Graph", value = WebServicePropertiesForGraph.class) -}) -public class WebServiceProperties { - /** - * The title of the web service. - */ - @JsonProperty(value = "title") - private String title; - - /** - * The description of the web service. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Read Only: The date and time when the web service was created. - */ - @JsonProperty(value = "createdOn", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdOn; - - /** - * Read Only: The date and time when the web service was last modified. - */ - @JsonProperty(value = "modifiedOn", access = JsonProperty.Access.WRITE_ONLY) - private DateTime modifiedOn; - - /** - * Read Only: The provision state of the web service. Valid values are - * Unknown, Provisioning, Succeeded, and Failed. Possible values include: - * 'Unknown', 'Provisioning', 'Succeeded', 'Failed'. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /** - * Contains the web service provisioning keys. If you do not specify - * provisioning keys, the Azure Machine Learning system generates them for - * you. Note: The keys are not returned from calls to GET operations. - */ - @JsonProperty(value = "keys") - private WebServiceKeysInner keys; - - /** - * When set to true, indicates that the web service is read-only and can no - * longer be updated or patched, only removed. Default, is false. Note: - * Once set to true, you cannot change its value. - */ - @JsonProperty(value = "readOnly") - private Boolean readOnly; - - /** - * Read Only: Contains the URI of the swagger spec associated with this web - * service. - */ - @JsonProperty(value = "swaggerLocation", access = JsonProperty.Access.WRITE_ONLY) - private String swaggerLocation; - - /** - * When set to true, sample data is included in the web service's swagger - * definition. The default value is true. - */ - @JsonProperty(value = "exposeSampleData") - private Boolean exposeSampleData; - - /** - * Contains the configuration settings for the web service endpoint. - */ - @JsonProperty(value = "realtimeConfiguration") - private RealtimeConfiguration realtimeConfiguration; - - /** - * Settings controlling the diagnostics traces collection for the web - * service. - */ - @JsonProperty(value = "diagnostics") - private DiagnosticsConfiguration diagnostics; - - /** - * Specifies the storage account that Azure Machine Learning uses to store - * information about the web service. Only the name of the storage account - * is returned from calls to GET operations. When updating the storage - * account information, you must ensure that all necessary assets are - * available in the new storage account or calls to your web service will - * fail. - */ - @JsonProperty(value = "storageAccount") - private StorageAccount storageAccount; - - /** - * Specifies the Machine Learning workspace containing the experiment that - * is source for the web service. - */ - @JsonProperty(value = "machineLearningWorkspace") - private MachineLearningWorkspace machineLearningWorkspace; - - /** - * Contains the commitment plan associated with this web service. Set at - * creation time. Once set, this value cannot be changed. Note: The - * commitment plan is not returned from calls to GET operations. - */ - @JsonProperty(value = "commitmentPlan") - private CommitmentPlan commitmentPlan; - - /** - * Contains the Swagger 2.0 schema describing one or more of the web - * service's inputs. For more information, see the Swagger specification. - */ - @JsonProperty(value = "input") - private ServiceInputOutputSpecification input; - - /** - * Contains the Swagger 2.0 schema describing one or more of the web - * service's outputs. For more information, see the Swagger specification. - */ - @JsonProperty(value = "output") - private ServiceInputOutputSpecification output; - - /** - * Defines sample input data for one or more of the service's inputs. - */ - @JsonProperty(value = "exampleRequest") - private ExampleRequest exampleRequest; - - /** - * Contains user defined properties describing web service assets. - * Properties are expressed as Key/Value pairs. - */ - @JsonProperty(value = "assets") - private Map assets; - - /** - * The set of global parameters values defined for the web service, given - * as a global parameter name to default value map. If no default value is - * specified, the parameter is considered to be required. - */ - @JsonProperty(value = "parameters") - private Map parameters; - - /** - * When set to true, indicates that the payload size is larger than 3 MB. - * Otherwise false. If the payload size exceed 3 MB, the payload is stored - * in a blob and the PayloadsLocation parameter contains the URI of the - * blob. Otherwise, this will be set to false and Assets, Input, Output, - * Package, Parameters, ExampleRequest are inline. The Payload sizes is - * determined by adding the size of the Assets, Input, Output, Package, - * Parameters, and the ExampleRequest. - */ - @JsonProperty(value = "payloadsInBlobStorage") - private Boolean payloadsInBlobStorage; - - /** - * The URI of the payload blob. This paramater contains a value only if the - * payloadsInBlobStorage parameter is set to true. Otherwise is set to - * null. - */ - @JsonProperty(value = "payloadsLocation") - private BlobLocation payloadsLocation; - - /** - * Get the title value. - * - * @return the title value - */ - public String title() { - return this.title; - } - - /** - * Set the title value. - * - * @param title the title value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdOn value. - * - * @return the createdOn value - */ - public DateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn value. - * - * @return the modifiedOn value - */ - public DateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the keys value. - * - * @return the keys value - */ - public WebServiceKeysInner keys() { - return this.keys; - } - - /** - * Set the keys value. - * - * @param keys the keys value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withKeys(WebServiceKeysInner keys) { - this.keys = keys; - return this; - } - - /** - * Get the readOnly value. - * - * @return the readOnly value - */ - public Boolean readOnly() { - return this.readOnly; - } - - /** - * Set the readOnly value. - * - * @param readOnly the readOnly value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withReadOnly(Boolean readOnly) { - this.readOnly = readOnly; - return this; - } - - /** - * Get the swaggerLocation value. - * - * @return the swaggerLocation value - */ - public String swaggerLocation() { - return this.swaggerLocation; - } - - /** - * Get the exposeSampleData value. - * - * @return the exposeSampleData value - */ - public Boolean exposeSampleData() { - return this.exposeSampleData; - } - - /** - * Set the exposeSampleData value. - * - * @param exposeSampleData the exposeSampleData value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withExposeSampleData(Boolean exposeSampleData) { - this.exposeSampleData = exposeSampleData; - return this; - } - - /** - * Get the realtimeConfiguration value. - * - * @return the realtimeConfiguration value - */ - public RealtimeConfiguration realtimeConfiguration() { - return this.realtimeConfiguration; - } - - /** - * Set the realtimeConfiguration value. - * - * @param realtimeConfiguration the realtimeConfiguration value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withRealtimeConfiguration(RealtimeConfiguration realtimeConfiguration) { - this.realtimeConfiguration = realtimeConfiguration; - return this; - } - - /** - * Get the diagnostics value. - * - * @return the diagnostics value - */ - public DiagnosticsConfiguration diagnostics() { - return this.diagnostics; - } - - /** - * Set the diagnostics value. - * - * @param diagnostics the diagnostics value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withDiagnostics(DiagnosticsConfiguration diagnostics) { - this.diagnostics = diagnostics; - return this; - } - - /** - * Get the storageAccount value. - * - * @return the storageAccount value - */ - public StorageAccount storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount value. - * - * @param storageAccount the storageAccount value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withStorageAccount(StorageAccount storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Get the machineLearningWorkspace value. - * - * @return the machineLearningWorkspace value - */ - public MachineLearningWorkspace machineLearningWorkspace() { - return this.machineLearningWorkspace; - } - - /** - * Set the machineLearningWorkspace value. - * - * @param machineLearningWorkspace the machineLearningWorkspace value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withMachineLearningWorkspace(MachineLearningWorkspace machineLearningWorkspace) { - this.machineLearningWorkspace = machineLearningWorkspace; - return this; - } - - /** - * Get the commitmentPlan value. - * - * @return the commitmentPlan value - */ - public CommitmentPlan commitmentPlan() { - return this.commitmentPlan; - } - - /** - * Set the commitmentPlan value. - * - * @param commitmentPlan the commitmentPlan value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withCommitmentPlan(CommitmentPlan commitmentPlan) { - this.commitmentPlan = commitmentPlan; - return this; - } - - /** - * Get the input value. - * - * @return the input value - */ - public ServiceInputOutputSpecification input() { - return this.input; - } - - /** - * Set the input value. - * - * @param input the input value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withInput(ServiceInputOutputSpecification input) { - this.input = input; - return this; - } - - /** - * Get the output value. - * - * @return the output value - */ - public ServiceInputOutputSpecification output() { - return this.output; - } - - /** - * Set the output value. - * - * @param output the output value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withOutput(ServiceInputOutputSpecification output) { - this.output = output; - return this; - } - - /** - * Get the exampleRequest value. - * - * @return the exampleRequest value - */ - public ExampleRequest exampleRequest() { - return this.exampleRequest; - } - - /** - * Set the exampleRequest value. - * - * @param exampleRequest the exampleRequest value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withExampleRequest(ExampleRequest exampleRequest) { - this.exampleRequest = exampleRequest; - return this; - } - - /** - * Get the assets value. - * - * @return the assets value - */ - public Map assets() { - return this.assets; - } - - /** - * Set the assets value. - * - * @param assets the assets value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withAssets(Map assets) { - this.assets = assets; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public Map parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withParameters(Map parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the payloadsInBlobStorage value. - * - * @return the payloadsInBlobStorage value - */ - public Boolean payloadsInBlobStorage() { - return this.payloadsInBlobStorage; - } - - /** - * Set the payloadsInBlobStorage value. - * - * @param payloadsInBlobStorage the payloadsInBlobStorage value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withPayloadsInBlobStorage(Boolean payloadsInBlobStorage) { - this.payloadsInBlobStorage = payloadsInBlobStorage; - return this; - } - - /** - * Get the payloadsLocation value. - * - * @return the payloadsLocation value - */ - public BlobLocation payloadsLocation() { - return this.payloadsLocation; - } - - /** - * Set the payloadsLocation value. - * - * @param payloadsLocation the payloadsLocation value to set - * @return the WebServiceProperties object itself. - */ - public WebServiceProperties withPayloadsLocation(BlobLocation payloadsLocation) { - this.payloadsLocation = payloadsLocation; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServicePropertiesForGraph.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServicePropertiesForGraph.java deleted file mode 100755 index 8f15b120914..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/WebServicePropertiesForGraph.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Properties specific to a Graph based web service. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "packageType") -@JsonTypeName("Graph") -public class WebServicePropertiesForGraph extends WebServiceProperties { - /** - * The definition of the graph package making up this web service. - */ - @JsonProperty(value = "package") - private GraphPackage packageProperty; - - /** - * Get the packageProperty value. - * - * @return the packageProperty value - */ - public GraphPackage packageProperty() { - return this.packageProperty; - } - - /** - * Set the packageProperty value. - * - * @param packageProperty the packageProperty value to set - * @return the WebServicePropertiesForGraph object itself. - */ - public WebServicePropertiesForGraph withPackageProperty(GraphPackage packageProperty) { - this.packageProperty = packageProperty; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/AsyncOperationStatusInner.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/AsyncOperationStatusInner.java deleted file mode 100755 index 69d826150ef..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/AsyncOperationStatusInner.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning.implementation; - -import com.microsoft.azure.management.machinelearning.ProvisioningState; -import org.joda.time.DateTime; -import com.microsoft.azure.management.machinelearning.AsyncOperationErrorInfo; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Azure async operation status. - */ -public class AsyncOperationStatusInner { - /** - * Async operation id. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Async operation name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Read Only: The provisioning state of the web service. Valid values are - * Unknown, Provisioning, Succeeded, and Failed. Possible values include: - * 'Unknown', 'Provisioning', 'Succeeded', 'Failed'. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /** - * The date time that the async operation started. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime startTime; - - /** - * The date time that the async operation finished. - */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime endTime; - - /** - * Async operation progress. - */ - @JsonProperty(value = "percentComplete") - private Double percentComplete; - - /** - * If the async operation fails, this structure contains the error details. - */ - @JsonProperty(value = "errorInfo") - private AsyncOperationErrorInfo errorInfo; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the AsyncOperationStatusInner object itself. - */ - public AsyncOperationStatusInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the AsyncOperationStatusInner object itself. - */ - public AsyncOperationStatusInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Get the percentComplete value. - * - * @return the percentComplete value - */ - public Double percentComplete() { - return this.percentComplete; - } - - /** - * Set the percentComplete value. - * - * @param percentComplete the percentComplete value to set - * @return the AsyncOperationStatusInner object itself. - */ - public AsyncOperationStatusInner withPercentComplete(Double percentComplete) { - this.percentComplete = percentComplete; - return this; - } - - /** - * Get the errorInfo value. - * - * @return the errorInfo value - */ - public AsyncOperationErrorInfo errorInfo() { - return this.errorInfo; - } - - /** - * Set the errorInfo value. - * - * @param errorInfo the errorInfo value to set - * @return the AsyncOperationStatusInner object itself. - */ - public AsyncOperationStatusInner withErrorInfo(AsyncOperationErrorInfo errorInfo) { - this.errorInfo = errorInfo; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/AzureMLWebServicesManagementClientImpl.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/AzureMLWebServicesManagementClientImpl.java deleted file mode 100755 index ec4d03449b9..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/AzureMLWebServicesManagementClientImpl.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the AzureMLWebServicesManagementClientImpl class. - */ -public class AzureMLWebServicesManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** The Azure subscription ID. */ - private String subscriptionId; - - /** - * Gets The Azure subscription ID. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets The Azure subscription ID. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public AzureMLWebServicesManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** The version of the Microsoft.MachineLearning resource provider API to use. */ - private String apiVersion; - - /** - * Gets The version of the Microsoft.MachineLearning resource provider API to use. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public AzureMLWebServicesManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public AzureMLWebServicesManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public AzureMLWebServicesManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The WebServicesInner object to access its operations. - */ - private WebServicesInner webServices; - - /** - * Gets the WebServicesInner object to access its operations. - * @return the WebServicesInner object. - */ - public WebServicesInner webServices() { - return this.webServices; - } - - /** - * Initializes an instance of AzureMLWebServicesManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public AzureMLWebServicesManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of AzureMLWebServicesManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public AzureMLWebServicesManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of AzureMLWebServicesManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public AzureMLWebServicesManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2017-01-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.webServices = new WebServicesInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "AzureMLWebServicesManagementClient", "2017-01-01"); - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/MachineLearningManager.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/MachineLearningManager.java deleted file mode 100755 index af289520913..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/MachineLearningManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure MachineLearning resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class MachineLearningManager extends Manager { - /** - * Get a Configurable instance that can be used to create MachineLearningManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new MachineLearningManager.ConfigurableImpl(); - } - /** - * Creates an instance of MachineLearningManager that exposes MachineLearning resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the MachineLearningManager - */ - public static MachineLearningManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new MachineLearningManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of MachineLearningManager that exposes MachineLearning resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the MachineLearningManager - */ - public static MachineLearningManager authenticate(RestClient restClient, String subscriptionId) { - return new MachineLearningManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of MachineLearningManager that exposes MachineLearning management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing MachineLearning management API entry points that work across subscriptions - */ - MachineLearningManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public MachineLearningManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return MachineLearningManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private MachineLearningManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new AzureMLWebServicesManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/PageImpl.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/PageImpl.java deleted file mode 100755 index a7754fb7d75..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServiceInner.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServiceInner.java deleted file mode 100755 index 097f5a99c05..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServiceInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning.implementation; - -import com.microsoft.azure.management.machinelearning.WebServiceProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; - -/** - * Instance of an Azure ML web service resource. - */ -public class WebServiceInner extends Resource { - /** - * Contains the property payload that describes the web service. - */ - @JsonProperty(value = "properties", required = true) - private WebServiceProperties properties; - - /** - * Get the properties value. - * - * @return the properties value - */ - public WebServiceProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the WebServiceInner object itself. - */ - public WebServiceInner withProperties(WebServiceProperties properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServiceKeysInner.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServiceKeysInner.java deleted file mode 100755 index a5a2b35646c..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServiceKeysInner.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Access keys for the web service calls. - */ -public class WebServiceKeysInner { - /** - * The primary access key. - */ - @JsonProperty(value = "primary") - private String primary; - - /** - * The secondary access key. - */ - @JsonProperty(value = "secondary") - private String secondary; - - /** - * Get the primary value. - * - * @return the primary value - */ - public String primary() { - return this.primary; - } - - /** - * Set the primary value. - * - * @param primary the primary value to set - * @return the WebServiceKeysInner object itself. - */ - public WebServiceKeysInner withPrimary(String primary) { - this.primary = primary; - return this; - } - - /** - * Get the secondary value. - * - * @return the secondary value - */ - public String secondary() { - return this.secondary; - } - - /** - * Set the secondary value. - * - * @param secondary the secondary value to set - * @return the WebServiceKeysInner object itself. - */ - public WebServiceKeysInner withSecondary(String secondary) { - this.secondary = secondary; - return this; - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServicesInner.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServicesInner.java deleted file mode 100755 index 1ad865c3d26..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/WebServicesInner.java +++ /dev/null @@ -1,1713 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.machinelearning.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WebServices. - */ -public class WebServicesInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private WebServicesService service; - /** The service client containing this operation class. */ - private AzureMLWebServicesManagementClientImpl client; - - /** - * Initializes an instance of WebServicesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WebServicesInner(Retrofit retrofit, AzureMLWebServicesManagementClientImpl client) { - this.service = retrofit.create(WebServicesService.class); - this.client = client; - } - - /** - * The interface defining all the services for WebServices to be - * used by Retrofit to perform actually REST calls. - */ - interface WebServicesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Body WebServiceInner createOrUpdatePayload, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Body WebServiceInner createOrUpdatePayload, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Query("region") String region, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices patch" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}") - Observable> patch(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Body WebServiceInner patchPayload, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices beginPatch" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}") - Observable> beginPatch(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Body WebServiceInner patchPayload, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices createRegionalProperties" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}/CreateRegionalBlob") - Observable> createRegionalProperties(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Query("region") String region, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices beginCreateRegionalProperties" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}/CreateRegionalBlob") - Observable> beginCreateRegionalProperties(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Query("region") String region, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices listKeys" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("webServiceName") String webServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("$skiptoken") String skiptoken, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices listBySubscriptionId" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.MachineLearning/webServices") - Observable> listBySubscriptionId(@Path("subscriptionId") String subscriptionId, @Query("$skiptoken") String skiptoken, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearning.WebServices listBySubscriptionIdNext" }) - @GET - Observable> listBySubscriptionIdNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param createOrUpdatePayload The payload that is used to create or update the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WebServiceInner object if successful. - */ - public WebServiceInner createOrUpdate(String resourceGroupName, String webServiceName, WebServiceInner createOrUpdatePayload) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, webServiceName, createOrUpdatePayload).toBlocking().last().body(); - } - - /** - * Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param createOrUpdatePayload The payload that is used to create or update the web service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String webServiceName, WebServiceInner createOrUpdatePayload, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, webServiceName, createOrUpdatePayload), serviceCallback); - } - - /** - * Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param createOrUpdatePayload The payload that is used to create or update the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String webServiceName, WebServiceInner createOrUpdatePayload) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, webServiceName, createOrUpdatePayload).map(new Func1, WebServiceInner>() { - @Override - public WebServiceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param createOrUpdatePayload The payload that is used to create or update the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String webServiceName, WebServiceInner createOrUpdatePayload) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (createOrUpdatePayload == null) { - throw new IllegalArgumentException("Parameter createOrUpdatePayload is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(createOrUpdatePayload); - Observable> observable = service.createOrUpdate(resourceGroupName, webServiceName, this.client.subscriptionId(), createOrUpdatePayload, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param createOrUpdatePayload The payload that is used to create or update the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WebServiceInner object if successful. - */ - public WebServiceInner beginCreateOrUpdate(String resourceGroupName, String webServiceName, WebServiceInner createOrUpdatePayload) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, webServiceName, createOrUpdatePayload).toBlocking().single().body(); - } - - /** - * Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param createOrUpdatePayload The payload that is used to create or update the web service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String webServiceName, WebServiceInner createOrUpdatePayload, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, webServiceName, createOrUpdatePayload), serviceCallback); - } - - /** - * Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param createOrUpdatePayload The payload that is used to create or update the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String webServiceName, WebServiceInner createOrUpdatePayload) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, webServiceName, createOrUpdatePayload).map(new Func1, WebServiceInner>() { - @Override - public WebServiceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param createOrUpdatePayload The payload that is used to create or update the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String webServiceName, WebServiceInner createOrUpdatePayload) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (createOrUpdatePayload == null) { - throw new IllegalArgumentException("Parameter createOrUpdatePayload is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(createOrUpdatePayload); - return service.beginCreateOrUpdate(resourceGroupName, webServiceName, this.client.subscriptionId(), createOrUpdatePayload, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WebServiceInner object if successful. - */ - public WebServiceInner getByResourceGroup(String resourceGroupName, String webServiceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, webServiceName).toBlocking().single().body(); - } - - /** - * Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String webServiceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, webServiceName), serviceCallback); - } - - /** - * Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String webServiceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, webServiceName).map(new Func1, WebServiceInner>() { - @Override - public WebServiceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String webServiceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String region = null; - return service.getByResourceGroup(resourceGroupName, webServiceName, this.client.subscriptionId(), region, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are valid. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WebServiceInner object if successful. - */ - public WebServiceInner getByResourceGroup(String resourceGroupName, String webServiceName, String region) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, webServiceName, region).toBlocking().single().body(); - } - - /** - * Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are valid. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String webServiceName, String region, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, webServiceName, region), serviceCallback); - } - - /** - * Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are valid. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String webServiceName, String region) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, webServiceName, region).map(new Func1, WebServiceInner>() { - @Override - public WebServiceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are valid. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String webServiceName, String region) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, webServiceName, this.client.subscriptionId(), region, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param patchPayload The payload to use to patch the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WebServiceInner object if successful. - */ - public WebServiceInner patch(String resourceGroupName, String webServiceName, WebServiceInner patchPayload) { - return patchWithServiceResponseAsync(resourceGroupName, webServiceName, patchPayload).toBlocking().last().body(); - } - - /** - * Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param patchPayload The payload to use to patch the web service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture patchAsync(String resourceGroupName, String webServiceName, WebServiceInner patchPayload, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, webServiceName, patchPayload), serviceCallback); - } - - /** - * Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param patchPayload The payload to use to patch the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable patchAsync(String resourceGroupName, String webServiceName, WebServiceInner patchPayload) { - return patchWithServiceResponseAsync(resourceGroupName, webServiceName, patchPayload).map(new Func1, WebServiceInner>() { - @Override - public WebServiceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param patchPayload The payload to use to patch the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> patchWithServiceResponseAsync(String resourceGroupName, String webServiceName, WebServiceInner patchPayload) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (patchPayload == null) { - throw new IllegalArgumentException("Parameter patchPayload is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(patchPayload); - Observable> observable = service.patch(resourceGroupName, webServiceName, this.client.subscriptionId(), patchPayload, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param patchPayload The payload to use to patch the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WebServiceInner object if successful. - */ - public WebServiceInner beginPatch(String resourceGroupName, String webServiceName, WebServiceInner patchPayload) { - return beginPatchWithServiceResponseAsync(resourceGroupName, webServiceName, patchPayload).toBlocking().single().body(); - } - - /** - * Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param patchPayload The payload to use to patch the web service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginPatchAsync(String resourceGroupName, String webServiceName, WebServiceInner patchPayload, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginPatchWithServiceResponseAsync(resourceGroupName, webServiceName, patchPayload), serviceCallback); - } - - /** - * Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param patchPayload The payload to use to patch the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceInner object - */ - public Observable beginPatchAsync(String resourceGroupName, String webServiceName, WebServiceInner patchPayload) { - return beginPatchWithServiceResponseAsync(resourceGroupName, webServiceName, patchPayload).map(new Func1, WebServiceInner>() { - @Override - public WebServiceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param patchPayload The payload to use to patch the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceInner object - */ - public Observable> beginPatchWithServiceResponseAsync(String resourceGroupName, String webServiceName, WebServiceInner patchPayload) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (patchPayload == null) { - throw new IllegalArgumentException("Parameter patchPayload is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(patchPayload); - return service.beginPatch(resourceGroupName, webServiceName, this.client.subscriptionId(), patchPayload, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginPatchDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginPatchDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String webServiceName) { - deleteWithServiceResponseAsync(resourceGroupName, webServiceName).toBlocking().last().body(); - } - - /** - * Deletes the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String webServiceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, webServiceName), serviceCallback); - } - - /** - * Deletes the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String webServiceName) { - return deleteWithServiceResponseAsync(resourceGroupName, webServiceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String webServiceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, webServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String webServiceName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, webServiceName).toBlocking().single().body(); - } - - /** - * Deletes the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String webServiceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, webServiceName), serviceCallback); - } - - /** - * Deletes the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String webServiceName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, webServiceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String webServiceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, webServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AsyncOperationStatusInner object if successful. - */ - public AsyncOperationStatusInner createRegionalProperties(String resourceGroupName, String webServiceName, String region) { - return createRegionalPropertiesWithServiceResponseAsync(resourceGroupName, webServiceName, region).toBlocking().last().body(); - } - - /** - * Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are created. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createRegionalPropertiesAsync(String resourceGroupName, String webServiceName, String region, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createRegionalPropertiesWithServiceResponseAsync(resourceGroupName, webServiceName, region), serviceCallback); - } - - /** - * Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createRegionalPropertiesAsync(String resourceGroupName, String webServiceName, String region) { - return createRegionalPropertiesWithServiceResponseAsync(resourceGroupName, webServiceName, region).map(new Func1, AsyncOperationStatusInner>() { - @Override - public AsyncOperationStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createRegionalPropertiesWithServiceResponseAsync(String resourceGroupName, String webServiceName, String region) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (region == null) { - throw new IllegalArgumentException("Parameter region is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.createRegionalProperties(resourceGroupName, webServiceName, this.client.subscriptionId(), region, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AsyncOperationStatusInner object if successful. - */ - public AsyncOperationStatusInner beginCreateRegionalProperties(String resourceGroupName, String webServiceName, String region) { - return beginCreateRegionalPropertiesWithServiceResponseAsync(resourceGroupName, webServiceName, region).toBlocking().single().body(); - } - - /** - * Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are created. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateRegionalPropertiesAsync(String resourceGroupName, String webServiceName, String region, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateRegionalPropertiesWithServiceResponseAsync(resourceGroupName, webServiceName, region), serviceCallback); - } - - /** - * Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AsyncOperationStatusInner object - */ - public Observable beginCreateRegionalPropertiesAsync(String resourceGroupName, String webServiceName, String region) { - return beginCreateRegionalPropertiesWithServiceResponseAsync(resourceGroupName, webServiceName, region).map(new Func1, AsyncOperationStatusInner>() { - @Override - public AsyncOperationStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param region The region for which encrypted credential parameters are created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AsyncOperationStatusInner object - */ - public Observable> beginCreateRegionalPropertiesWithServiceResponseAsync(String resourceGroupName, String webServiceName, String region) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (region == null) { - throw new IllegalArgumentException("Parameter region is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginCreateRegionalProperties(resourceGroupName, webServiceName, this.client.subscriptionId(), region, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateRegionalPropertiesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateRegionalPropertiesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the access keys for the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WebServiceKeysInner object if successful. - */ - public WebServiceKeysInner listKeys(String resourceGroupName, String webServiceName) { - return listKeysWithServiceResponseAsync(resourceGroupName, webServiceName).toBlocking().single().body(); - } - - /** - * Gets the access keys for the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String webServiceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, webServiceName), serviceCallback); - } - - /** - * Gets the access keys for the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String webServiceName) { - return listKeysWithServiceResponseAsync(resourceGroupName, webServiceName).map(new Func1, WebServiceKeysInner>() { - @Override - public WebServiceKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the access keys for the specified web service. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param webServiceName The name of the web service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WebServiceKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String webServiceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (webServiceName == null) { - throw new IllegalArgumentException("Parameter webServiceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(resourceGroupName, webServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WebServiceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WebServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String skiptoken = null; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param skiptoken Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WebServiceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName, final String skiptoken) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param skiptoken Continuation token for pagination. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String skiptoken, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param skiptoken Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final String skiptoken) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, skiptoken) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the web services in the specified resource group. - * - * @param resourceGroupName Name of the resource group in which the web service is located. - * @param skiptoken Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String skiptoken) { - return listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the web services in the specified resource group. - * - ServiceResponse> * @param resourceGroupName Name of the resource group in which the web service is located. - ServiceResponse> * @param skiptoken Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WebServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String skiptoken) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the web services in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WebServiceInner> object if successful. - */ - public PagedList listBySubscriptionId() { - ServiceResponse> response = listBySubscriptionIdSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionIdNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the web services in the specified subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionIdAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionIdSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionIdNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the web services in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable> listBySubscriptionIdAsync() { - return listBySubscriptionIdWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the web services in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable>> listBySubscriptionIdWithServiceResponseAsync() { - return listBySubscriptionIdSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionIdNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the web services in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WebServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionIdSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String skiptoken = null; - return service.listBySubscriptionId(this.client.subscriptionId(), skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionIdDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets the web services in the specified subscription. - * - * @param skiptoken Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WebServiceInner> object if successful. - */ - public PagedList listBySubscriptionId(final String skiptoken) { - ServiceResponse> response = listBySubscriptionIdSinglePageAsync(skiptoken).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionIdNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the web services in the specified subscription. - * - * @param skiptoken Continuation token for pagination. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionIdAsync(final String skiptoken, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionIdSinglePageAsync(skiptoken), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionIdNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the web services in the specified subscription. - * - * @param skiptoken Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable> listBySubscriptionIdAsync(final String skiptoken) { - return listBySubscriptionIdWithServiceResponseAsync(skiptoken) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the web services in the specified subscription. - * - * @param skiptoken Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable>> listBySubscriptionIdWithServiceResponseAsync(final String skiptoken) { - return listBySubscriptionIdSinglePageAsync(skiptoken) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionIdNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the web services in the specified subscription. - * - ServiceResponse> * @param skiptoken Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WebServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionIdSinglePageAsync(final String skiptoken) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscriptionId(this.client.subscriptionId(), skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionIdDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionIdDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the web services in the specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WebServiceInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the web services in the specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the web services in the specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the web services in the specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the web services in the specified resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WebServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the web services in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WebServiceInner> object if successful. - */ - public PagedList listBySubscriptionIdNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionIdNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionIdNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the web services in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionIdNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionIdNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionIdNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the web services in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable> listBySubscriptionIdNextAsync(final String nextPageLink) { - return listBySubscriptionIdNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the web services in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WebServiceInner> object - */ - public Observable>> listBySubscriptionIdNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionIdNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionIdNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the web services in the specified subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WebServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionIdNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listBySubscriptionIdNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionIdNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionIdNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/package-info.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/package-info.java deleted file mode 100755 index 074ab02eb11..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for AzureMLWebServicesManagementClient. - * These APIs allow end users to operate on Azure Machine Learning Web Services resources. They support the following operations:
  • Create or update a web service
  • Get a web service
  • Patch a web service
  • Delete a web service
  • Get All Web Services in a Resource Group
  • Get All Web Services in a Subscription
  • Get Web Services Keys
. - */ -package com.microsoft.azure.management.machinelearning.implementation; diff --git a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/package-info.java b/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/package-info.java deleted file mode 100755 index a2e5ff15625..00000000000 --- a/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for AzureMLWebServicesManagementClient. - * These APIs allow end users to operate on Azure Machine Learning Web Services resources. They support the following operations:
  • Create or update a web service
  • Get a web service
  • Patch a web service
  • Delete a web service
  • Get All Web Services in a Resource Group
  • Get All Web Services in a Subscription
  • Get Web Services Keys
. - */ -package com.microsoft.azure.management.machinelearning; diff --git a/azure-mgmt-notificationhubs/pom.xml b/azure-mgmt-notificationhubs/pom.xml deleted file mode 100644 index 51a87d14827..00000000000 --- a/azure-mgmt-notificationhubs/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-notificationhubs - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for NotificationHubs Management - This package contains Microsoft NotificationHubs Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AccessRights.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AccessRights.java deleted file mode 100644 index f2f0ba99a1e..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AccessRights.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AccessRights. - */ -public enum AccessRights { - /** Enum value Manage. */ - MANAGE("Manage"), - - /** Enum value Send. */ - SEND("Send"), - - /** Enum value Listen. */ - LISTEN("Listen"); - - /** The actual serialized value for a AccessRights instance. */ - private String value; - - AccessRights(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AccessRights instance. - * - * @param value the serialized value to parse. - * @return the parsed AccessRights object, or null if unable to parse. - */ - @JsonCreator - public static AccessRights fromString(String value) { - AccessRights[] items = AccessRights.values(); - for (AccessRights item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AdmCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AdmCredential.java deleted file mode 100644 index b4ad0a9ad2b..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AdmCredential.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Description of a NotificationHub AdmCredential. - */ -@JsonFlatten -public class AdmCredential { - /** - * The client identifier. - */ - @JsonProperty(value = "properties.clientId") - private String clientId; - - /** - * The credential secret access key. - */ - @JsonProperty(value = "properties.clientSecret") - private String clientSecret; - - /** - * The URL of the authorization token. - */ - @JsonProperty(value = "properties.authTokenUrl") - private String authTokenUrl; - - /** - * Get the clientId value. - * - * @return the clientId value - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId value. - * - * @param clientId the clientId value to set - * @return the AdmCredential object itself. - */ - public AdmCredential withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret value. - * - * @return the clientSecret value - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret value. - * - * @param clientSecret the clientSecret value to set - * @return the AdmCredential object itself. - */ - public AdmCredential withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the authTokenUrl value. - * - * @return the authTokenUrl value - */ - public String authTokenUrl() { - return this.authTokenUrl; - } - - /** - * Set the authTokenUrl value. - * - * @param authTokenUrl the authTokenUrl value to set - * @return the AdmCredential object itself. - */ - public AdmCredential withAuthTokenUrl(String authTokenUrl) { - this.authTokenUrl = authTokenUrl; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ApnsCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ApnsCredential.java deleted file mode 100644 index 031d1136c55..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ApnsCredential.java +++ /dev/null @@ -1,229 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Description of a NotificationHub ApnsCredential. - */ -@JsonFlatten -public class ApnsCredential { - /** - * The APNS certificate. - */ - @JsonProperty(value = "properties.apnsCertificate") - private String apnsCertificate; - - /** - * The certificate key. - */ - @JsonProperty(value = "properties.certificateKey") - private String certificateKey; - - /** - * The endpoint of this credential. - */ - @JsonProperty(value = "properties.endpoint") - private String endpoint; - - /** - * The Apns certificate Thumbprint. - */ - @JsonProperty(value = "properties.thumbprint") - private String thumbprint; - - /** - * A 10-character key identifier (kid) key, obtained from your developer - * account. - */ - @JsonProperty(value = "properties.keyId") - private String keyId; - - /** - * The name of the application. - */ - @JsonProperty(value = "properties.appName") - private String appName; - - /** - * The issuer (iss) registered claim key, whose value is your 10-character - * Team ID, obtained from your developer account. - */ - @JsonProperty(value = "properties.appId") - private String appId; - - /** - * Provider Authentication Token, obtained through your developer account. - */ - @JsonProperty(value = "properties.token") - private String token; - - /** - * Get the apnsCertificate value. - * - * @return the apnsCertificate value - */ - public String apnsCertificate() { - return this.apnsCertificate; - } - - /** - * Set the apnsCertificate value. - * - * @param apnsCertificate the apnsCertificate value to set - * @return the ApnsCredential object itself. - */ - public ApnsCredential withApnsCertificate(String apnsCertificate) { - this.apnsCertificate = apnsCertificate; - return this; - } - - /** - * Get the certificateKey value. - * - * @return the certificateKey value - */ - public String certificateKey() { - return this.certificateKey; - } - - /** - * Set the certificateKey value. - * - * @param certificateKey the certificateKey value to set - * @return the ApnsCredential object itself. - */ - public ApnsCredential withCertificateKey(String certificateKey) { - this.certificateKey = certificateKey; - return this; - } - - /** - * Get the endpoint value. - * - * @return the endpoint value - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint value. - * - * @param endpoint the endpoint value to set - * @return the ApnsCredential object itself. - */ - public ApnsCredential withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the thumbprint value. - * - * @return the thumbprint value - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint value. - * - * @param thumbprint the thumbprint value to set - * @return the ApnsCredential object itself. - */ - public ApnsCredential withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - - /** - * Get the keyId value. - * - * @return the keyId value - */ - public String keyId() { - return this.keyId; - } - - /** - * Set the keyId value. - * - * @param keyId the keyId value to set - * @return the ApnsCredential object itself. - */ - public ApnsCredential withKeyId(String keyId) { - this.keyId = keyId; - return this; - } - - /** - * Get the appName value. - * - * @return the appName value - */ - public String appName() { - return this.appName; - } - - /** - * Set the appName value. - * - * @param appName the appName value to set - * @return the ApnsCredential object itself. - */ - public ApnsCredential withAppName(String appName) { - this.appName = appName; - return this; - } - - /** - * Get the appId value. - * - * @return the appId value - */ - public String appId() { - return this.appId; - } - - /** - * Set the appId value. - * - * @param appId the appId value to set - * @return the ApnsCredential object itself. - */ - public ApnsCredential withAppId(String appId) { - this.appId = appId; - return this; - } - - /** - * Get the token value. - * - * @return the token value - */ - public String token() { - return this.token; - } - - /** - * Set the token value. - * - * @param token the token value to set - * @return the ApnsCredential object itself. - */ - public ApnsCredential withToken(String token) { - this.token = token; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/BaiduCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/BaiduCredential.java deleted file mode 100644 index 01a72cc75cc..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/BaiduCredential.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Description of a NotificationHub BaiduCredential. - */ -@JsonFlatten -public class BaiduCredential { - /** - * Baidu Api Key. - */ - @JsonProperty(value = "properties.baiduApiKey") - private String baiduApiKey; - - /** - * Baidu Endpoint. - */ - @JsonProperty(value = "properties.baiduEndPoint") - private String baiduEndPoint; - - /** - * Baidu Secret Key. - */ - @JsonProperty(value = "properties.baiduSecretKey") - private String baiduSecretKey; - - /** - * Get the baiduApiKey value. - * - * @return the baiduApiKey value - */ - public String baiduApiKey() { - return this.baiduApiKey; - } - - /** - * Set the baiduApiKey value. - * - * @param baiduApiKey the baiduApiKey value to set - * @return the BaiduCredential object itself. - */ - public BaiduCredential withBaiduApiKey(String baiduApiKey) { - this.baiduApiKey = baiduApiKey; - return this; - } - - /** - * Get the baiduEndPoint value. - * - * @return the baiduEndPoint value - */ - public String baiduEndPoint() { - return this.baiduEndPoint; - } - - /** - * Set the baiduEndPoint value. - * - * @param baiduEndPoint the baiduEndPoint value to set - * @return the BaiduCredential object itself. - */ - public BaiduCredential withBaiduEndPoint(String baiduEndPoint) { - this.baiduEndPoint = baiduEndPoint; - return this; - } - - /** - * Get the baiduSecretKey value. - * - * @return the baiduSecretKey value - */ - public String baiduSecretKey() { - return this.baiduSecretKey; - } - - /** - * Set the baiduSecretKey value. - * - * @param baiduSecretKey the baiduSecretKey value to set - * @return the BaiduCredential object itself. - */ - public BaiduCredential withBaiduSecretKey(String baiduSecretKey) { - this.baiduSecretKey = baiduSecretKey; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/CheckNameAvailabilityRequestParameters.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/CheckNameAvailabilityRequestParameters.java deleted file mode 100644 index 83b81973c5b..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/CheckNameAvailabilityRequestParameters.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Check Name Availability for Namespace and - * NotificationHubs. - */ -public class CheckNameAvailabilityRequestParameters { - /** - * Resource name. - */ - @JsonProperty(value = "Name", required = true) - private String name; - - /** - * Resource type. - */ - @JsonProperty(value = "Type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the CheckNameAvailabilityRequestParameters object itself. - */ - public CheckNameAvailabilityRequestParameters withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/GcmCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/GcmCredential.java deleted file mode 100644 index ff843a9a8b8..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/GcmCredential.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Description of a NotificationHub GcmCredential. - */ -@JsonFlatten -public class GcmCredential { - /** - * The GCM endpoint. - */ - @JsonProperty(value = "properties.gcmEndpoint") - private String gcmEndpoint; - - /** - * The Google API key. - */ - @JsonProperty(value = "properties.googleApiKey") - private String googleApiKey; - - /** - * Get the gcmEndpoint value. - * - * @return the gcmEndpoint value - */ - public String gcmEndpoint() { - return this.gcmEndpoint; - } - - /** - * Set the gcmEndpoint value. - * - * @param gcmEndpoint the gcmEndpoint value to set - * @return the GcmCredential object itself. - */ - public GcmCredential withGcmEndpoint(String gcmEndpoint) { - this.gcmEndpoint = gcmEndpoint; - return this; - } - - /** - * Get the googleApiKey value. - * - * @return the googleApiKey value - */ - public String googleApiKey() { - return this.googleApiKey; - } - - /** - * Set the googleApiKey value. - * - * @param googleApiKey the googleApiKey value to set - * @return the GcmCredential object itself. - */ - public GcmCredential withGoogleApiKey(String googleApiKey) { - this.googleApiKey = googleApiKey; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/MpnsCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/MpnsCredential.java deleted file mode 100644 index 339dd4bb5a1..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/MpnsCredential.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Description of a NotificationHub MpnsCredential. - */ -@JsonFlatten -public class MpnsCredential { - /** - * The MPNS certificate. - */ - @JsonProperty(value = "properties.mpnsCertificate") - private String mpnsCertificate; - - /** - * The certificate key for this credential. - */ - @JsonProperty(value = "properties.certificateKey") - private String certificateKey; - - /** - * The Mpns certificate Thumbprint. - */ - @JsonProperty(value = "properties.thumbprint") - private String thumbprint; - - /** - * Get the mpnsCertificate value. - * - * @return the mpnsCertificate value - */ - public String mpnsCertificate() { - return this.mpnsCertificate; - } - - /** - * Set the mpnsCertificate value. - * - * @param mpnsCertificate the mpnsCertificate value to set - * @return the MpnsCredential object itself. - */ - public MpnsCredential withMpnsCertificate(String mpnsCertificate) { - this.mpnsCertificate = mpnsCertificate; - return this; - } - - /** - * Get the certificateKey value. - * - * @return the certificateKey value - */ - public String certificateKey() { - return this.certificateKey; - } - - /** - * Set the certificateKey value. - * - * @param certificateKey the certificateKey value to set - * @return the MpnsCredential object itself. - */ - public MpnsCredential withCertificateKey(String certificateKey) { - this.certificateKey = certificateKey; - return this; - } - - /** - * Get the thumbprint value. - * - * @return the thumbprint value - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint value. - * - * @param thumbprint the thumbprint value to set - * @return the MpnsCredential object itself. - */ - public MpnsCredential withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/NamespaceType.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/NamespaceType.java deleted file mode 100644 index 2e060427285..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/NamespaceType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for NamespaceType. - */ -public enum NamespaceType { - /** Enum value Messaging. */ - MESSAGING("Messaging"), - - /** Enum value NotificationHub. */ - NOTIFICATION_HUB("NotificationHub"); - - /** The actual serialized value for a NamespaceType instance. */ - private String value; - - NamespaceType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a NamespaceType instance. - * - * @param value the serialized value to parse. - * @return the parsed NamespaceType object, or null if unable to parse. - */ - @JsonCreator - public static NamespaceType fromString(String value) { - NamespaceType[] items = NamespaceType.values(); - for (NamespaceType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/PolicykeyResource.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/PolicykeyResource.java deleted file mode 100644 index 2db39a75544..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/PolicykeyResource.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Namespace/NotificationHub Regenerate Keys. - */ -public class PolicykeyResource { - /** - * Name of the key that has to be regenerated for the - * Namespace/Notification Hub Authorization Rule. The value can be Primary - * Key/Secondary Key. - */ - @JsonProperty(value = "policyKey") - private String policyKey; - - /** - * Get the policyKey value. - * - * @return the policyKey value - */ - public String policyKey() { - return this.policyKey; - } - - /** - * Set the policyKey value. - * - * @param policyKey the policyKey value to set - * @return the PolicykeyResource object itself. - */ - public PolicykeyResource withPolicyKey(String policyKey) { - this.policyKey = policyKey; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleProperties.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleProperties.java deleted file mode 100644 index 2c341a56e00..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleProperties.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * SharedAccessAuthorizationRule properties. - */ -public class SharedAccessAuthorizationRuleProperties { - /** - * The rights associated with the rule. - */ - @JsonProperty(value = "rights") - private List rights; - - /** - * Get the rights value. - * - * @return the rights value - */ - public List rights() { - return this.rights; - } - - /** - * Set the rights value. - * - * @param rights the rights value to set - * @return the SharedAccessAuthorizationRuleProperties object itself. - */ - public SharedAccessAuthorizationRuleProperties withRights(List rights) { - this.rights = rights; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/Sku.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/Sku.java deleted file mode 100644 index 9a0310d7486..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/Sku.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Sku description for a namespace. - */ -public class Sku { - /** - * Name of the notification hub sku. Possible values include: 'Free', - * 'Basic', 'Standard'. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /** - * The tier of particular sku. - */ - @JsonProperty(value = "tier") - private String tier; - - /** - * The Sku size. - */ - @JsonProperty(value = "size") - private String size; - - /** - * The Sku Family. - */ - @JsonProperty(value = "family") - private String family; - - /** - * The capacity of the resource. - */ - @JsonProperty(value = "capacity") - private Integer capacity; - - /** - * Get the name value. - * - * @return the name value - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Get the tier value. - * - * @return the tier value - */ - public String tier() { - return this.tier; - } - - /** - * Set the tier value. - * - * @param tier the tier value to set - * @return the Sku object itself. - */ - public Sku withTier(String tier) { - this.tier = tier; - return this; - } - - /** - * Get the size value. - * - * @return the size value - */ - public String size() { - return this.size; - } - - /** - * Set the size value. - * - * @param size the size value to set - * @return the Sku object itself. - */ - public Sku withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the family value. - * - * @return the family value - */ - public String family() { - return this.family; - } - - /** - * Set the family value. - * - * @param family the family value to set - * @return the Sku object itself. - */ - public Sku withFamily(String family) { - this.family = family; - return this; - } - - /** - * Get the capacity value. - * - * @return the capacity value - */ - public Integer capacity() { - return this.capacity; - } - - /** - * Set the capacity value. - * - * @param capacity the capacity value to set - * @return the Sku object itself. - */ - public Sku withCapacity(Integer capacity) { - this.capacity = capacity; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SkuName.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SkuName.java deleted file mode 100644 index 8c3bb8f07ba..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SkuName.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SkuName. - */ -public final class SkuName { - /** Static value Free for SkuName. */ - public static final SkuName FREE = new SkuName("Free"); - - /** Static value Basic for SkuName. */ - public static final SkuName BASIC = new SkuName("Basic"); - - /** Static value Standard for SkuName. */ - public static final SkuName STANDARD = new SkuName("Standard"); - - private String value; - - /** - * Creates a custom value for SkuName. - * @param value the custom value - */ - public SkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SkuName)) { - return false; - } - if (obj == this) { - return true; - } - SkuName rhs = (SkuName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/WnsCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/WnsCredential.java deleted file mode 100644 index 72da56f715a..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/WnsCredential.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Description of a NotificationHub WnsCredential. - */ -@JsonFlatten -public class WnsCredential { - /** - * The package ID for this credential. - */ - @JsonProperty(value = "properties.packageSid") - private String packageSid; - - /** - * The secret key. - */ - @JsonProperty(value = "properties.secretKey") - private String secretKey; - - /** - * The Windows Live endpoint. - */ - @JsonProperty(value = "properties.windowsLiveEndpoint") - private String windowsLiveEndpoint; - - /** - * Get the packageSid value. - * - * @return the packageSid value - */ - public String packageSid() { - return this.packageSid; - } - - /** - * Set the packageSid value. - * - * @param packageSid the packageSid value to set - * @return the WnsCredential object itself. - */ - public WnsCredential withPackageSid(String packageSid) { - this.packageSid = packageSid; - return this; - } - - /** - * Get the secretKey value. - * - * @return the secretKey value - */ - public String secretKey() { - return this.secretKey; - } - - /** - * Set the secretKey value. - * - * @param secretKey the secretKey value to set - * @return the WnsCredential object itself. - */ - public WnsCredential withSecretKey(String secretKey) { - this.secretKey = secretKey; - return this; - } - - /** - * Get the windowsLiveEndpoint value. - * - * @return the windowsLiveEndpoint value - */ - public String windowsLiveEndpoint() { - return this.windowsLiveEndpoint; - } - - /** - * Set the windowsLiveEndpoint value. - * - * @param windowsLiveEndpoint the windowsLiveEndpoint value to set - * @return the WnsCredential object itself. - */ - public WnsCredential withWindowsLiveEndpoint(String windowsLiveEndpoint) { - this.windowsLiveEndpoint = windowsLiveEndpoint; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityParametersInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityParametersInner.java deleted file mode 100644 index a55528f367f..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityParametersInner.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import java.util.Map; -import com.microsoft.azure.management.notificationhubs.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Check Name Availability for Namespace and - * NotificationHubs. - */ -public class CheckAvailabilityParametersInner { - /** - * Resource Id. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Resource name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Resource location. - */ - @JsonProperty(value = "location", required = true) - private String location; - - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * The sku of the created namespace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /** - * True if the name is available and can be used to create new - * Namespace/NotificationHub. Otherwise false. - */ - @JsonProperty(value = "isAvailiable") - private Boolean isAvailiable; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the CheckAvailabilityParametersInner object itself. - */ - public CheckAvailabilityParametersInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the CheckAvailabilityParametersInner object itself. - */ - public CheckAvailabilityParametersInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the CheckAvailabilityParametersInner object itself. - */ - public CheckAvailabilityParametersInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the CheckAvailabilityParametersInner object itself. - */ - public CheckAvailabilityParametersInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the isAvailiable value. - * - * @return the isAvailiable value - */ - public Boolean isAvailiable() { - return this.isAvailiable; - } - - /** - * Set the isAvailiable value. - * - * @param isAvailiable the isAvailiable value to set - * @return the CheckAvailabilityParametersInner object itself. - */ - public CheckAvailabilityParametersInner withIsAvailiable(Boolean isAvailiable) { - this.isAvailiable = isAvailiable; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityResultInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityResultInner.java deleted file mode 100644 index 8cd7a5ed5c2..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityResultInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; - -/** - * Description of a CheckAvailibility resource. - */ -public class CheckAvailabilityResultInner extends Resource { - /** - * True if the name is available and can be used to create new - * Namespace/NotificationHub. Otherwise false. - */ - @JsonProperty(value = "isAvailiable") - private Boolean isAvailiable; - - /** - * Get the isAvailiable value. - * - * @return the isAvailiable value - */ - public Boolean isAvailiable() { - return this.isAvailiable; - } - - /** - * Set the isAvailiable value. - * - * @param isAvailiable the isAvailiable value to set - * @return the CheckAvailabilityResultInner object itself. - */ - public CheckAvailabilityResultInner withIsAvailiable(Boolean isAvailiable) { - this.isAvailiable = isAvailiable; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckNameAvailabilityResponseInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckNameAvailabilityResponseInner.java deleted file mode 100644 index 9aa2b1c801e..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckNameAvailabilityResponseInner.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The CheckNameAvailabilityResponseInner model. - */ -public class CheckNameAvailabilityResponseInner { - /** - * Checks if the namespace name is available. - */ - @JsonProperty(value = "NameAvailable") - private Boolean nameAvailable; - - /** - * States the reason due to which the namespace name is not available. - */ - @JsonProperty(value = "Reason") - private String reason; - - /** - * The messsage returned when checking for namespace name availability. - */ - @JsonProperty(value = "Message") - private String message; - - /** - * Get the nameAvailable value. - * - * @return the nameAvailable value - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable value. - * - * @param nameAvailable the nameAvailable value to set - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - - /** - * Get the reason value. - * - * @return the reason value - */ - public String reason() { - return this.reason; - } - - /** - * Set the reason value. - * - * @param reason the reason value to set - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/HubsInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/HubsInner.java deleted file mode 100644 index 99eaa794687..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/HubsInner.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.notificationhubs.CheckNameAvailabilityRequestParameters; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Hubs. - */ -public class HubsInner { - /** The Retrofit service to perform REST calls. */ - private HubsService service; - /** The service client containing this operation class. */ - private NotificationHubsManagementClientImpl client; - - /** - * Initializes an instance of HubsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public HubsInner(Retrofit retrofit, NotificationHubsManagementClientImpl client) { - this.service = retrofit.create(HubsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Hubs to be - * used by Retrofit to perform actually REST calls. - */ - interface HubsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Hubs checkAvailability" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkHubAvailability") - Observable> checkAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailabilityRequestParameters parameters, @Header("User-Agent") String userAgent); - - } - - /** - * Checks the availability of the given notificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param name Resource name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CheckNameAvailabilityResponseInner object if successful. - */ - public CheckNameAvailabilityResponseInner checkAvailability(String resourceGroupName, String namespaceName, String name) { - return checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, name).toBlocking().single().body(); - } - - /** - * Checks the availability of the given notificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param name Resource name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkAvailabilityAsync(String resourceGroupName, String namespaceName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, name), serviceCallback); - } - - /** - * Checks the availability of the given notificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param name Resource name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameAvailabilityResponseInner object - */ - public Observable checkAvailabilityAsync(String resourceGroupName, String namespaceName, String name) { - return checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, name).map(new Func1, CheckNameAvailabilityResponseInner>() { - @Override - public CheckNameAvailabilityResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks the availability of the given notificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param name Resource name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameAvailabilityResponseInner object - */ - public Observable> checkAvailabilityWithServiceResponseAsync(String resourceGroupName, String namespaceName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - CheckNameAvailabilityRequestParameters parameters = new CheckNameAvailabilityRequestParameters(); - parameters.withName(name); - return service.checkAvailability(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamesInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamesInner.java deleted file mode 100644 index b210fa90317..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamesInner.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.notificationhubs.CheckNameAvailabilityRequestParameters; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Names. - */ -public class NamesInner { - /** The Retrofit service to perform REST calls. */ - private NamesService service; - /** The service client containing this operation class. */ - private NotificationHubsManagementClientImpl client; - - /** - * Initializes an instance of NamesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NamesInner(Retrofit retrofit, NotificationHubsManagementClientImpl client) { - this.service = retrofit.create(NamesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Names to be - * used by Retrofit to perform actually REST calls. - */ - interface NamesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Names checkAvailability" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNameAvailability") - Observable> checkAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailabilityRequestParameters parameters, @Header("User-Agent") String userAgent); - - } - - /** - * Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. - * - * @param name Resource name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CheckNameAvailabilityResponseInner object if successful. - */ - public CheckNameAvailabilityResponseInner checkAvailability(String name) { - return checkAvailabilityWithServiceResponseAsync(name).toBlocking().single().body(); - } - - /** - * Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. - * - * @param name Resource name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkAvailabilityAsync(String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkAvailabilityWithServiceResponseAsync(name), serviceCallback); - } - - /** - * Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. - * - * @param name Resource name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameAvailabilityResponseInner object - */ - public Observable checkAvailabilityAsync(String name) { - return checkAvailabilityWithServiceResponseAsync(name).map(new Func1, CheckNameAvailabilityResponseInner>() { - @Override - public CheckNameAvailabilityResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. - * - * @param name Resource name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameAvailabilityResponseInner object - */ - public Observable> checkAvailabilityWithServiceResponseAsync(String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - CheckNameAvailabilityRequestParameters parameters = new CheckNameAvailabilityRequestParameters(); - parameters.withName(name); - return service.checkAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceCreateOrUpdateParametersInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceCreateOrUpdateParametersInner.java deleted file mode 100644 index 0ae0706f893..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceCreateOrUpdateParametersInner.java +++ /dev/null @@ -1,314 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.notificationhubs.NamespaceType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Parameters supplied to the CreateOrUpdate Namespace operation. - */ -@JsonFlatten -public class NamespaceCreateOrUpdateParametersInner extends Resource { - /** - * The name of the namespace. - */ - @JsonProperty(value = "properties.name") - private String namespaceCreateOrUpdateParametersName; - - /** - * Provisioning state of the Namespace. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * Specifies the targeted region in which the namespace should be created. - * It can be any of the following values: Australia EastAustralia - * SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central - * USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth - * EuropeWest Europe. - */ - @JsonProperty(value = "properties.region") - private String region; - - /** - * Status of the namespace. It can be any of these values:1 = - * Created/Active2 = Creating3 = Suspended4 = Deleting. - */ - @JsonProperty(value = "properties.status") - private String status; - - /** - * The time the namespace was created. - */ - @JsonProperty(value = "properties.createdAt") - private DateTime createdAt; - - /** - * Endpoint you can use to perform NotificationHub operations. - */ - @JsonProperty(value = "properties.serviceBusEndpoint") - private String serviceBusEndpoint; - - /** - * The Id of the Azure subscription associated with the namespace. - */ - @JsonProperty(value = "properties.subscriptionId") - private String subscriptionId; - - /** - * ScaleUnit where the namespace gets created. - */ - @JsonProperty(value = "properties.scaleUnit") - private String scaleUnit; - - /** - * Whether or not the namespace is currently enabled. - */ - @JsonProperty(value = "properties.enabled") - private Boolean enabled; - - /** - * Whether or not the namespace is set as Critical. - */ - @JsonProperty(value = "properties.critical") - private Boolean critical; - - /** - * The namespace type. Possible values include: 'Messaging', - * 'NotificationHub'. - */ - @JsonProperty(value = "properties.namespaceType") - private NamespaceType namespaceType; - - /** - * Get the namespaceCreateOrUpdateParametersName value. - * - * @return the namespaceCreateOrUpdateParametersName value - */ - public String namespaceCreateOrUpdateParametersName() { - return this.namespaceCreateOrUpdateParametersName; - } - - /** - * Set the namespaceCreateOrUpdateParametersName value. - * - * @param namespaceCreateOrUpdateParametersName the namespaceCreateOrUpdateParametersName value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withNamespaceCreateOrUpdateParametersName(String namespaceCreateOrUpdateParametersName) { - this.namespaceCreateOrUpdateParametersName = namespaceCreateOrUpdateParametersName; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the region value. - * - * @return the region value - */ - public String region() { - return this.region; - } - - /** - * Set the region value. - * - * @param region the region value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withRegion(String region) { - this.region = region; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public String status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the createdAt value. - * - * @return the createdAt value - */ - public DateTime createdAt() { - return this.createdAt; - } - - /** - * Set the createdAt value. - * - * @param createdAt the createdAt value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withCreatedAt(DateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get the serviceBusEndpoint value. - * - * @return the serviceBusEndpoint value - */ - public String serviceBusEndpoint() { - return this.serviceBusEndpoint; - } - - /** - * Set the serviceBusEndpoint value. - * - * @param serviceBusEndpoint the serviceBusEndpoint value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withServiceBusEndpoint(String serviceBusEndpoint) { - this.serviceBusEndpoint = serviceBusEndpoint; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the scaleUnit value. - * - * @return the scaleUnit value - */ - public String scaleUnit() { - return this.scaleUnit; - } - - /** - * Set the scaleUnit value. - * - * @param scaleUnit the scaleUnit value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withScaleUnit(String scaleUnit) { - this.scaleUnit = scaleUnit; - return this; - } - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the critical value. - * - * @return the critical value - */ - public Boolean critical() { - return this.critical; - } - - /** - * Set the critical value. - * - * @param critical the critical value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withCritical(Boolean critical) { - this.critical = critical; - return this; - } - - /** - * Get the namespaceType value. - * - * @return the namespaceType value - */ - public NamespaceType namespaceType() { - return this.namespaceType; - } - - /** - * Set the namespaceType value. - * - * @param namespaceType the namespaceType value to set - * @return the NamespaceCreateOrUpdateParametersInner object itself. - */ - public NamespaceCreateOrUpdateParametersInner withNamespaceType(NamespaceType namespaceType) { - this.namespaceType = namespaceType; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacePatchParametersInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacePatchParametersInner.java deleted file mode 100644 index 81d3b5b3fed..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacePatchParametersInner.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import java.util.Map; -import com.microsoft.azure.management.notificationhubs.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Patch Namespace operation. - */ -public class NamespacePatchParametersInner { - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * The sku of the created namespace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the NamespacePatchParametersInner object itself. - */ - public NamespacePatchParametersInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the NamespacePatchParametersInner object itself. - */ - public NamespacePatchParametersInner withSku(Sku sku) { - this.sku = sku; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceResourceInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceResourceInner.java deleted file mode 100644 index 56cc9cae0c1..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceResourceInner.java +++ /dev/null @@ -1,314 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.notificationhubs.NamespaceType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of a Namespace resource. - */ -@JsonFlatten -public class NamespaceResourceInner extends Resource { - /** - * The name of the namespace. - */ - @JsonProperty(value = "properties.name") - private String namespaceResourceName; - - /** - * Provisioning state of the Namespace. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * Specifies the targeted region in which the namespace should be created. - * It can be any of the following values: Australia EastAustralia - * SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central - * USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth - * EuropeWest Europe. - */ - @JsonProperty(value = "properties.region") - private String region; - - /** - * Status of the namespace. It can be any of these values:1 = - * Created/Active2 = Creating3 = Suspended4 = Deleting. - */ - @JsonProperty(value = "properties.status") - private String status; - - /** - * The time the namespace was created. - */ - @JsonProperty(value = "properties.createdAt") - private DateTime createdAt; - - /** - * Endpoint you can use to perform NotificationHub operations. - */ - @JsonProperty(value = "properties.serviceBusEndpoint") - private String serviceBusEndpoint; - - /** - * The Id of the Azure subscription associated with the namespace. - */ - @JsonProperty(value = "properties.subscriptionId") - private String subscriptionId; - - /** - * ScaleUnit where the namespace gets created. - */ - @JsonProperty(value = "properties.scaleUnit") - private String scaleUnit; - - /** - * Whether or not the namespace is currently enabled. - */ - @JsonProperty(value = "properties.enabled") - private Boolean enabled; - - /** - * Whether or not the namespace is set as Critical. - */ - @JsonProperty(value = "properties.critical") - private Boolean critical; - - /** - * The namespace type. Possible values include: 'Messaging', - * 'NotificationHub'. - */ - @JsonProperty(value = "properties.namespaceType") - private NamespaceType namespaceType; - - /** - * Get the namespaceResourceName value. - * - * @return the namespaceResourceName value - */ - public String namespaceResourceName() { - return this.namespaceResourceName; - } - - /** - * Set the namespaceResourceName value. - * - * @param namespaceResourceName the namespaceResourceName value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withNamespaceResourceName(String namespaceResourceName) { - this.namespaceResourceName = namespaceResourceName; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the region value. - * - * @return the region value - */ - public String region() { - return this.region; - } - - /** - * Set the region value. - * - * @param region the region value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withRegion(String region) { - this.region = region; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public String status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the createdAt value. - * - * @return the createdAt value - */ - public DateTime createdAt() { - return this.createdAt; - } - - /** - * Set the createdAt value. - * - * @param createdAt the createdAt value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withCreatedAt(DateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get the serviceBusEndpoint value. - * - * @return the serviceBusEndpoint value - */ - public String serviceBusEndpoint() { - return this.serviceBusEndpoint; - } - - /** - * Set the serviceBusEndpoint value. - * - * @param serviceBusEndpoint the serviceBusEndpoint value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withServiceBusEndpoint(String serviceBusEndpoint) { - this.serviceBusEndpoint = serviceBusEndpoint; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the scaleUnit value. - * - * @return the scaleUnit value - */ - public String scaleUnit() { - return this.scaleUnit; - } - - /** - * Set the scaleUnit value. - * - * @param scaleUnit the scaleUnit value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withScaleUnit(String scaleUnit) { - this.scaleUnit = scaleUnit; - return this; - } - - /** - * Get the enabled value. - * - * @return the enabled value - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled value. - * - * @param enabled the enabled value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the critical value. - * - * @return the critical value - */ - public Boolean critical() { - return this.critical; - } - - /** - * Set the critical value. - * - * @param critical the critical value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withCritical(Boolean critical) { - this.critical = critical; - return this; - } - - /** - * Get the namespaceType value. - * - * @return the namespaceType value - */ - public NamespaceType namespaceType() { - return this.namespaceType; - } - - /** - * Set the namespaceType value. - * - * @param namespaceType the namespaceType value to set - * @return the NamespaceResourceInner object itself. - */ - public NamespaceResourceInner withNamespaceType(NamespaceType namespaceType) { - this.namespaceType = namespaceType; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacesInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacesInner.java deleted file mode 100644 index b6254f0969d..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacesInner.java +++ /dev/null @@ -1,1895 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.notificationhubs.PolicykeyResource; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Namespaces. - */ -public class NamespacesInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private NamespacesService service; - /** The service client containing this operation class. */ - private NotificationHubsManagementClientImpl client; - - /** - * Initializes an instance of NamespacesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NamespacesInner(Retrofit retrofit, NotificationHubsManagementClientImpl client) { - this.service = retrofit.create(NamespacesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Namespaces to be - * used by Retrofit to perform actually REST calls. - */ - interface NamespacesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces checkAvailability" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability") - Observable> checkAvailability(@Path("subscriptionId") String subscriptionId, @Body CheckAvailabilityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body NamespaceCreateOrUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces patch" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}") - Observable> patch(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body NamespacePatchParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces createOrUpdateAuthorizationRule" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}") - Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces deleteAuthorizationRule" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) - Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces getAuthorizationRule" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}") - Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listAll" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces") - Observable> listAll(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listAuthorizationRules" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules") - Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces regenerateKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys") - Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PolicykeyResource parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listAllNext" }) - @GET - Observable> listAllNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listAuthorizationRulesNext" }) - @GET - Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. - * - * @param parameters The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CheckAvailabilityResultInner object if successful. - */ - public CheckAvailabilityResultInner checkAvailability(CheckAvailabilityParametersInner parameters) { - return checkAvailabilityWithServiceResponseAsync(parameters).toBlocking().single().body(); - } - - /** - * Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. - * - * @param parameters The namespace name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkAvailabilityAsync(CheckAvailabilityParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkAvailabilityWithServiceResponseAsync(parameters), serviceCallback); - } - - /** - * Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. - * - * @param parameters The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckAvailabilityResultInner object - */ - public Observable checkAvailabilityAsync(CheckAvailabilityParametersInner parameters) { - return checkAvailabilityWithServiceResponseAsync(parameters).map(new Func1, CheckAvailabilityResultInner>() { - @Override - public CheckAvailabilityResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. - * - * @param parameters The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckAvailabilityResultInner object - */ - public Observable> checkAvailabilityWithServiceResponseAsync(CheckAvailabilityParametersInner parameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.checkAvailability(this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NamespaceResourceInner object if successful. - */ - public NamespaceResourceInner createOrUpdate(String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); - } - - /** - * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters Parameters supplied to create a Namespace Resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); - } - - /** - * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NamespaceResourceInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, NamespaceResourceInner>() { - @Override - public NamespaceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NamespaceResourceInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Patches the existing namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters Parameters supplied to patch a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NamespaceResourceInner object if successful. - */ - public NamespaceResourceInner patch(String resourceGroupName, String namespaceName, NamespacePatchParametersInner parameters) { - return patchWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); - } - - /** - * Patches the existing namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters Parameters supplied to patch a Namespace Resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture patchAsync(String resourceGroupName, String namespaceName, NamespacePatchParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); - } - - /** - * Patches the existing namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters Parameters supplied to patch a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NamespaceResourceInner object - */ - public Observable patchAsync(String resourceGroupName, String namespaceName, NamespacePatchParametersInner parameters) { - return patchWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, NamespaceResourceInner>() { - @Override - public NamespaceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Patches the existing namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters Parameters supplied to patch a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NamespaceResourceInner object - */ - public Observable> patchWithServiceResponseAsync(String resourceGroupName, String namespaceName, NamespacePatchParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.patch(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = patchDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse patchDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String namespaceName) { - deleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().last().body(); - } - - /** - * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); - } - - /** - * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String namespaceName) { - return deleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String namespaceName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); - } - - /** - * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); - } - - /** - * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String namespaceName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Returns the description for the specified namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NamespaceResourceInner object if successful. - */ - public NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); - } - - /** - * Returns the description for the specified namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); - } - - /** - * Returns the description for the specified namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NamespaceResourceInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String namespaceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, NamespaceResourceInner>() { - @Override - public NamespaceResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Returns the description for the specified namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NamespaceResourceInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates an authorization rule for a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName Aauthorization Rule Name. - * @param parameters The shared access authorization rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SharedAccessAuthorizationRuleResourceInner object if successful. - */ - public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).toBlocking().single().body(); - } - - /** - * Creates an authorization rule for a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName Aauthorization Rule Name. - * @param parameters The shared access authorization rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters), serviceCallback); - } - - /** - * Creates an authorization rule for a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName Aauthorization Rule Name. - * @param parameters The shared access authorization rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessAuthorizationRuleResourceInner object - */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).map(new Func1, SharedAccessAuthorizationRuleResourceInner>() { - @Override - public SharedAccessAuthorizationRuleResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates an authorization rule for a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName Aauthorization Rule Name. - * @param parameters The shared access authorization rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessAuthorizationRuleResourceInner object - */ - public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateAuthorizationRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a namespace authorization rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName Authorization Rule Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { - deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Deletes a namespace authorization rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName Authorization Rule Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); - } - - /** - * Deletes a namespace authorization rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName Authorization Rule Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a namespace authorization rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName Authorization Rule Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an authorization rule for a namespace by name. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param authorizationRuleName Authorization rule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SharedAccessAuthorizationRuleResourceInner object if successful. - */ - public SharedAccessAuthorizationRuleResourceInner getAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Gets an authorization rule for a namespace by name. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param authorizationRuleName Authorization rule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); - } - - /** - * Gets an authorization rule for a namespace by name. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param authorizationRuleName Authorization rule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessAuthorizationRuleResourceInner object - */ - public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, SharedAccessAuthorizationRuleResourceInner>() { - @Override - public SharedAccessAuthorizationRuleResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an authorization rule for a namespace by name. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param authorizationRuleName Authorization rule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessAuthorizationRuleResourceInner object - */ - public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getAuthorizationRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists the available namespaces within a resourceGroup. - * - * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the method lists all the namespaces within subscription - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NamespaceResourceInner> object if successful. - */ - public PagedList list(final String resourceGroupName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the available namespaces within a resourceGroup. - * - * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the method lists all the namespaces within subscription - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the available namespaces within a resourceGroup. - * - * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the method lists all the namespaces within subscription - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NamespaceResourceInner> object - */ - public Observable> listAsync(final String resourceGroupName) { - return listWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the available namespaces within a resourceGroup. - * - * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the method lists all the namespaces within subscription - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NamespaceResourceInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName) { - return listSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the available namespaces within a resourceGroup. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the method lists all the namespaces within subscription - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NamespaceResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NamespaceResourceInner> object if successful. - */ - public PagedList listAll() { - ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAllAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAllSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NamespaceResourceInner> object - */ - public Observable> listAllAsync() { - return listAllWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NamespaceResourceInner> object - */ - public Observable>> listAllWithServiceResponseAsync() { - return listAllSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NamespaceResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAllSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listAll(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAllDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the authorization rules for a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SharedAccessAuthorizationRuleResourceInner> object if successful. - */ - public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName) { - ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the authorization rules for a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the authorization rules for a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessAuthorizationRuleResourceInner> object - */ - public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName) { - return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the authorization rules for a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessAuthorizationRuleResourceInner> object - */ - public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { - return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the authorization rules for a namespace. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param namespaceName The namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SharedAccessAuthorizationRuleResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listAuthorizationRules(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the Primary and Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceListKeysInner object if successful. - */ - public ResourceListKeysInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Gets the Primary and Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); - } - - /** - * Gets the Primary and Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, ResourceListKeysInner>() { - @Override - public ResourceListKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the Primary and Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceListKeysInner object if successful. - */ - public ResourceListKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); - } - - /** - * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, ResourceListKeysInner>() { - @Override - public ResourceListKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyKey = null; - PolicykeyResource parameters = new PolicykeyResource(); - parameters.withPolicyKey(null); - return service.regenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @param policyKey Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceListKeysInner object if successful. - */ - public ResourceListKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String authorizationRuleName, String policyKey) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, policyKey).toBlocking().single().body(); - } - - /** - * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @param policyKey Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, String policyKey, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, policyKey), serviceCallback); - } - - /** - * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @param policyKey Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, String policyKey) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, policyKey).map(new Func1, ResourceListKeysInner>() { - @Override - public ResourceListKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. - * @param policyKey Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, String policyKey) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - PolicykeyResource parameters = new PolicykeyResource(); - parameters.withPolicyKey(policyKey); - return service.regenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists the available namespaces within a resourceGroup. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NamespaceResourceInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the available namespaces within a resourceGroup. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the available namespaces within a resourceGroup. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NamespaceResourceInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the available namespaces within a resourceGroup. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NamespaceResourceInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the available namespaces within a resourceGroup. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NamespaceResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NamespaceResourceInner> object if successful. - */ - public PagedList listAllNext(final String nextPageLink) { - ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAllNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NamespaceResourceInner> object - */ - public Observable> listAllNextAsync(final String nextPageLink) { - return listAllNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NamespaceResourceInner> object - */ - public Observable>> listAllNextWithServiceResponseAsync(final String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NamespaceResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAllNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAllNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the authorization rules for a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SharedAccessAuthorizationRuleResourceInner> object if successful. - */ - public PagedList listAuthorizationRulesNext(final String nextPageLink) { - ServiceResponse> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the authorization rules for a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the authorization rules for a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessAuthorizationRuleResourceInner> object - */ - public Observable> listAuthorizationRulesNextAsync(final String nextPageLink) { - return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the authorization rules for a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessAuthorizationRuleResourceInner> object - */ - public Observable>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the authorization rules for a namespace. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SharedAccessAuthorizationRuleResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubCreateOrUpdateParametersInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubCreateOrUpdateParametersInner.java deleted file mode 100644 index ea84a1fd8b6..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubCreateOrUpdateParametersInner.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import java.util.List; -import com.microsoft.azure.management.notificationhubs.SharedAccessAuthorizationRuleProperties; -import com.microsoft.azure.management.notificationhubs.ApnsCredential; -import com.microsoft.azure.management.notificationhubs.WnsCredential; -import com.microsoft.azure.management.notificationhubs.GcmCredential; -import com.microsoft.azure.management.notificationhubs.MpnsCredential; -import com.microsoft.azure.management.notificationhubs.AdmCredential; -import com.microsoft.azure.management.notificationhubs.BaiduCredential; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Parameters supplied to the CreateOrUpdate NotificationHub operation. - */ -@JsonFlatten -public class NotificationHubCreateOrUpdateParametersInner extends Resource { - /** - * The NotificationHub name. - */ - @JsonProperty(value = "properties.name") - private String notificationHubCreateOrUpdateParametersName; - - /** - * The RegistrationTtl of the created NotificationHub. - */ - @JsonProperty(value = "properties.registrationTtl") - private String registrationTtl; - - /** - * The AuthorizationRules of the created NotificationHub. - */ - @JsonProperty(value = "properties.authorizationRules") - private List authorizationRules; - - /** - * The ApnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.apnsCredential") - private ApnsCredential apnsCredential; - - /** - * The WnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.wnsCredential") - private WnsCredential wnsCredential; - - /** - * The GcmCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.gcmCredential") - private GcmCredential gcmCredential; - - /** - * The MpnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.mpnsCredential") - private MpnsCredential mpnsCredential; - - /** - * The AdmCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.admCredential") - private AdmCredential admCredential; - - /** - * The BaiduCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.baiduCredential") - private BaiduCredential baiduCredential; - - /** - * Get the notificationHubCreateOrUpdateParametersName value. - * - * @return the notificationHubCreateOrUpdateParametersName value - */ - public String notificationHubCreateOrUpdateParametersName() { - return this.notificationHubCreateOrUpdateParametersName; - } - - /** - * Set the notificationHubCreateOrUpdateParametersName value. - * - * @param notificationHubCreateOrUpdateParametersName the notificationHubCreateOrUpdateParametersName value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withNotificationHubCreateOrUpdateParametersName(String notificationHubCreateOrUpdateParametersName) { - this.notificationHubCreateOrUpdateParametersName = notificationHubCreateOrUpdateParametersName; - return this; - } - - /** - * Get the registrationTtl value. - * - * @return the registrationTtl value - */ - public String registrationTtl() { - return this.registrationTtl; - } - - /** - * Set the registrationTtl value. - * - * @param registrationTtl the registrationTtl value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withRegistrationTtl(String registrationTtl) { - this.registrationTtl = registrationTtl; - return this; - } - - /** - * Get the authorizationRules value. - * - * @return the authorizationRules value - */ - public List authorizationRules() { - return this.authorizationRules; - } - - /** - * Set the authorizationRules value. - * - * @param authorizationRules the authorizationRules value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withAuthorizationRules(List authorizationRules) { - this.authorizationRules = authorizationRules; - return this; - } - - /** - * Get the apnsCredential value. - * - * @return the apnsCredential value - */ - public ApnsCredential apnsCredential() { - return this.apnsCredential; - } - - /** - * Set the apnsCredential value. - * - * @param apnsCredential the apnsCredential value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withApnsCredential(ApnsCredential apnsCredential) { - this.apnsCredential = apnsCredential; - return this; - } - - /** - * Get the wnsCredential value. - * - * @return the wnsCredential value - */ - public WnsCredential wnsCredential() { - return this.wnsCredential; - } - - /** - * Set the wnsCredential value. - * - * @param wnsCredential the wnsCredential value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withWnsCredential(WnsCredential wnsCredential) { - this.wnsCredential = wnsCredential; - return this; - } - - /** - * Get the gcmCredential value. - * - * @return the gcmCredential value - */ - public GcmCredential gcmCredential() { - return this.gcmCredential; - } - - /** - * Set the gcmCredential value. - * - * @param gcmCredential the gcmCredential value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withGcmCredential(GcmCredential gcmCredential) { - this.gcmCredential = gcmCredential; - return this; - } - - /** - * Get the mpnsCredential value. - * - * @return the mpnsCredential value - */ - public MpnsCredential mpnsCredential() { - return this.mpnsCredential; - } - - /** - * Set the mpnsCredential value. - * - * @param mpnsCredential the mpnsCredential value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withMpnsCredential(MpnsCredential mpnsCredential) { - this.mpnsCredential = mpnsCredential; - return this; - } - - /** - * Get the admCredential value. - * - * @return the admCredential value - */ - public AdmCredential admCredential() { - return this.admCredential; - } - - /** - * Set the admCredential value. - * - * @param admCredential the admCredential value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withAdmCredential(AdmCredential admCredential) { - this.admCredential = admCredential; - return this; - } - - /** - * Get the baiduCredential value. - * - * @return the baiduCredential value - */ - public BaiduCredential baiduCredential() { - return this.baiduCredential; - } - - /** - * Set the baiduCredential value. - * - * @param baiduCredential the baiduCredential value to set - * @return the NotificationHubCreateOrUpdateParametersInner object itself. - */ - public NotificationHubCreateOrUpdateParametersInner withBaiduCredential(BaiduCredential baiduCredential) { - this.baiduCredential = baiduCredential; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubResourceInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubResourceInner.java deleted file mode 100644 index df54e643d9b..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubResourceInner.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import java.util.List; -import com.microsoft.azure.management.notificationhubs.SharedAccessAuthorizationRuleProperties; -import com.microsoft.azure.management.notificationhubs.ApnsCredential; -import com.microsoft.azure.management.notificationhubs.WnsCredential; -import com.microsoft.azure.management.notificationhubs.GcmCredential; -import com.microsoft.azure.management.notificationhubs.MpnsCredential; -import com.microsoft.azure.management.notificationhubs.AdmCredential; -import com.microsoft.azure.management.notificationhubs.BaiduCredential; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of a NotificationHub Resource. - */ -@JsonFlatten -public class NotificationHubResourceInner extends Resource { - /** - * The NotificationHub name. - */ - @JsonProperty(value = "properties.name") - private String notificationHubResourceName; - - /** - * The RegistrationTtl of the created NotificationHub. - */ - @JsonProperty(value = "properties.registrationTtl") - private String registrationTtl; - - /** - * The AuthorizationRules of the created NotificationHub. - */ - @JsonProperty(value = "properties.authorizationRules") - private List authorizationRules; - - /** - * The ApnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.apnsCredential") - private ApnsCredential apnsCredential; - - /** - * The WnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.wnsCredential") - private WnsCredential wnsCredential; - - /** - * The GcmCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.gcmCredential") - private GcmCredential gcmCredential; - - /** - * The MpnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.mpnsCredential") - private MpnsCredential mpnsCredential; - - /** - * The AdmCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.admCredential") - private AdmCredential admCredential; - - /** - * The BaiduCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.baiduCredential") - private BaiduCredential baiduCredential; - - /** - * Get the notificationHubResourceName value. - * - * @return the notificationHubResourceName value - */ - public String notificationHubResourceName() { - return this.notificationHubResourceName; - } - - /** - * Set the notificationHubResourceName value. - * - * @param notificationHubResourceName the notificationHubResourceName value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withNotificationHubResourceName(String notificationHubResourceName) { - this.notificationHubResourceName = notificationHubResourceName; - return this; - } - - /** - * Get the registrationTtl value. - * - * @return the registrationTtl value - */ - public String registrationTtl() { - return this.registrationTtl; - } - - /** - * Set the registrationTtl value. - * - * @param registrationTtl the registrationTtl value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withRegistrationTtl(String registrationTtl) { - this.registrationTtl = registrationTtl; - return this; - } - - /** - * Get the authorizationRules value. - * - * @return the authorizationRules value - */ - public List authorizationRules() { - return this.authorizationRules; - } - - /** - * Set the authorizationRules value. - * - * @param authorizationRules the authorizationRules value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withAuthorizationRules(List authorizationRules) { - this.authorizationRules = authorizationRules; - return this; - } - - /** - * Get the apnsCredential value. - * - * @return the apnsCredential value - */ - public ApnsCredential apnsCredential() { - return this.apnsCredential; - } - - /** - * Set the apnsCredential value. - * - * @param apnsCredential the apnsCredential value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withApnsCredential(ApnsCredential apnsCredential) { - this.apnsCredential = apnsCredential; - return this; - } - - /** - * Get the wnsCredential value. - * - * @return the wnsCredential value - */ - public WnsCredential wnsCredential() { - return this.wnsCredential; - } - - /** - * Set the wnsCredential value. - * - * @param wnsCredential the wnsCredential value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withWnsCredential(WnsCredential wnsCredential) { - this.wnsCredential = wnsCredential; - return this; - } - - /** - * Get the gcmCredential value. - * - * @return the gcmCredential value - */ - public GcmCredential gcmCredential() { - return this.gcmCredential; - } - - /** - * Set the gcmCredential value. - * - * @param gcmCredential the gcmCredential value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withGcmCredential(GcmCredential gcmCredential) { - this.gcmCredential = gcmCredential; - return this; - } - - /** - * Get the mpnsCredential value. - * - * @return the mpnsCredential value - */ - public MpnsCredential mpnsCredential() { - return this.mpnsCredential; - } - - /** - * Set the mpnsCredential value. - * - * @param mpnsCredential the mpnsCredential value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withMpnsCredential(MpnsCredential mpnsCredential) { - this.mpnsCredential = mpnsCredential; - return this; - } - - /** - * Get the admCredential value. - * - * @return the admCredential value - */ - public AdmCredential admCredential() { - return this.admCredential; - } - - /** - * Set the admCredential value. - * - * @param admCredential the admCredential value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withAdmCredential(AdmCredential admCredential) { - this.admCredential = admCredential; - return this; - } - - /** - * Get the baiduCredential value. - * - * @return the baiduCredential value - */ - public BaiduCredential baiduCredential() { - return this.baiduCredential; - } - - /** - * Set the baiduCredential value. - * - * @param baiduCredential the baiduCredential value to set - * @return the NotificationHubResourceInner object itself. - */ - public NotificationHubResourceInner withBaiduCredential(BaiduCredential baiduCredential) { - this.baiduCredential = baiduCredential; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsInner.java deleted file mode 100644 index a4cc9328167..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsInner.java +++ /dev/null @@ -1,1684 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.notificationhubs.PolicykeyResource; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in NotificationHubs. - */ -public class NotificationHubsInner { - /** The Retrofit service to perform REST calls. */ - private NotificationHubsService service; - /** The service client containing this operation class. */ - private NotificationHubsManagementClientImpl client; - - /** - * Initializes an instance of NotificationHubsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NotificationHubsInner(Retrofit retrofit, NotificationHubsManagementClientImpl client) { - this.service = retrofit.create(NotificationHubsService.class); - this.client = client; - } - - /** - * The interface defining all the services for NotificationHubs to be - * used by Retrofit to perform actually REST calls. - */ - interface NotificationHubsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs checkAvailability" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkNotificationHubAvailability") - Observable> checkAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body CheckAvailabilityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Body NotificationHubCreateOrUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs createOrUpdateAuthorizationRule" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}") - Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs deleteAuthorizationRule" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) - Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs getAuthorizationRule" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}") - Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs listAuthorizationRules" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules") - Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs regenerateKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys") - Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PolicykeyResource parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs getPnsCredentials" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/pnsCredentials") - Observable> getPnsCredentials(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs listAuthorizationRulesNext" }) - @GET - Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Checks the availability of the given notificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters The notificationHub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CheckAvailabilityResultInner object if successful. - */ - public CheckAvailabilityResultInner checkAvailability(String resourceGroupName, String namespaceName, CheckAvailabilityParametersInner parameters) { - return checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); - } - - /** - * Checks the availability of the given notificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters The notificationHub name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkAvailabilityAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); - } - - /** - * Checks the availability of the given notificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters The notificationHub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckAvailabilityResultInner object - */ - public Observable checkAvailabilityAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParametersInner parameters) { - return checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, CheckAvailabilityResultInner>() { - @Override - public CheckAvailabilityResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks the availability of the given notificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param parameters The notificationHub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckAvailabilityResultInner object - */ - public Observable> checkAvailabilityWithServiceResponseAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.checkAvailability(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates/Update a NotificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param parameters Parameters supplied to the create/update a NotificationHub Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationHubResourceInner object if successful. - */ - public NotificationHubResourceInner createOrUpdate(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubCreateOrUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters).toBlocking().single().body(); - } - - /** - * Creates/Update a NotificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param parameters Parameters supplied to the create/update a NotificationHub Resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubCreateOrUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters), serviceCallback); - } - - /** - * Creates/Update a NotificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param parameters Parameters supplied to the create/update a NotificationHub Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationHubResourceInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubCreateOrUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters).map(new Func1, NotificationHubResourceInner>() { - @Override - public NotificationHubResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates/Update a NotificationHub in a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param parameters Parameters supplied to the create/update a NotificationHub Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationHubResourceInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubCreateOrUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a notification hub associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String namespaceName, String notificationHubName) { - deleteWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).toBlocking().single().body(); - } - - /** - * Deletes a notification hub associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, String notificationHubName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName), serviceCallback); - } - - /** - * Deletes a notification hub associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String namespaceName, String notificationHubName) { - return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a notification hub associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationHubResourceInner object if successful. - */ - public NotificationHubResourceInner get(String resourceGroupName, String namespaceName, String notificationHubName) { - return getWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).toBlocking().single().body(); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String namespaceName, String notificationHubName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName), serviceCallback); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationHubResourceInner object - */ - public Observable getAsync(String resourceGroupName, String namespaceName, String notificationHubName) { - return getWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).map(new Func1, NotificationHubResourceInner>() { - @Override - public NotificationHubResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationHubResourceInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates/Updates an authorization rule for a NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName Authorization Rule Name. - * @param parameters The shared access authorization rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SharedAccessAuthorizationRuleResourceInner object if successful. - */ - public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters).toBlocking().single().body(); - } - - /** - * Creates/Updates an authorization rule for a NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName Authorization Rule Name. - * @param parameters The shared access authorization rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters), serviceCallback); - } - - /** - * Creates/Updates an authorization rule for a NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName Authorization Rule Name. - * @param parameters The shared access authorization rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessAuthorizationRuleResourceInner object - */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters).map(new Func1, SharedAccessAuthorizationRuleResourceInner>() { - @Override - public SharedAccessAuthorizationRuleResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates/Updates an authorization rule for a NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName Authorization Rule Name. - * @param parameters The shared access authorization rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessAuthorizationRuleResourceInner object - */ - public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateAuthorizationRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a notificationHub authorization rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName Authorization Rule Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Deletes a notificationHub authorization rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName Authorization Rule Name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName), serviceCallback); - } - - /** - * Deletes a notificationHub authorization rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName Authorization Rule Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a notificationHub authorization rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName Authorization Rule Name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteAuthorizationRule(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets an authorization rule for a NotificationHub by name. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param notificationHubName The notification hub name. - * @param authorizationRuleName authorization rule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SharedAccessAuthorizationRuleResourceInner object if successful. - */ - public SharedAccessAuthorizationRuleResourceInner getAuthorizationRule(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Gets an authorization rule for a NotificationHub by name. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param notificationHubName The notification hub name. - * @param authorizationRuleName authorization rule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName), serviceCallback); - } - - /** - * Gets an authorization rule for a NotificationHub by name. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param notificationHubName The notification hub name. - * @param authorizationRuleName authorization rule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessAuthorizationRuleResourceInner object - */ - public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).map(new Func1, SharedAccessAuthorizationRuleResourceInner>() { - @Override - public SharedAccessAuthorizationRuleResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets an authorization rule for a NotificationHub by name. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param notificationHubName The notification hub name. - * @param authorizationRuleName authorization rule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SharedAccessAuthorizationRuleResourceInner object - */ - public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAuthorizationRule(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getAuthorizationRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NotificationHubResourceInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String namespaceName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, namespaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationHubResourceInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String namespaceName) { - return listWithServiceResponseAsync(resourceGroupName, namespaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationHubResourceInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { - return listSinglePageAsync(resourceGroupName, namespaceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the notification hubs associated with a namespace. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param namespaceName The namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NotificationHubResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the authorization rules for a NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SharedAccessAuthorizationRuleResourceInner> object if successful. - */ - public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName, final String notificationHubName) { - ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, notificationHubName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the authorization rules for a NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param notificationHubName The notification hub name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String notificationHubName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, notificationHubName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the authorization rules for a NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessAuthorizationRuleResourceInner> object - */ - public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String notificationHubName) { - return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the authorization rules for a NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessAuthorizationRuleResourceInner> object - */ - public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String notificationHubName) { - return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, notificationHubName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the authorization rules for a NotificationHub. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param namespaceName The namespace name - ServiceResponse> * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SharedAccessAuthorizationRuleResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName, final String notificationHubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listAuthorizationRules(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the Primary and Secondary ConnectionStrings to the NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceListKeysInner object if successful. - */ - public ResourceListKeysInner listKeys(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Gets the Primary and Secondary ConnectionStrings to the NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName), serviceCallback); - } - - /** - * Gets the Primary and Secondary ConnectionStrings to the NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).map(new Func1, ResourceListKeysInner>() { - @Override - public ResourceListKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the Primary and Secondary ConnectionStrings to the NotificationHub. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceListKeysInner object if successful. - */ - public ResourceListKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName), serviceCallback); - } - - /** - * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).map(new Func1, ResourceListKeysInner>() { - @Override - public ResourceListKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String policyKey = null; - PolicykeyResource parameters = new PolicykeyResource(); - parameters.withPolicyKey(null); - return service.regenerateKeys(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @param policyKey Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceListKeysInner object if successful. - */ - public ResourceListKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, String policyKey) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, policyKey).toBlocking().single().body(); - } - - /** - * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @param policyKey Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, String policyKey, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, policyKey), serviceCallback); - } - - /** - * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @param policyKey Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, String policyKey) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, policyKey).map(new Func1, ResourceListKeysInner>() { - @Override - public ResourceListKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule. - * @param policyKey Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object - */ - public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, String policyKey) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - PolicykeyResource parameters = new PolicykeyResource(); - parameters.withPolicyKey(policyKey); - return service.regenerateKeys(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists the PNS Credentials associated with a notification hub . - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PnsCredentialsResourceInner object if successful. - */ - public PnsCredentialsResourceInner getPnsCredentials(String resourceGroupName, String namespaceName, String notificationHubName) { - return getPnsCredentialsWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).toBlocking().single().body(); - } - - /** - * Lists the PNS Credentials associated with a notification hub . - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getPnsCredentialsAsync(String resourceGroupName, String namespaceName, String notificationHubName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getPnsCredentialsWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName), serviceCallback); - } - - /** - * Lists the PNS Credentials associated with a notification hub . - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PnsCredentialsResourceInner object - */ - public Observable getPnsCredentialsAsync(String resourceGroupName, String namespaceName, String notificationHubName) { - return getPnsCredentialsWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).map(new Func1, PnsCredentialsResourceInner>() { - @Override - public PnsCredentialsResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists the PNS Credentials associated with a notification hub . - * - * @param resourceGroupName The name of the resource group. - * @param namespaceName The namespace name. - * @param notificationHubName The notification hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PnsCredentialsResourceInner object - */ - public Observable> getPnsCredentialsWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (notificationHubName == null) { - throw new IllegalArgumentException("Parameter notificationHubName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getPnsCredentials(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getPnsCredentialsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getPnsCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NotificationHubResourceInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationHubResourceInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the notification hubs associated with a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NotificationHubResourceInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the notification hubs associated with a namespace. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NotificationHubResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the authorization rules for a NotificationHub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<SharedAccessAuthorizationRuleResourceInner> object if successful. - */ - public PagedList listAuthorizationRulesNext(final String nextPageLink) { - ServiceResponse> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the authorization rules for a NotificationHub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the authorization rules for a NotificationHub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessAuthorizationRuleResourceInner> object - */ - public Observable> listAuthorizationRulesNextAsync(final String nextPageLink) { - return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the authorization rules for a NotificationHub. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<SharedAccessAuthorizationRuleResourceInner> object - */ - public Observable>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the authorization rules for a NotificationHub. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<SharedAccessAuthorizationRuleResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManagementClientImpl.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManagementClientImpl.java deleted file mode 100644 index 17adfd9985b..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManagementClientImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the NotificationHubsManagementClientImpl class. - */ -public class NotificationHubsManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ - private String subscriptionId; - - /** - * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public NotificationHubsManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Client Api Version. */ - private String apiVersion; - - /** - * Gets Client Api Version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public NotificationHubsManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public NotificationHubsManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public NotificationHubsManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The NamespacesInner object to access its operations. - */ - private NamespacesInner namespaces; - - /** - * Gets the NamespacesInner object to access its operations. - * @return the NamespacesInner object. - */ - public NamespacesInner namespaces() { - return this.namespaces; - } - - /** - * The NamesInner object to access its operations. - */ - private NamesInner names; - - /** - * Gets the NamesInner object to access its operations. - * @return the NamesInner object. - */ - public NamesInner names() { - return this.names; - } - - /** - * The NotificationHubsInner object to access its operations. - */ - private NotificationHubsInner notificationHubs; - - /** - * Gets the NotificationHubsInner object to access its operations. - * @return the NotificationHubsInner object. - */ - public NotificationHubsInner notificationHubs() { - return this.notificationHubs; - } - - /** - * The HubsInner object to access its operations. - */ - private HubsInner hubs; - - /** - * Gets the HubsInner object to access its operations. - * @return the HubsInner object. - */ - public HubsInner hubs() { - return this.hubs; - } - - /** - * Initializes an instance of NotificationHubsManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public NotificationHubsManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of NotificationHubsManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public NotificationHubsManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of NotificationHubsManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public NotificationHubsManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2017-04-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.namespaces = new NamespacesInner(restClient().retrofit(), this); - this.names = new NamesInner(restClient().retrofit(), this); - this.notificationHubs = new NotificationHubsInner(restClient().retrofit(), this); - this.hubs = new HubsInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "NotificationHubsManagementClient", "2017-04-01"); - } -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManager.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManager.java deleted file mode 100644 index e974753b2c2..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure NotificationHubs resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class NotificationHubsManager extends Manager { - /** - * Get a Configurable instance that can be used to create NotificationHubsManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new NotificationHubsManager.ConfigurableImpl(); - } - /** - * Creates an instance of NotificationHubsManager that exposes NotificationHubs resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the NotificationHubsManager - */ - public static NotificationHubsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new NotificationHubsManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of NotificationHubsManager that exposes NotificationHubs resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the NotificationHubsManager - */ - public static NotificationHubsManager authenticate(RestClient restClient, String subscriptionId) { - return new NotificationHubsManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of NotificationHubsManager that exposes NotificationHubs management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing NotificationHubs management API entry points that work across subscriptions - */ - NotificationHubsManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public NotificationHubsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return NotificationHubsManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private NotificationHubsManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new NotificationHubsManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PageImpl.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PageImpl.java deleted file mode 100644 index af0e60f7784..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PnsCredentialsResourceInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PnsCredentialsResourceInner.java deleted file mode 100644 index fd31c979816..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PnsCredentialsResourceInner.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.microsoft.azure.management.notificationhubs.ApnsCredential; -import com.microsoft.azure.management.notificationhubs.WnsCredential; -import com.microsoft.azure.management.notificationhubs.GcmCredential; -import com.microsoft.azure.management.notificationhubs.MpnsCredential; -import com.microsoft.azure.management.notificationhubs.AdmCredential; -import com.microsoft.azure.management.notificationhubs.BaiduCredential; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of a NotificationHub PNS Credentials. - */ -@JsonFlatten -public class PnsCredentialsResourceInner extends Resource { - /** - * The ApnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.apnsCredential") - private ApnsCredential apnsCredential; - - /** - * The WnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.wnsCredential") - private WnsCredential wnsCredential; - - /** - * The GcmCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.gcmCredential") - private GcmCredential gcmCredential; - - /** - * The MpnsCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.mpnsCredential") - private MpnsCredential mpnsCredential; - - /** - * The AdmCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.admCredential") - private AdmCredential admCredential; - - /** - * The BaiduCredential of the created NotificationHub. - */ - @JsonProperty(value = "properties.baiduCredential") - private BaiduCredential baiduCredential; - - /** - * Get the apnsCredential value. - * - * @return the apnsCredential value - */ - public ApnsCredential apnsCredential() { - return this.apnsCredential; - } - - /** - * Set the apnsCredential value. - * - * @param apnsCredential the apnsCredential value to set - * @return the PnsCredentialsResourceInner object itself. - */ - public PnsCredentialsResourceInner withApnsCredential(ApnsCredential apnsCredential) { - this.apnsCredential = apnsCredential; - return this; - } - - /** - * Get the wnsCredential value. - * - * @return the wnsCredential value - */ - public WnsCredential wnsCredential() { - return this.wnsCredential; - } - - /** - * Set the wnsCredential value. - * - * @param wnsCredential the wnsCredential value to set - * @return the PnsCredentialsResourceInner object itself. - */ - public PnsCredentialsResourceInner withWnsCredential(WnsCredential wnsCredential) { - this.wnsCredential = wnsCredential; - return this; - } - - /** - * Get the gcmCredential value. - * - * @return the gcmCredential value - */ - public GcmCredential gcmCredential() { - return this.gcmCredential; - } - - /** - * Set the gcmCredential value. - * - * @param gcmCredential the gcmCredential value to set - * @return the PnsCredentialsResourceInner object itself. - */ - public PnsCredentialsResourceInner withGcmCredential(GcmCredential gcmCredential) { - this.gcmCredential = gcmCredential; - return this; - } - - /** - * Get the mpnsCredential value. - * - * @return the mpnsCredential value - */ - public MpnsCredential mpnsCredential() { - return this.mpnsCredential; - } - - /** - * Set the mpnsCredential value. - * - * @param mpnsCredential the mpnsCredential value to set - * @return the PnsCredentialsResourceInner object itself. - */ - public PnsCredentialsResourceInner withMpnsCredential(MpnsCredential mpnsCredential) { - this.mpnsCredential = mpnsCredential; - return this; - } - - /** - * Get the admCredential value. - * - * @return the admCredential value - */ - public AdmCredential admCredential() { - return this.admCredential; - } - - /** - * Set the admCredential value. - * - * @param admCredential the admCredential value to set - * @return the PnsCredentialsResourceInner object itself. - */ - public PnsCredentialsResourceInner withAdmCredential(AdmCredential admCredential) { - this.admCredential = admCredential; - return this; - } - - /** - * Get the baiduCredential value. - * - * @return the baiduCredential value - */ - public BaiduCredential baiduCredential() { - return this.baiduCredential; - } - - /** - * Set the baiduCredential value. - * - * @param baiduCredential the baiduCredential value to set - * @return the PnsCredentialsResourceInner object itself. - */ - public PnsCredentialsResourceInner withBaiduCredential(BaiduCredential baiduCredential) { - this.baiduCredential = baiduCredential; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/ResourceListKeysInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/ResourceListKeysInner.java deleted file mode 100644 index 040868fbcd7..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/ResourceListKeysInner.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Namespace/NotificationHub Connection String. - */ -public class ResourceListKeysInner { - /** - * PrimaryConnectionString of the AuthorizationRule. - */ - @JsonProperty(value = "primaryConnectionString") - private String primaryConnectionString; - - /** - * SecondaryConnectionString of the created AuthorizationRule. - */ - @JsonProperty(value = "secondaryConnectionString") - private String secondaryConnectionString; - - /** - * PrimaryKey of the created AuthorizationRule. - */ - @JsonProperty(value = "primaryKey") - private String primaryKey; - - /** - * SecondaryKey of the created AuthorizationRule. - */ - @JsonProperty(value = "secondaryKey") - private String secondaryKey; - - /** - * KeyName of the created AuthorizationRule. - */ - @JsonProperty(value = "keyName") - private String keyName; - - /** - * Get the primaryConnectionString value. - * - * @return the primaryConnectionString value - */ - public String primaryConnectionString() { - return this.primaryConnectionString; - } - - /** - * Set the primaryConnectionString value. - * - * @param primaryConnectionString the primaryConnectionString value to set - * @return the ResourceListKeysInner object itself. - */ - public ResourceListKeysInner withPrimaryConnectionString(String primaryConnectionString) { - this.primaryConnectionString = primaryConnectionString; - return this; - } - - /** - * Get the secondaryConnectionString value. - * - * @return the secondaryConnectionString value - */ - public String secondaryConnectionString() { - return this.secondaryConnectionString; - } - - /** - * Set the secondaryConnectionString value. - * - * @param secondaryConnectionString the secondaryConnectionString value to set - * @return the ResourceListKeysInner object itself. - */ - public ResourceListKeysInner withSecondaryConnectionString(String secondaryConnectionString) { - this.secondaryConnectionString = secondaryConnectionString; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the ResourceListKeysInner object itself. - */ - public ResourceListKeysInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the ResourceListKeysInner object itself. - */ - public ResourceListKeysInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Get the keyName value. - * - * @return the keyName value - */ - public String keyName() { - return this.keyName; - } - - /** - * Set the keyName value. - * - * @param keyName the keyName value to set - * @return the ResourceListKeysInner object itself. - */ - public ResourceListKeysInner withKeyName(String keyName) { - this.keyName = keyName; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleCreateOrUpdateParametersInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleCreateOrUpdateParametersInner.java deleted file mode 100644 index 94a1111d2f0..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleCreateOrUpdateParametersInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import com.microsoft.azure.management.notificationhubs.SharedAccessAuthorizationRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; - -/** - * Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. - */ -public class SharedAccessAuthorizationRuleCreateOrUpdateParametersInner extends Resource { - /** - * Properties of the Namespace AuthorizationRules. - */ - @JsonProperty(value = "properties", required = true) - private SharedAccessAuthorizationRuleProperties properties; - - /** - * Get the properties value. - * - * @return the properties value - */ - public SharedAccessAuthorizationRuleProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the SharedAccessAuthorizationRuleCreateOrUpdateParametersInner object itself. - */ - public SharedAccessAuthorizationRuleCreateOrUpdateParametersInner withProperties(SharedAccessAuthorizationRuleProperties properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleResourceInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleResourceInner.java deleted file mode 100644 index a8c1b76cd9c..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleResourceInner.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.notificationhubs.implementation; - -import java.util.List; -import com.microsoft.azure.management.notificationhubs.AccessRights; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of a Namespace AuthorizationRules. - */ -@JsonFlatten -public class SharedAccessAuthorizationRuleResourceInner extends Resource { - /** - * The rights associated with the rule. - */ - @JsonProperty(value = "properties.rights") - private List rights; - - /** - * Get the rights value. - * - * @return the rights value - */ - public List rights() { - return this.rights; - } - - /** - * Set the rights value. - * - * @param rights the rights value to set - * @return the SharedAccessAuthorizationRuleResourceInner object itself. - */ - public SharedAccessAuthorizationRuleResourceInner withRights(List rights) { - this.rights = rights; - return this; - } - -} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/package-info.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/package-info.java deleted file mode 100644 index c29ea168933..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for NotificationHubsManagementClient. - * Azure NotificationHub client. - */ -package com.microsoft.azure.management.notificationhubs.implementation; diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/package-info.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/package-info.java deleted file mode 100644 index b7fa0f7cd2b..00000000000 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for NotificationHubsManagementClient. - * Azure NotificationHub client. - */ -package com.microsoft.azure.management.notificationhubs; diff --git a/azure-mgmt-powerbi/pom.xml b/azure-mgmt-powerbi/pom.xml deleted file mode 100755 index abfaa3b672f..00000000000 --- a/azure-mgmt-powerbi/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-powerbi - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for PowerBI Management - This package contains Microsoft PowerBI Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/AccessKeyName.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/AccessKeyName.java deleted file mode 100755 index 599fd5d94b8..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/AccessKeyName.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AccessKeyName. - */ -public enum AccessKeyName { - /** Enum value key1. */ - KEY1("key1"), - - /** Enum value key2. */ - KEY2("key2"); - - /** The actual serialized value for a AccessKeyName instance. */ - private String value; - - AccessKeyName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AccessKeyName instance. - * - * @param value the serialized value to parse. - * @return the parsed AccessKeyName object, or null if unable to parse. - */ - @JsonCreator - public static AccessKeyName fromString(String value) { - AccessKeyName[] items = AccessKeyName.values(); - for (AccessKeyName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/AzureSku.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/AzureSku.java deleted file mode 100755 index 0a78c9894df..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/AzureSku.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The AzureSku model. - */ -public class AzureSku { - /** - * SKU name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * SKU tier. - */ - @JsonProperty(value = "tier", required = true) - private String tier; - - /** - * Creates an instance of AzureSku class. - */ - public AzureSku() { - name = "S1"; - tier = "Standard"; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the AzureSku object itself. - */ - public AzureSku withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier value. - * - * @return the tier value - */ - public String tier() { - return this.tier; - } - - /** - * Set the tier value. - * - * @param tier the tier value to set - * @return the AzureSku object itself. - */ - public AzureSku withTier(String tier) { - this.tier = tier; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/CheckNameReason.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/CheckNameReason.java deleted file mode 100755 index dcf23071a6d..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/CheckNameReason.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for CheckNameReason. - */ -public final class CheckNameReason { - /** Static value Unavailable for CheckNameReason. */ - public static final CheckNameReason UNAVAILABLE = new CheckNameReason("Unavailable"); - - /** Static value Invalid for CheckNameReason. */ - public static final CheckNameReason INVALID = new CheckNameReason("Invalid"); - - private String value; - - /** - * Creates a custom value for CheckNameReason. - * @param value the custom value - */ - public CheckNameReason(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof CheckNameReason)) { - return false; - } - if (obj == this) { - return true; - } - CheckNameReason rhs = (CheckNameReason) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Display.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Display.java deleted file mode 100755 index ba94b0470b8..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Display.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Display model. - */ -public class Display { - /** - * The localized friendly form of the resource provider name. This form is - * also expected to include the publisher/company responsible. Use Title - * Casing. Begin with "Microsoft" for 1st party services. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * The localized friendly form of the resource type related to this - * action/operation. This form should match the public documentation for - * the resource provider. Use Title Casing. For examples, refer to the - * "name" section. - */ - @JsonProperty(value = "resource") - private String resource; - - /** - * The localized friendly name for the operation as shown to the user. This - * name should be concise (to fit in drop downs), but clear - * (self-documenting). Use Title Casing and include the entity/resource to - * which it applies. - */ - @JsonProperty(value = "operation") - private String operation; - - /** - * The localized friendly description for the operation as shown to the - * user. This description should be thorough, yet concise. It will be used - * in tool-tips and detailed views. - */ - @JsonProperty(value = "description") - private String description; - - /** - * The intended executor of the operation; governs the display of the - * operation in the RBAC UX and the audit logs UX. Default value is - * 'user,system'. - */ - @JsonProperty(value = "origin") - private String origin; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the Display object itself. - */ - public Display withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource value. - * - * @param resource the resource value to set - * @return the Display object itself. - */ - public Display withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the Display object itself. - */ - public Display withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the Display object itself. - */ - public Display withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the origin value. - * - * @return the origin value - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin value. - * - * @param origin the origin value to set - * @return the Display object itself. - */ - public Display withOrigin(String origin) { - this.origin = origin; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Error.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Error.java deleted file mode 100755 index bb079c21f72..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Error.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Error model. - */ -public class Error { - /** - * The code property. - */ - @JsonProperty(value = "code") - private String code; - - /** - * The message property. - */ - @JsonProperty(value = "message") - private String message; - - /** - * The target property. - */ - @JsonProperty(value = "target") - private String target; - - /** - * The details property. - */ - @JsonProperty(value = "details") - private List details; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the Error object itself. - */ - public Error withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the Error object itself. - */ - public Error withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the target value. - * - * @return the target value - */ - public String target() { - return this.target; - } - - /** - * Set the target value. - * - * @param target the target value to set - * @return the Error object itself. - */ - public Error withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the details value. - * - * @return the details value - */ - public List details() { - return this.details; - } - - /** - * Set the details value. - * - * @param details the details value to set - * @return the Error object itself. - */ - public Error withDetails(List details) { - this.details = details; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/ErrorDetail.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/ErrorDetail.java deleted file mode 100755 index a565651840e..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/ErrorDetail.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The ErrorDetail model. - */ -public class ErrorDetail { - /** - * The code property. - */ - @JsonProperty(value = "code") - private String code; - - /** - * The message property. - */ - @JsonProperty(value = "message") - private String message; - - /** - * The target property. - */ - @JsonProperty(value = "target") - private String target; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ErrorDetail object itself. - */ - public ErrorDetail withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ErrorDetail object itself. - */ - public ErrorDetail withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the target value. - * - * @return the target value - */ - public String target() { - return this.target; - } - - /** - * Set the target value. - * - * @param target the target value to set - * @return the ErrorDetail object itself. - */ - public ErrorDetail withTarget(String target) { - this.target = target; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/ErrorException.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/ErrorException.java deleted file mode 100755 index 56e55f8585d..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/ErrorException.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with Error information. - */ -public class ErrorException extends RestException { - /** - * Initializes a new instance of the ErrorException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorException(final String message, final Response response, final Error body) { - super(message, response, body); - } - - @Override - public Error body() { - return (Error) super.body(); - } -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Operation.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Operation.java deleted file mode 100755 index a50c0ab1c92..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/Operation.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Operation model. - */ -public class Operation { - /** - * The name of the operation being performed on this particular object. - * This name should match the action name that appears in RBAC / the event - * service. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The display property. - */ - @JsonProperty(value = "display") - private Display display; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Operation object itself. - */ - public Operation withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display value. - * - * @return the display value - */ - public Display display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the Operation object itself. - */ - public Operation withDisplay(Display display) { - this.display = display; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/UpdateWorkspaceCollectionRequest.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/UpdateWorkspaceCollectionRequest.java deleted file mode 100755 index 3cc69d4a335..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/UpdateWorkspaceCollectionRequest.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The UpdateWorkspaceCollectionRequest model. - */ -public class UpdateWorkspaceCollectionRequest { - /** - * The tags property. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * The sku property. - */ - @JsonProperty(value = "sku") - private AzureSku sku; - - /** - * Creates an instance of UpdateWorkspaceCollectionRequest class. - */ - public UpdateWorkspaceCollectionRequest() { - sku = new AzureSku(); - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the UpdateWorkspaceCollectionRequest object itself. - */ - public UpdateWorkspaceCollectionRequest withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public AzureSku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the UpdateWorkspaceCollectionRequest object itself. - */ - public UpdateWorkspaceCollectionRequest withSku(AzureSku sku) { - this.sku = sku; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/WorkspaceCollectionAccessKey.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/WorkspaceCollectionAccessKey.java deleted file mode 100755 index a09157cc07e..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/WorkspaceCollectionAccessKey.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The WorkspaceCollectionAccessKey model. - */ -public class WorkspaceCollectionAccessKey { - /** - * Key name. Possible values include: 'key1', 'key2'. - */ - @JsonProperty(value = "keyName") - private AccessKeyName keyName; - - /** - * Get the keyName value. - * - * @return the keyName value - */ - public AccessKeyName keyName() { - return this.keyName; - } - - /** - * Set the keyName value. - * - * @param keyName the keyName value to set - * @return the WorkspaceCollectionAccessKey object itself. - */ - public WorkspaceCollectionAccessKey withKeyName(AccessKeyName keyName) { - this.keyName = keyName; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CheckNameRequestInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CheckNameRequestInner.java deleted file mode 100755 index 05152262e31..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CheckNameRequestInner.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The CheckNameRequestInner model. - */ -public class CheckNameRequestInner { - /** - * Workspace collection name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Resource type. - */ - @JsonProperty(value = "type") - private String type; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the CheckNameRequestInner object itself. - */ - public CheckNameRequestInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the CheckNameRequestInner object itself. - */ - public CheckNameRequestInner withType(String type) { - this.type = type; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CheckNameResponseInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CheckNameResponseInner.java deleted file mode 100755 index 6c763296214..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CheckNameResponseInner.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import com.microsoft.azure.management.powerbi.CheckNameReason; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The CheckNameResponseInner model. - */ -public class CheckNameResponseInner { - /** - * Specifies a Boolean value that indicates whether the specified Power BI - * Workspace Collection name is available to use. - */ - @JsonProperty(value = "nameAvailable") - private Boolean nameAvailable; - - /** - * Reason why the workspace collection name cannot be used. Possible values - * include: 'Unavailable', 'Invalid'. - */ - @JsonProperty(value = "reason") - private CheckNameReason reason; - - /** - * Message indicating an unavailable name due to a conflict, or a - * description of the naming rules that are violated. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the nameAvailable value. - * - * @return the nameAvailable value - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable value. - * - * @param nameAvailable the nameAvailable value to set - * @return the CheckNameResponseInner object itself. - */ - public CheckNameResponseInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - - /** - * Get the reason value. - * - * @return the reason value - */ - public CheckNameReason reason() { - return this.reason; - } - - /** - * Set the reason value. - * - * @param reason the reason value to set - * @return the CheckNameResponseInner object itself. - */ - public CheckNameResponseInner withReason(CheckNameReason reason) { - this.reason = reason; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the CheckNameResponseInner object itself. - */ - public CheckNameResponseInner withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CreateWorkspaceCollectionRequestInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CreateWorkspaceCollectionRequestInner.java deleted file mode 100755 index a7b56107148..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/CreateWorkspaceCollectionRequestInner.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import java.util.Map; -import com.microsoft.azure.management.powerbi.AzureSku; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The CreateWorkspaceCollectionRequestInner model. - */ -public class CreateWorkspaceCollectionRequestInner { - /** - * Azure location. - */ - @JsonProperty(value = "location") - private String location; - - /** - * The tags property. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * The sku property. - */ - @JsonProperty(value = "sku") - private AzureSku sku; - - /** - * Creates an instance of CreateWorkspaceCollectionRequestInner class. - */ - public CreateWorkspaceCollectionRequestInner() { - sku = new AzureSku(); - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the CreateWorkspaceCollectionRequestInner object itself. - */ - public CreateWorkspaceCollectionRequestInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the CreateWorkspaceCollectionRequestInner object itself. - */ - public CreateWorkspaceCollectionRequestInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public AzureSku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the CreateWorkspaceCollectionRequestInner object itself. - */ - public CreateWorkspaceCollectionRequestInner withSku(AzureSku sku) { - this.sku = sku; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/MigrateWorkspaceCollectionRequestInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/MigrateWorkspaceCollectionRequestInner.java deleted file mode 100755 index 81f9b68938b..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/MigrateWorkspaceCollectionRequestInner.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The MigrateWorkspaceCollectionRequestInner model. - */ -public class MigrateWorkspaceCollectionRequestInner { - /** - * Name of the resource group the Power BI workspace collections will be - * migrated to. - */ - @JsonProperty(value = "targetResourceGroup") - private String targetResourceGroup; - - /** - * The resources property. - */ - @JsonProperty(value = "resources") - private List resources; - - /** - * Get the targetResourceGroup value. - * - * @return the targetResourceGroup value - */ - public String targetResourceGroup() { - return this.targetResourceGroup; - } - - /** - * Set the targetResourceGroup value. - * - * @param targetResourceGroup the targetResourceGroup value to set - * @return the MigrateWorkspaceCollectionRequestInner object itself. - */ - public MigrateWorkspaceCollectionRequestInner withTargetResourceGroup(String targetResourceGroup) { - this.targetResourceGroup = targetResourceGroup; - return this; - } - - /** - * Get the resources value. - * - * @return the resources value - */ - public List resources() { - return this.resources; - } - - /** - * Set the resources value. - * - * @param resources the resources value to set - * @return the MigrateWorkspaceCollectionRequestInner object itself. - */ - public MigrateWorkspaceCollectionRequestInner withResources(List resources) { - this.resources = resources; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/OperationListInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/OperationListInner.java deleted file mode 100755 index 0e1d01540e4..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/OperationListInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import java.util.List; -import com.microsoft.azure.management.powerbi.Operation; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The OperationListInner model. - */ -public class OperationListInner { - /** - * The value property. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the OperationListInner object itself. - */ - public OperationListInner withValue(List value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PageImpl.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PageImpl.java deleted file mode 100755 index 95a355dc5ae..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PowerBIEmbeddedManagementClientImpl.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PowerBIEmbeddedManagementClientImpl.java deleted file mode 100755 index 8e0d1961785..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PowerBIEmbeddedManagementClientImpl.java +++ /dev/null @@ -1,312 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.management.powerbi.ErrorException; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * Initializes a new instance of the PowerBIEmbeddedManagementClientImpl class. - */ -public class PowerBIEmbeddedManagementClientImpl extends AzureServiceClient { - /** The Retrofit service to perform REST calls. */ - private PowerBIEmbeddedManagementClientService service; - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Gets subscription credentials which uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ - private String subscriptionId; - - /** - * Gets Gets subscription credentials which uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Gets subscription credentials which uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public PowerBIEmbeddedManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Client Api Version. */ - private String apiVersion; - - /** - * Gets Client Api Version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public PowerBIEmbeddedManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public PowerBIEmbeddedManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public PowerBIEmbeddedManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The WorkspaceCollectionsInner object to access its operations. - */ - private WorkspaceCollectionsInner workspaceCollections; - - /** - * Gets the WorkspaceCollectionsInner object to access its operations. - * @return the WorkspaceCollectionsInner object. - */ - public WorkspaceCollectionsInner workspaceCollections() { - return this.workspaceCollections; - } - - /** - * The WorkspacesInner object to access its operations. - */ - private WorkspacesInner workspaces; - - /** - * Gets the WorkspacesInner object to access its operations. - * @return the WorkspacesInner object. - */ - public WorkspacesInner workspaces() { - return this.workspaces; - } - - /** - * Initializes an instance of PowerBIEmbeddedManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public PowerBIEmbeddedManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of PowerBIEmbeddedManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public PowerBIEmbeddedManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of PowerBIEmbeddedManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public PowerBIEmbeddedManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2016-01-29"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.workspaceCollections = new WorkspaceCollectionsInner(restClient().retrofit(), this); - this.workspaces = new WorkspacesInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - initializeService(); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "PowerBIEmbeddedManagementClient", "2016-01-29"); - } - - private void initializeService() { - service = restClient().retrofit().create(PowerBIEmbeddedManagementClientService.class); - } - - /** - * The interface defining all the services for PowerBIEmbeddedManagementClient to be - * used by Retrofit to perform actually REST calls. - */ - interface PowerBIEmbeddedManagementClientService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.PowerBIEmbeddedManagementClient getAvailableOperations" }) - @GET("providers/Microsoft.PowerBI/operations") - Observable> getAvailableOperations(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Indicates which operations can be performed by the Power BI Resource Provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationListInner object if successful. - */ - public OperationListInner getAvailableOperations() { - return getAvailableOperationsWithServiceResponseAsync().toBlocking().single().body(); - } - - /** - * Indicates which operations can be performed by the Power BI Resource Provider. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAvailableOperationsAsync(final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAvailableOperationsWithServiceResponseAsync(), serviceCallback); - } - - /** - * Indicates which operations can be performed by the Power BI Resource Provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationListInner object - */ - public Observable getAvailableOperationsAsync() { - return getAvailableOperationsWithServiceResponseAsync().map(new Func1, OperationListInner>() { - @Override - public OperationListInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Indicates which operations can be performed by the Power BI Resource Provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationListInner object - */ - public Observable> getAvailableOperationsWithServiceResponseAsync() { - if (this.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); - } - return service.getAvailableOperations(this.apiVersion(), this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getAvailableOperationsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getAvailableOperationsDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PowerBIManager.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PowerBIManager.java deleted file mode 100755 index 16696b38eba..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/PowerBIManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure PowerBI resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class PowerBIManager extends Manager { - /** - * Get a Configurable instance that can be used to create PowerBIManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new PowerBIManager.ConfigurableImpl(); - } - /** - * Creates an instance of PowerBIManager that exposes PowerBI resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the PowerBIManager - */ - public static PowerBIManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new PowerBIManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of PowerBIManager that exposes PowerBI resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the PowerBIManager - */ - public static PowerBIManager authenticate(RestClient restClient, String subscriptionId) { - return new PowerBIManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of PowerBIManager that exposes PowerBI management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing PowerBI management API entry points that work across subscriptions - */ - PowerBIManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public PowerBIManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return PowerBIManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private PowerBIManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new PowerBIEmbeddedManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionAccessKeysInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionAccessKeysInner.java deleted file mode 100755 index b17f10dbdb8..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionAccessKeysInner.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The WorkspaceCollectionAccessKeysInner model. - */ -public class WorkspaceCollectionAccessKeysInner { - /** - * Access key 1. - */ - @JsonProperty(value = "key1") - private String key1; - - /** - * Access key 2. - */ - @JsonProperty(value = "key2") - private String key2; - - /** - * Get the key1 value. - * - * @return the key1 value - */ - public String key1() { - return this.key1; - } - - /** - * Set the key1 value. - * - * @param key1 the key1 value to set - * @return the WorkspaceCollectionAccessKeysInner object itself. - */ - public WorkspaceCollectionAccessKeysInner withKey1(String key1) { - this.key1 = key1; - return this; - } - - /** - * Get the key2 value. - * - * @return the key2 value - */ - public String key2() { - return this.key2; - } - - /** - * Set the key2 value. - * - * @param key2 the key2 value to set - * @return the WorkspaceCollectionAccessKeysInner object itself. - */ - public WorkspaceCollectionAccessKeysInner withKey2(String key2) { - this.key2 = key2; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionInner.java deleted file mode 100755 index d6795e6765a..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionInner.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import java.util.Map; -import com.microsoft.azure.management.powerbi.AzureSku; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The WorkspaceCollectionInner model. - */ -public class WorkspaceCollectionInner { - /** - * Resource id. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Workspace collection name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Resource type. - */ - @JsonProperty(value = "type") - private String type; - - /** - * Azure location. - */ - @JsonProperty(value = "location") - private String location; - - /** - * The tags property. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * The sku property. - */ - @JsonProperty(value = "sku") - private AzureSku sku; - - /** - * Properties. - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * Creates an instance of WorkspaceCollectionInner class. - */ - public WorkspaceCollectionInner() { - sku = new AzureSku(); - } - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the WorkspaceCollectionInner object itself. - */ - public WorkspaceCollectionInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the WorkspaceCollectionInner object itself. - */ - public WorkspaceCollectionInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the WorkspaceCollectionInner object itself. - */ - public WorkspaceCollectionInner withType(String type) { - this.type = type; - return this; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the WorkspaceCollectionInner object itself. - */ - public WorkspaceCollectionInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the WorkspaceCollectionInner object itself. - */ - public WorkspaceCollectionInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public AzureSku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the WorkspaceCollectionInner object itself. - */ - public WorkspaceCollectionInner withSku(AzureSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the WorkspaceCollectionInner object itself. - */ - public WorkspaceCollectionInner withProperties(Object properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionsInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionsInner.java deleted file mode 100755 index b06dadc8b1f..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionsInner.java +++ /dev/null @@ -1,1207 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.powerbi.AccessKeyName; -import com.microsoft.azure.management.powerbi.ErrorException; -import com.microsoft.azure.management.powerbi.UpdateWorkspaceCollectionRequest; -import com.microsoft.azure.management.powerbi.WorkspaceCollectionAccessKey; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WorkspaceCollections. - */ -public class WorkspaceCollectionsInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private WorkspaceCollectionsService service; - /** The service client containing this operation class. */ - private PowerBIEmbeddedManagementClientImpl client; - - /** - * Initializes an instance of WorkspaceCollectionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WorkspaceCollectionsInner(Retrofit retrofit, PowerBIEmbeddedManagementClientImpl client) { - this.service = retrofit.create(WorkspaceCollectionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for WorkspaceCollections to be - * used by Retrofit to perform actually REST calls. - */ - interface WorkspaceCollectionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceCollectionName") String workspaceCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}") - Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceCollectionName") String workspaceCollectionName, @Query("api-version") String apiVersion, @Body CreateWorkspaceCollectionRequestInner body, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceCollectionName") String workspaceCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateWorkspaceCollectionRequest body, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceCollectionName") String workspaceCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceCollectionName") String workspaceCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections checkNameAvailability" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/locations/{location}/checkNameAvailability") - Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Body CheckNameRequestInner body, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections listBySubscription" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/workspaceCollections") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections getAccessKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/listKeys") - Observable> getAccessKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceCollectionName") String workspaceCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections regenerateKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/regenerateKey") - Observable> regenerateKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceCollectionName") String workspaceCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body WorkspaceCollectionAccessKey body, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.WorkspaceCollections migrate" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") - Observable> migrate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Body MigrateWorkspaceCollectionRequestInner body, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Retrieves an existing Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkspaceCollectionInner object if successful. - */ - public WorkspaceCollectionInner getByResourceGroup(String resourceGroupName, String workspaceCollectionName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).toBlocking().single().body(); - } - - /** - * Retrieves an existing Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String workspaceCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceCollectionName), serviceCallback); - } - - /** - * Retrieves an existing Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String workspaceCollectionName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).map(new Func1, WorkspaceCollectionInner>() { - @Override - public WorkspaceCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Retrieves an existing Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Creates a new Power BI Workspace Collection with the specified properties. A Power BI Workspace Collection contains one or more workspaces, and can be used to provision keys that provide API access to those workspaces. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param body Create workspace collection request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkspaceCollectionInner object if successful. - */ - public WorkspaceCollectionInner create(String resourceGroupName, String workspaceCollectionName, CreateWorkspaceCollectionRequestInner body) { - return createWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, body).toBlocking().single().body(); - } - - /** - * Creates a new Power BI Workspace Collection with the specified properties. A Power BI Workspace Collection contains one or more workspaces, and can be used to provision keys that provide API access to those workspaces. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param body Create workspace collection request - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String workspaceCollectionName, CreateWorkspaceCollectionRequestInner body, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, body), serviceCallback); - } - - /** - * Creates a new Power BI Workspace Collection with the specified properties. A Power BI Workspace Collection contains one or more workspaces, and can be used to provision keys that provide API access to those workspaces. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param body Create workspace collection request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionInner object - */ - public Observable createAsync(String resourceGroupName, String workspaceCollectionName, CreateWorkspaceCollectionRequestInner body) { - return createWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, body).map(new Func1, WorkspaceCollectionInner>() { - @Override - public WorkspaceCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a new Power BI Workspace Collection with the specified properties. A Power BI Workspace Collection contains one or more workspaces, and can be used to provision keys that provide API access to those workspaces. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param body Create workspace collection request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionInner object - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName, CreateWorkspaceCollectionRequestInner body) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (body == null) { - throw new IllegalArgumentException("Parameter body is required and cannot be null."); - } - Validator.validate(body); - return service.create(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), body, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Update an existing Power BI Workspace Collection with the specified properties. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkspaceCollectionInner object if successful. - */ - public WorkspaceCollectionInner update(String resourceGroupName, String workspaceCollectionName) { - return updateWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).toBlocking().single().body(); - } - - /** - * Update an existing Power BI Workspace Collection with the specified properties. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String workspaceCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceCollectionName), serviceCallback); - } - - /** - * Update an existing Power BI Workspace Collection with the specified properties. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionInner object - */ - public Observable updateAsync(String resourceGroupName, String workspaceCollectionName) { - return updateWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).map(new Func1, WorkspaceCollectionInner>() { - @Override - public WorkspaceCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update an existing Power BI Workspace Collection with the specified properties. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - UpdateWorkspaceCollectionRequest body = new UpdateWorkspaceCollectionRequest(); - body.withTags(null); - return service.update(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), body, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Update an existing Power BI Workspace Collection with the specified properties. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param tags the Map<String, String> value - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkspaceCollectionInner object if successful. - */ - public WorkspaceCollectionInner update(String resourceGroupName, String workspaceCollectionName, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, tags).toBlocking().single().body(); - } - - /** - * Update an existing Power BI Workspace Collection with the specified properties. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param tags the Map<String, String> value - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String workspaceCollectionName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, tags), serviceCallback); - } - - /** - * Update an existing Power BI Workspace Collection with the specified properties. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param tags the Map<String, String> value - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionInner object - */ - public Observable updateAsync(String resourceGroupName, String workspaceCollectionName, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, tags).map(new Func1, WorkspaceCollectionInner>() { - @Override - public WorkspaceCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update an existing Power BI Workspace Collection with the specified properties. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param tags the Map<String, String> value - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName, Map tags) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - UpdateWorkspaceCollectionRequest body = new UpdateWorkspaceCollectionRequest(); - body.withTags(tags); - return service.update(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), body, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Delete a Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String workspaceCollectionName) { - deleteWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).toBlocking().last().body(); - } - - /** - * Delete a Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String workspaceCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceCollectionName), serviceCallback); - } - - /** - * Delete a Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String workspaceCollectionName) { - return deleteWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete a Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete a Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String workspaceCollectionName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).toBlocking().single().body(); - } - - /** - * Delete a Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String workspaceCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceCollectionName), serviceCallback); - } - - /** - * Delete a Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String workspaceCollectionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete a Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Verify the specified Power BI Workspace Collection name is valid and not already in use. - * - * @param location Azure location - * @param body Check name availability request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CheckNameResponseInner object if successful. - */ - public CheckNameResponseInner checkNameAvailability(String location, CheckNameRequestInner body) { - return checkNameAvailabilityWithServiceResponseAsync(location, body).toBlocking().single().body(); - } - - /** - * Verify the specified Power BI Workspace Collection name is valid and not already in use. - * - * @param location Azure location - * @param body Check name availability request - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkNameAvailabilityAsync(String location, CheckNameRequestInner body, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, body), serviceCallback); - } - - /** - * Verify the specified Power BI Workspace Collection name is valid and not already in use. - * - * @param location Azure location - * @param body Check name availability request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameResponseInner object - */ - public Observable checkNameAvailabilityAsync(String location, CheckNameRequestInner body) { - return checkNameAvailabilityWithServiceResponseAsync(location, body).map(new Func1, CheckNameResponseInner>() { - @Override - public CheckNameResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Verify the specified Power BI Workspace Collection name is valid and not already in use. - * - * @param location Azure location - * @param body Check name availability request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameResponseInner object - */ - public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, CheckNameRequestInner body) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (body == null) { - throw new IllegalArgumentException("Parameter body is required and cannot be null."); - } - Validator.validate(body); - return service.checkNameAvailability(this.client.subscriptionId(), location, this.client.apiVersion(), body, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkNameAvailabilityDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Retrieves all existing Power BI workspace collections in the specified resource group. - * - * @param resourceGroupName Azure resource group - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException 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<WorkspaceCollectionInner> object if successful. - */ - public List listByResourceGroup(String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body(); - } - - /** - * Retrieves all existing Power BI workspace collections in the specified resource group. - * - * @param resourceGroupName Azure resource group - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); - } - - /** - * Retrieves all existing Power BI workspace collections in the specified resource group. - * - * @param resourceGroupName Azure resource group - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<WorkspaceCollectionInner> object - */ - public Observable> listByResourceGroupAsync(String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Retrieves all existing Power BI workspace collections in the specified resource group. - * - * @param resourceGroupName Azure resource group - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<WorkspaceCollectionInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Retrieves all existing Power BI workspace collections in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException 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<WorkspaceCollectionInner> object if successful. - */ - public List listBySubscription() { - return listBySubscriptionWithServiceResponseAsync().toBlocking().single().body(); - } - - /** - * Retrieves all existing Power BI workspace collections in the specified subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listBySubscriptionWithServiceResponseAsync(), serviceCallback); - } - - /** - * Retrieves all existing Power BI workspace collections in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<WorkspaceCollectionInner> object - */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync().map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Retrieves all existing Power BI workspace collections in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<WorkspaceCollectionInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Retrieves the primary and secondary access keys for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkspaceCollectionAccessKeysInner object if successful. - */ - public WorkspaceCollectionAccessKeysInner getAccessKeys(String resourceGroupName, String workspaceCollectionName) { - return getAccessKeysWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).toBlocking().single().body(); - } - - /** - * Retrieves the primary and secondary access keys for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAccessKeysAsync(String resourceGroupName, String workspaceCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAccessKeysWithServiceResponseAsync(resourceGroupName, workspaceCollectionName), serviceCallback); - } - - /** - * Retrieves the primary and secondary access keys for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionAccessKeysInner object - */ - public Observable getAccessKeysAsync(String resourceGroupName, String workspaceCollectionName) { - return getAccessKeysWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).map(new Func1, WorkspaceCollectionAccessKeysInner>() { - @Override - public WorkspaceCollectionAccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Retrieves the primary and secondary access keys for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionAccessKeysInner object - */ - public Observable> getAccessKeysWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAccessKeys(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getAccessKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getAccessKeysDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Regenerates the primary or secondary access key for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkspaceCollectionAccessKeysInner object if successful. - */ - public WorkspaceCollectionAccessKeysInner regenerateKey(String resourceGroupName, String workspaceCollectionName) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).toBlocking().single().body(); - } - - /** - * Regenerates the primary or secondary access key for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeyAsync(String resourceGroupName, String workspaceCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, workspaceCollectionName), serviceCallback); - } - - /** - * Regenerates the primary or secondary access key for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionAccessKeysInner object - */ - public Observable regenerateKeyAsync(String resourceGroupName, String workspaceCollectionName) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).map(new Func1, WorkspaceCollectionAccessKeysInner>() { - @Override - public WorkspaceCollectionAccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the primary or secondary access key for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionAccessKeysInner object - */ - public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final AccessKeyName keyName = null; - WorkspaceCollectionAccessKey body = new WorkspaceCollectionAccessKey(); - body.withKeyName(null); - return service.regenerateKey(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), body, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Regenerates the primary or secondary access key for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param keyName Key name. Possible values include: 'key1', 'key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WorkspaceCollectionAccessKeysInner object if successful. - */ - public WorkspaceCollectionAccessKeysInner regenerateKey(String resourceGroupName, String workspaceCollectionName, AccessKeyName keyName) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, keyName).toBlocking().single().body(); - } - - /** - * Regenerates the primary or secondary access key for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param keyName Key name. Possible values include: 'key1', 'key2' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeyAsync(String resourceGroupName, String workspaceCollectionName, AccessKeyName keyName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, keyName), serviceCallback); - } - - /** - * Regenerates the primary or secondary access key for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param keyName Key name. Possible values include: 'key1', 'key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionAccessKeysInner object - */ - public Observable regenerateKeyAsync(String resourceGroupName, String workspaceCollectionName, AccessKeyName keyName) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, workspaceCollectionName, keyName).map(new Func1, WorkspaceCollectionAccessKeysInner>() { - @Override - public WorkspaceCollectionAccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the primary or secondary access key for the specified Power BI Workspace Collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param keyName Key name. Possible values include: 'key1', 'key2' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkspaceCollectionAccessKeysInner object - */ - public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName, AccessKeyName keyName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - WorkspaceCollectionAccessKey body = new WorkspaceCollectionAccessKey(); - body.withKeyName(keyName); - return service.regenerateKey(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), body, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeyDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - - /** - * Migrates an existing Power BI Workspace Collection to a different resource group and/or subscription. - * - * @param resourceGroupName Azure resource group - * @param body Workspace migration request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void migrate(String resourceGroupName, MigrateWorkspaceCollectionRequestInner body) { - migrateWithServiceResponseAsync(resourceGroupName, body).toBlocking().single().body(); - } - - /** - * Migrates an existing Power BI Workspace Collection to a different resource group and/or subscription. - * - * @param resourceGroupName Azure resource group - * @param body Workspace migration request - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture migrateAsync(String resourceGroupName, MigrateWorkspaceCollectionRequestInner body, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(migrateWithServiceResponseAsync(resourceGroupName, body), serviceCallback); - } - - /** - * Migrates an existing Power BI Workspace Collection to a different resource group and/or subscription. - * - * @param resourceGroupName Azure resource group - * @param body Workspace migration request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable migrateAsync(String resourceGroupName, MigrateWorkspaceCollectionRequestInner body) { - return migrateWithServiceResponseAsync(resourceGroupName, body).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Migrates an existing Power BI Workspace Collection to a different resource group and/or subscription. - * - * @param resourceGroupName Azure resource group - * @param body Workspace migration request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> migrateWithServiceResponseAsync(String resourceGroupName, MigrateWorkspaceCollectionRequestInner body) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (body == null) { - throw new IllegalArgumentException("Parameter body is required and cannot be null."); - } - Validator.validate(body); - return service.migrate(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), body, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = migrateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse migrateDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceInner.java deleted file mode 100755 index 1fb718e9974..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceInner.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The WorkspaceInner model. - */ -public class WorkspaceInner { - /** - * Workspace id. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Workspace name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Resource type. - */ - @JsonProperty(value = "type") - private String type; - - /** - * Property bag. - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withType(String type) { - this.type = type; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withProperties(Object properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspacesInner.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspacesInner.java deleted file mode 100755 index ca25690e7d5..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspacesInner.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.powerbi.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.management.powerbi.ErrorException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Workspaces. - */ -public class WorkspacesInner { - /** The Retrofit service to perform REST calls. */ - private WorkspacesService service; - /** The service client containing this operation class. */ - private PowerBIEmbeddedManagementClientImpl client; - - /** - * Initializes an instance of WorkspacesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WorkspacesInner(Retrofit retrofit, PowerBIEmbeddedManagementClientImpl client) { - this.service = retrofit.create(WorkspacesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Workspaces to be - * used by Retrofit to perform actually REST calls. - */ - interface WorkspacesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.powerbi.Workspaces list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceCollectionName") String workspaceCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Retrieves all existing Power BI workspaces in the specified workspace collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorException 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<WorkspaceInner> object if successful. - */ - public List list(String resourceGroupName, String workspaceCollectionName) { - return listWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).toBlocking().single().body(); - } - - /** - * Retrieves all existing Power BI workspaces in the specified workspace collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(String resourceGroupName, String workspaceCollectionName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workspaceCollectionName), serviceCallback); - } - - /** - * Retrieves all existing Power BI workspaces in the specified workspace collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<WorkspaceInner> object - */ - public Observable> listAsync(String resourceGroupName, String workspaceCollectionName) { - return listWithServiceResponseAsync(resourceGroupName, workspaceCollectionName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Retrieves all existing Power BI workspaces in the specified workspace collection. - * - * @param resourceGroupName Azure resource group - * @param workspaceCollectionName Power BI Embedded Workspace Collection name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<WorkspaceInner> object - */ - public Observable>> listWithServiceResponseAsync(String resourceGroupName, String workspaceCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (workspaceCollectionName == null) { - throw new IllegalArgumentException("Parameter workspaceCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, workspaceCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorException.class) - .build(response); - } - -} diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/package-info.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/package-info.java deleted file mode 100755 index e79bf82233b..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for PowerBIEmbeddedManagementClient. - * Client to manage your Power BI Embedded workspace collections and retrieve workspaces. - */ -package com.microsoft.azure.management.powerbi.implementation; diff --git a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/package-info.java b/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/package-info.java deleted file mode 100755 index 619a78baf98..00000000000 --- a/azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for PowerBIEmbeddedManagementClient. - * Client to manage your Power BI Embedded workspace collections and retrieve workspaces. - */ -package com.microsoft.azure.management.powerbi; diff --git a/azure-mgmt-recoveryservices/pom.xml b/azure-mgmt-recoveryservices/pom.xml deleted file mode 100755 index e2ffc87ce35..00000000000 --- a/azure-mgmt-recoveryservices/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-recoveryservices - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for RecoveryServices Management - This package contains Microsoft RecoveryServices Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/AuthType.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/AuthType.java deleted file mode 100755 index d30fffc8393..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/AuthType.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AuthType. - */ -public final class AuthType { - /** Static value Invalid for AuthType. */ - public static final AuthType INVALID = new AuthType("Invalid"); - - /** Static value ACS for AuthType. */ - public static final AuthType ACS = new AuthType("ACS"); - - /** Static value AAD for AuthType. */ - public static final AuthType AAD = new AuthType("AAD"); - - /** Static value AccessControlService for AuthType. */ - public static final AuthType ACCESS_CONTROL_SERVICE = new AuthType("AccessControlService"); - - /** Static value AzureActiveDirectory for AuthType. */ - public static final AuthType AZURE_ACTIVE_DIRECTORY = new AuthType("AzureActiveDirectory"); - - private String value; - - /** - * Creates a custom value for AuthType. - * @param value the custom value - */ - public AuthType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof AuthType)) { - return false; - } - if (obj == this) { - return true; - } - AuthType rhs = (AuthType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/CertificateRequest.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/CertificateRequest.java deleted file mode 100755 index 4188b647c79..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/CertificateRequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.microsoft.azure.management.recoveryservices.implementation.RawCertificateDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Details of the certificate to be uploaded to the vault. - */ -public class CertificateRequest { - /** - * The properties property. - */ - @JsonProperty(value = "properties") - private RawCertificateDataInner properties; - - /** - * Get the properties value. - * - * @return the properties value - */ - public RawCertificateDataInner properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the CertificateRequest object itself. - */ - public CertificateRequest withProperties(RawCertificateDataInner properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryDisplay.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryDisplay.java deleted file mode 100755 index 6567ab03685..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryDisplay.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Localized display information of an operation. - */ -public class ClientDiscoveryDisplay { - /** - * Name of the resource provider. - */ - @JsonProperty(value = "Provider", access = JsonProperty.Access.WRITE_ONLY) - private String provider; - - /** - * Type of the resource. - */ - @JsonProperty(value = "Resource", access = JsonProperty.Access.WRITE_ONLY) - private String resource; - - /** - * Name of the operation. - */ - @JsonProperty(value = "Operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /** - * Operation description. - */ - @JsonProperty(value = "Description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryForLogSpecification.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryForLogSpecification.java deleted file mode 100755 index 6fd5868dae7..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryForLogSpecification.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Log specification for the operation. - */ -public class ClientDiscoveryForLogSpecification { - /** - * Name of the log. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Localized display name. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /** - * Blob duration. - */ - @JsonProperty(value = "blobDuration", access = JsonProperty.Access.WRITE_ONLY) - private DateTime blobDuration; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the blobDuration value. - * - * @return the blobDuration value - */ - public DateTime blobDuration() { - return this.blobDuration; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryForServiceSpecification.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryForServiceSpecification.java deleted file mode 100755 index d510bb240c7..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ClientDiscoveryForServiceSpecification.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Operation properties. - */ -public class ClientDiscoveryForServiceSpecification { - /** - * List of log specifications of this operation. - */ - @JsonProperty(value = "logSpecifications", access = JsonProperty.Access.WRITE_ONLY) - private List logSpecifications; - - /** - * Get the logSpecifications value. - * - * @return the logSpecifications value - */ - public List logSpecifications() { - return this.logSpecifications; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/EnhancedSecurityState.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/EnhancedSecurityState.java deleted file mode 100755 index 1f2412ee4c3..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/EnhancedSecurityState.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for EnhancedSecurityState. - */ -public final class EnhancedSecurityState { - /** Static value Invalid for EnhancedSecurityState. */ - public static final EnhancedSecurityState INVALID = new EnhancedSecurityState("Invalid"); - - /** Static value Enabled for EnhancedSecurityState. */ - public static final EnhancedSecurityState ENABLED = new EnhancedSecurityState("Enabled"); - - /** Static value Disabled for EnhancedSecurityState. */ - public static final EnhancedSecurityState DISABLED = new EnhancedSecurityState("Disabled"); - - private String value; - - /** - * Creates a custom value for EnhancedSecurityState. - * @param value the custom value - */ - public EnhancedSecurityState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof EnhancedSecurityState)) { - return false; - } - if (obj == this) { - return true; - } - EnhancedSecurityState rhs = (EnhancedSecurityState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/JobsSummary.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/JobsSummary.java deleted file mode 100755 index 98c91b9ff31..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/JobsSummary.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Summary of the replication job data for this vault. - */ -public class JobsSummary { - /** - * Count of failed jobs. - */ - @JsonProperty(value = "failedJobs") - private Integer failedJobs; - - /** - * Count of suspended jobs. - */ - @JsonProperty(value = "suspendedJobs") - private Integer suspendedJobs; - - /** - * Count of in-progress jobs. - */ - @JsonProperty(value = "inProgressJobs") - private Integer inProgressJobs; - - /** - * Get the failedJobs value. - * - * @return the failedJobs value - */ - public Integer failedJobs() { - return this.failedJobs; - } - - /** - * Set the failedJobs value. - * - * @param failedJobs the failedJobs value to set - * @return the JobsSummary object itself. - */ - public JobsSummary withFailedJobs(Integer failedJobs) { - this.failedJobs = failedJobs; - return this; - } - - /** - * Get the suspendedJobs value. - * - * @return the suspendedJobs value - */ - public Integer suspendedJobs() { - return this.suspendedJobs; - } - - /** - * Set the suspendedJobs value. - * - * @param suspendedJobs the suspendedJobs value to set - * @return the JobsSummary object itself. - */ - public JobsSummary withSuspendedJobs(Integer suspendedJobs) { - this.suspendedJobs = suspendedJobs; - return this; - } - - /** - * Get the inProgressJobs value. - * - * @return the inProgressJobs value - */ - public Integer inProgressJobs() { - return this.inProgressJobs; - } - - /** - * Set the inProgressJobs value. - * - * @param inProgressJobs the inProgressJobs value to set - * @return the JobsSummary object itself. - */ - public JobsSummary withInProgressJobs(Integer inProgressJobs) { - this.inProgressJobs = inProgressJobs; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/MonitoringSummary.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/MonitoringSummary.java deleted file mode 100755 index 4db6d21abb9..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/MonitoringSummary.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Summary of the replication monitoring data for this vault. - */ -public class MonitoringSummary { - /** - * Count of unhealthy VMs. - */ - @JsonProperty(value = "unHealthyVmCount") - private Integer unHealthyVmCount; - - /** - * Count of unhealthy replication providers. - */ - @JsonProperty(value = "unHealthyProviderCount") - private Integer unHealthyProviderCount; - - /** - * Count of all critical warnings. - */ - @JsonProperty(value = "eventsCount") - private Integer eventsCount; - - /** - * Count of all deprecated recovery service providers. - */ - @JsonProperty(value = "deprecatedProviderCount") - private Integer deprecatedProviderCount; - - /** - * Count of all the supported recovery service providers. - */ - @JsonProperty(value = "supportedProviderCount") - private Integer supportedProviderCount; - - /** - * Count of all the unsupported recovery service providers. - */ - @JsonProperty(value = "unsupportedProviderCount") - private Integer unsupportedProviderCount; - - /** - * Get the unHealthyVmCount value. - * - * @return the unHealthyVmCount value - */ - public Integer unHealthyVmCount() { - return this.unHealthyVmCount; - } - - /** - * Set the unHealthyVmCount value. - * - * @param unHealthyVmCount the unHealthyVmCount value to set - * @return the MonitoringSummary object itself. - */ - public MonitoringSummary withUnHealthyVmCount(Integer unHealthyVmCount) { - this.unHealthyVmCount = unHealthyVmCount; - return this; - } - - /** - * Get the unHealthyProviderCount value. - * - * @return the unHealthyProviderCount value - */ - public Integer unHealthyProviderCount() { - return this.unHealthyProviderCount; - } - - /** - * Set the unHealthyProviderCount value. - * - * @param unHealthyProviderCount the unHealthyProviderCount value to set - * @return the MonitoringSummary object itself. - */ - public MonitoringSummary withUnHealthyProviderCount(Integer unHealthyProviderCount) { - this.unHealthyProviderCount = unHealthyProviderCount; - return this; - } - - /** - * Get the eventsCount value. - * - * @return the eventsCount value - */ - public Integer eventsCount() { - return this.eventsCount; - } - - /** - * Set the eventsCount value. - * - * @param eventsCount the eventsCount value to set - * @return the MonitoringSummary object itself. - */ - public MonitoringSummary withEventsCount(Integer eventsCount) { - this.eventsCount = eventsCount; - return this; - } - - /** - * Get the deprecatedProviderCount value. - * - * @return the deprecatedProviderCount value - */ - public Integer deprecatedProviderCount() { - return this.deprecatedProviderCount; - } - - /** - * Set the deprecatedProviderCount value. - * - * @param deprecatedProviderCount the deprecatedProviderCount value to set - * @return the MonitoringSummary object itself. - */ - public MonitoringSummary withDeprecatedProviderCount(Integer deprecatedProviderCount) { - this.deprecatedProviderCount = deprecatedProviderCount; - return this; - } - - /** - * Get the supportedProviderCount value. - * - * @return the supportedProviderCount value - */ - public Integer supportedProviderCount() { - return this.supportedProviderCount; - } - - /** - * Set the supportedProviderCount value. - * - * @param supportedProviderCount the supportedProviderCount value to set - * @return the MonitoringSummary object itself. - */ - public MonitoringSummary withSupportedProviderCount(Integer supportedProviderCount) { - this.supportedProviderCount = supportedProviderCount; - return this; - } - - /** - * Get the unsupportedProviderCount value. - * - * @return the unsupportedProviderCount value - */ - public Integer unsupportedProviderCount() { - return this.unsupportedProviderCount; - } - - /** - * Set the unsupportedProviderCount value. - * - * @param unsupportedProviderCount the unsupportedProviderCount value to set - * @return the MonitoringSummary object itself. - */ - public MonitoringSummary withUnsupportedProviderCount(Integer unsupportedProviderCount) { - this.unsupportedProviderCount = unsupportedProviderCount; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/NameInfo.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/NameInfo.java deleted file mode 100755 index bf4dd895aa6..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/NameInfo.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The name of usage. - */ -public class NameInfo { - /** - * Value of usage. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Localized value of usage. - */ - @JsonProperty(value = "localizedValue") - private String localizedValue; - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the NameInfo object itself. - */ - public NameInfo withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the localizedValue value. - * - * @return the localizedValue value - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Set the localizedValue value. - * - * @param localizedValue the localizedValue value to set - * @return the NameInfo object itself. - */ - public NameInfo withLocalizedValue(String localizedValue) { - this.localizedValue = localizedValue; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateAndAadDetails.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateAndAadDetails.java deleted file mode 100755 index cf1e063b206..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateAndAadDetails.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Certificate details representing the Vault credentials for AAD. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") -@JsonTypeName("AzureActiveDirectory") -public class ResourceCertificateAndAadDetails extends ResourceCertificateDetails { - /** - * AAD tenant authority. - */ - @JsonProperty(value = "aadAuthority", required = true) - private String aadAuthority; - - /** - * AAD tenant Id. - */ - @JsonProperty(value = "aadTenantId", required = true) - private String aadTenantId; - - /** - * AAD service principal clientId. - */ - @JsonProperty(value = "servicePrincipalClientId", required = true) - private String servicePrincipalClientId; - - /** - * AAD service principal ObjectId. - */ - @JsonProperty(value = "servicePrincipalObjectId", required = true) - private String servicePrincipalObjectId; - - /** - * Azure Management Endpoint Audience. - */ - @JsonProperty(value = "azureManagementEndpointAudience", required = true) - private String azureManagementEndpointAudience; - - /** - * Get the aadAuthority value. - * - * @return the aadAuthority value - */ - public String aadAuthority() { - return this.aadAuthority; - } - - /** - * Set the aadAuthority value. - * - * @param aadAuthority the aadAuthority value to set - * @return the ResourceCertificateAndAadDetails object itself. - */ - public ResourceCertificateAndAadDetails withAadAuthority(String aadAuthority) { - this.aadAuthority = aadAuthority; - return this; - } - - /** - * Get the aadTenantId value. - * - * @return the aadTenantId value - */ - public String aadTenantId() { - return this.aadTenantId; - } - - /** - * Set the aadTenantId value. - * - * @param aadTenantId the aadTenantId value to set - * @return the ResourceCertificateAndAadDetails object itself. - */ - public ResourceCertificateAndAadDetails withAadTenantId(String aadTenantId) { - this.aadTenantId = aadTenantId; - return this; - } - - /** - * Get the servicePrincipalClientId value. - * - * @return the servicePrincipalClientId value - */ - public String servicePrincipalClientId() { - return this.servicePrincipalClientId; - } - - /** - * Set the servicePrincipalClientId value. - * - * @param servicePrincipalClientId the servicePrincipalClientId value to set - * @return the ResourceCertificateAndAadDetails object itself. - */ - public ResourceCertificateAndAadDetails withServicePrincipalClientId(String servicePrincipalClientId) { - this.servicePrincipalClientId = servicePrincipalClientId; - return this; - } - - /** - * Get the servicePrincipalObjectId value. - * - * @return the servicePrincipalObjectId value - */ - public String servicePrincipalObjectId() { - return this.servicePrincipalObjectId; - } - - /** - * Set the servicePrincipalObjectId value. - * - * @param servicePrincipalObjectId the servicePrincipalObjectId value to set - * @return the ResourceCertificateAndAadDetails object itself. - */ - public ResourceCertificateAndAadDetails withServicePrincipalObjectId(String servicePrincipalObjectId) { - this.servicePrincipalObjectId = servicePrincipalObjectId; - return this; - } - - /** - * Get the azureManagementEndpointAudience value. - * - * @return the azureManagementEndpointAudience value - */ - public String azureManagementEndpointAudience() { - return this.azureManagementEndpointAudience; - } - - /** - * Set the azureManagementEndpointAudience value. - * - * @param azureManagementEndpointAudience the azureManagementEndpointAudience value to set - * @return the ResourceCertificateAndAadDetails object itself. - */ - public ResourceCertificateAndAadDetails withAzureManagementEndpointAudience(String azureManagementEndpointAudience) { - this.azureManagementEndpointAudience = azureManagementEndpointAudience; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateAndAcsDetails.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateAndAcsDetails.java deleted file mode 100755 index 5d1bcf33f0b..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateAndAcsDetails.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Certificate details representing the Vault credentials for ACS. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") -@JsonTypeName("AccessControlService") -public class ResourceCertificateAndAcsDetails extends ResourceCertificateDetails { - /** - * ACS namespace name - tenant for our service. - */ - @JsonProperty(value = "globalAcsNamespace", required = true) - private String globalAcsNamespace; - - /** - * Acs mgmt host name to connect to. - */ - @JsonProperty(value = "globalAcsHostName", required = true) - private String globalAcsHostName; - - /** - * Global ACS namespace RP realm. - */ - @JsonProperty(value = "globalAcsRPRealm", required = true) - private String globalAcsRPRealm; - - /** - * Get the globalAcsNamespace value. - * - * @return the globalAcsNamespace value - */ - public String globalAcsNamespace() { - return this.globalAcsNamespace; - } - - /** - * Set the globalAcsNamespace value. - * - * @param globalAcsNamespace the globalAcsNamespace value to set - * @return the ResourceCertificateAndAcsDetails object itself. - */ - public ResourceCertificateAndAcsDetails withGlobalAcsNamespace(String globalAcsNamespace) { - this.globalAcsNamespace = globalAcsNamespace; - return this; - } - - /** - * Get the globalAcsHostName value. - * - * @return the globalAcsHostName value - */ - public String globalAcsHostName() { - return this.globalAcsHostName; - } - - /** - * Set the globalAcsHostName value. - * - * @param globalAcsHostName the globalAcsHostName value to set - * @return the ResourceCertificateAndAcsDetails object itself. - */ - public ResourceCertificateAndAcsDetails withGlobalAcsHostName(String globalAcsHostName) { - this.globalAcsHostName = globalAcsHostName; - return this; - } - - /** - * Get the globalAcsRPRealm value. - * - * @return the globalAcsRPRealm value - */ - public String globalAcsRPRealm() { - return this.globalAcsRPRealm; - } - - /** - * Set the globalAcsRPRealm value. - * - * @param globalAcsRPRealm the globalAcsRPRealm value to set - * @return the ResourceCertificateAndAcsDetails object itself. - */ - public ResourceCertificateAndAcsDetails withGlobalAcsRPRealm(String globalAcsRPRealm) { - this.globalAcsRPRealm = globalAcsRPRealm; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateDetails.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateDetails.java deleted file mode 100755 index 61a5e888f08..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/ResourceCertificateDetails.java +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * Certificate details representing the Vault credentials. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") -@JsonTypeName("ResourceCertificateDetails") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AzureActiveDirectory", value = ResourceCertificateAndAadDetails.class), - @JsonSubTypes.Type(name = "AccessControlService", value = ResourceCertificateAndAcsDetails.class) -}) -public class ResourceCertificateDetails { - /** - * The base64 encoded certificate raw data string. - */ - @JsonProperty(value = "certificate") - private byte[] certificate; - - /** - * Certificate friendlyname. - */ - @JsonProperty(value = "friendlyName") - private String friendlyName; - - /** - * Certificate issuer. - */ - @JsonProperty(value = "issuer") - private String issuer; - - /** - * Resource ID of the vault. - */ - @JsonProperty(value = "resourceId") - private Long resourceId; - - /** - * Certificate Subject Name. - */ - @JsonProperty(value = "subject") - private String subject; - - /** - * Certificate thumbprint. - */ - @JsonProperty(value = "thumbprint") - private String thumbprint; - - /** - * Certificate Validity start Date time. - */ - @JsonProperty(value = "validFrom") - private DateTime validFrom; - - /** - * Certificate Validity End Date time. - */ - @JsonProperty(value = "validTo") - private DateTime validTo; - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public byte[] certificate() { - return this.certificate; - } - - /** - * Set the certificate value. - * - * @param certificate the certificate value to set - * @return the ResourceCertificateDetails object itself. - */ - public ResourceCertificateDetails withCertificate(byte[] certificate) { - this.certificate = certificate; - return this; - } - - /** - * Get the friendlyName value. - * - * @return the friendlyName value - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName value. - * - * @param friendlyName the friendlyName value to set - * @return the ResourceCertificateDetails object itself. - */ - public ResourceCertificateDetails withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the issuer value. - * - * @return the issuer value - */ - public String issuer() { - return this.issuer; - } - - /** - * Set the issuer value. - * - * @param issuer the issuer value to set - * @return the ResourceCertificateDetails object itself. - */ - public ResourceCertificateDetails withIssuer(String issuer) { - this.issuer = issuer; - return this; - } - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public Long resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the ResourceCertificateDetails object itself. - */ - public ResourceCertificateDetails withResourceId(Long resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the subject value. - * - * @return the subject value - */ - public String subject() { - return this.subject; - } - - /** - * Set the subject value. - * - * @param subject the subject value to set - * @return the ResourceCertificateDetails object itself. - */ - public ResourceCertificateDetails withSubject(String subject) { - this.subject = subject; - return this; - } - - /** - * Get the thumbprint value. - * - * @return the thumbprint value - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint value. - * - * @param thumbprint the thumbprint value to set - * @return the ResourceCertificateDetails object itself. - */ - public ResourceCertificateDetails withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - - /** - * Get the validFrom value. - * - * @return the validFrom value - */ - public DateTime validFrom() { - return this.validFrom; - } - - /** - * Set the validFrom value. - * - * @param validFrom the validFrom value to set - * @return the ResourceCertificateDetails object itself. - */ - public ResourceCertificateDetails withValidFrom(DateTime validFrom) { - this.validFrom = validFrom; - return this; - } - - /** - * Get the validTo value. - * - * @return the validTo value - */ - public DateTime validTo() { - return this.validTo; - } - - /** - * Set the validTo value. - * - * @param validTo the validTo value to set - * @return the ResourceCertificateDetails object itself. - */ - public ResourceCertificateDetails withValidTo(DateTime validTo) { - this.validTo = validTo; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/Sku.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/Sku.java deleted file mode 100755 index d106fd9b671..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/Sku.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Identifies the unique system identifier for each Azure resource. - */ -public class Sku { - /** - * The Sku name. Possible values include: 'Standard', 'RS0'. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /** - * Get the name value. - * - * @return the name value - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/SkuName.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/SkuName.java deleted file mode 100755 index c954718b004..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/SkuName.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SkuName. - */ -public final class SkuName { - /** Static value Standard for SkuName. */ - public static final SkuName STANDARD = new SkuName("Standard"); - - /** Static value RS0 for SkuName. */ - public static final SkuName RS0 = new SkuName("RS0"); - - private String value; - - /** - * Creates a custom value for SkuName. - * @param value the custom value - */ - public SkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SkuName)) { - return false; - } - if (obj == this) { - return true; - } - SkuName rhs = (SkuName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageModelType.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageModelType.java deleted file mode 100755 index 34cdab7325e..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageModelType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for StorageModelType. - */ -public final class StorageModelType { - /** Static value Invalid for StorageModelType. */ - public static final StorageModelType INVALID = new StorageModelType("Invalid"); - - /** Static value GeoRedundant for StorageModelType. */ - public static final StorageModelType GEO_REDUNDANT = new StorageModelType("GeoRedundant"); - - /** Static value LocallyRedundant for StorageModelType. */ - public static final StorageModelType LOCALLY_REDUNDANT = new StorageModelType("LocallyRedundant"); - - private String value; - - /** - * Creates a custom value for StorageModelType. - * @param value the custom value - */ - public StorageModelType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof StorageModelType)) { - return false; - } - if (obj == this) { - return true; - } - StorageModelType rhs = (StorageModelType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageType.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageType.java deleted file mode 100755 index fe757659901..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for StorageType. - */ -public final class StorageType { - /** Static value Invalid for StorageType. */ - public static final StorageType INVALID = new StorageType("Invalid"); - - /** Static value GeoRedundant for StorageType. */ - public static final StorageType GEO_REDUNDANT = new StorageType("GeoRedundant"); - - /** Static value LocallyRedundant for StorageType. */ - public static final StorageType LOCALLY_REDUNDANT = new StorageType("LocallyRedundant"); - - private String value; - - /** - * Creates a custom value for StorageType. - * @param value the custom value - */ - public StorageType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof StorageType)) { - return false; - } - if (obj == this) { - return true; - } - StorageType rhs = (StorageType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageTypeState.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageTypeState.java deleted file mode 100755 index 528d4fb4127..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/StorageTypeState.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for StorageTypeState. - */ -public final class StorageTypeState { - /** Static value Invalid for StorageTypeState. */ - public static final StorageTypeState INVALID = new StorageTypeState("Invalid"); - - /** Static value Locked for StorageTypeState. */ - public static final StorageTypeState LOCKED = new StorageTypeState("Locked"); - - /** Static value Unlocked for StorageTypeState. */ - public static final StorageTypeState UNLOCKED = new StorageTypeState("Unlocked"); - - private String value; - - /** - * Creates a custom value for StorageTypeState. - * @param value the custom value - */ - public StorageTypeState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof StorageTypeState)) { - return false; - } - if (obj == this) { - return true; - } - StorageTypeState rhs = (StorageTypeState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/TriggerType.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/TriggerType.java deleted file mode 100755 index 1cee9ab0988..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/TriggerType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for TriggerType. - */ -public final class TriggerType { - /** Static value UserTriggered for TriggerType. */ - public static final TriggerType USER_TRIGGERED = new TriggerType("UserTriggered"); - - /** Static value ForcedUpgrade for TriggerType. */ - public static final TriggerType FORCED_UPGRADE = new TriggerType("ForcedUpgrade"); - - private String value; - - /** - * Creates a custom value for TriggerType. - * @param value the custom value - */ - public TriggerType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof TriggerType)) { - return false; - } - if (obj == this) { - return true; - } - TriggerType rhs = (TriggerType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/UpgradeDetails.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/UpgradeDetails.java deleted file mode 100755 index 0830ea56fe6..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/UpgradeDetails.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Details for upgrading vault. - */ -public class UpgradeDetails { - /** - * ID of the vault upgrade operation. - */ - @JsonProperty(value = "operationId", access = JsonProperty.Access.WRITE_ONLY) - private String operationId; - - /** - * UTC time at which the upgrade operation has started. - */ - @JsonProperty(value = "startTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime startTimeUtc; - - /** - * UTC time at which the upgrade operation status was last updated. - */ - @JsonProperty(value = "lastUpdatedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastUpdatedTimeUtc; - - /** - * UTC time at which the upgrade operation has ended. - */ - @JsonProperty(value = "endTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private DateTime endTimeUtc; - - /** - * Status of the vault upgrade operation. Possible values include: - * 'Unknown', 'InProgress', 'Upgraded', 'Failed'. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private VaultUpgradeState status; - - /** - * Message to the user containing information about the upgrade operation. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * The way the vault upgradation was triggered. Possible values include: - * 'UserTriggered', 'ForcedUpgrade'. - */ - @JsonProperty(value = "triggerType", access = JsonProperty.Access.WRITE_ONLY) - private TriggerType triggerType; - - /** - * Resource ID of the upgraded vault. - */ - @JsonProperty(value = "upgradedResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String upgradedResourceId; - - /** - * Resource ID of the vault before the upgrade. - */ - @JsonProperty(value = "previousResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String previousResourceId; - - /** - * Get the operationId value. - * - * @return the operationId value - */ - public String operationId() { - return this.operationId; - } - - /** - * Get the startTimeUtc value. - * - * @return the startTimeUtc value - */ - public DateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Get the lastUpdatedTimeUtc value. - * - * @return the lastUpdatedTimeUtc value - */ - public DateTime lastUpdatedTimeUtc() { - return this.lastUpdatedTimeUtc; - } - - /** - * Get the endTimeUtc value. - * - * @return the endTimeUtc value - */ - public DateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Get the status value. - * - * @return the status value - */ - public VaultUpgradeState status() { - return this.status; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Get the triggerType value. - * - * @return the triggerType value - */ - public TriggerType triggerType() { - return this.triggerType; - } - - /** - * Get the upgradedResourceId value. - * - * @return the upgradedResourceId value - */ - public String upgradedResourceId() { - return this.upgradedResourceId; - } - - /** - * Get the previousResourceId value. - * - * @return the previousResourceId value - */ - public String previousResourceId() { - return this.previousResourceId; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/UsagesUnit.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/UsagesUnit.java deleted file mode 100755 index 30479c45736..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/UsagesUnit.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for UsagesUnit. - */ -public final class UsagesUnit { - /** Static value Count for UsagesUnit. */ - public static final UsagesUnit COUNT = new UsagesUnit("Count"); - - /** Static value Bytes for UsagesUnit. */ - public static final UsagesUnit BYTES = new UsagesUnit("Bytes"); - - /** Static value Seconds for UsagesUnit. */ - public static final UsagesUnit SECONDS = new UsagesUnit("Seconds"); - - /** Static value Percent for UsagesUnit. */ - public static final UsagesUnit PERCENT = new UsagesUnit("Percent"); - - /** Static value CountPerSecond for UsagesUnit. */ - public static final UsagesUnit COUNT_PER_SECOND = new UsagesUnit("CountPerSecond"); - - /** Static value BytesPerSecond for UsagesUnit. */ - public static final UsagesUnit BYTES_PER_SECOND = new UsagesUnit("BytesPerSecond"); - - private String value; - - /** - * Creates a custom value for UsagesUnit. - * @param value the custom value - */ - public UsagesUnit(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof UsagesUnit)) { - return false; - } - if (obj == this) { - return true; - } - UsagesUnit rhs = (UsagesUnit) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/VaultProperties.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/VaultProperties.java deleted file mode 100755 index 3f01e23fee9..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/VaultProperties.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of the vault. - */ -public class VaultProperties { - /** - * Provisioning State. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The upgradeDetails property. - */ - @JsonProperty(value = "upgradeDetails") - private UpgradeDetails upgradeDetails; - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the upgradeDetails value. - * - * @return the upgradeDetails value - */ - public UpgradeDetails upgradeDetails() { - return this.upgradeDetails; - } - - /** - * Set the upgradeDetails value. - * - * @param upgradeDetails the upgradeDetails value to set - * @return the VaultProperties object itself. - */ - public VaultProperties withUpgradeDetails(UpgradeDetails upgradeDetails) { - this.upgradeDetails = upgradeDetails; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/VaultUpgradeState.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/VaultUpgradeState.java deleted file mode 100755 index 5c12f12bdf9..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/VaultUpgradeState.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for VaultUpgradeState. - */ -public final class VaultUpgradeState { - /** Static value Unknown for VaultUpgradeState. */ - public static final VaultUpgradeState UNKNOWN = new VaultUpgradeState("Unknown"); - - /** Static value InProgress for VaultUpgradeState. */ - public static final VaultUpgradeState IN_PROGRESS = new VaultUpgradeState("InProgress"); - - /** Static value Upgraded for VaultUpgradeState. */ - public static final VaultUpgradeState UPGRADED = new VaultUpgradeState("Upgraded"); - - /** Static value Failed for VaultUpgradeState. */ - public static final VaultUpgradeState FAILED = new VaultUpgradeState("Failed"); - - private String value; - - /** - * Creates a custom value for VaultUpgradeState. - * @param value the custom value - */ - public VaultUpgradeState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VaultUpgradeState)) { - return false; - } - if (obj == this) { - return true; - } - VaultUpgradeState rhs = (VaultUpgradeState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupStorageConfigInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupStorageConfigInner.java deleted file mode 100755 index 2dcc8eded0b..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupStorageConfigInner.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.recoveryservices.StorageModelType; -import com.microsoft.azure.management.recoveryservices.StorageType; -import com.microsoft.azure.management.recoveryservices.StorageTypeState; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The backup storage config. - */ -@JsonFlatten -public class BackupStorageConfigInner extends Resource { - /** - * Storage model type. Possible values include: 'Invalid', 'GeoRedundant', - * 'LocallyRedundant'. - */ - @JsonProperty(value = "properties.storageModelType") - private StorageModelType storageModelType; - - /** - * Storage type. Possible values include: 'Invalid', 'GeoRedundant', - * 'LocallyRedundant'. - */ - @JsonProperty(value = "properties.storageType") - private StorageType storageType; - - /** - * Locked or Unlocked. Once a machine is registered against a resource, the - * storageTypeState is always Locked. Possible values include: 'Invalid', - * 'Locked', 'Unlocked'. - */ - @JsonProperty(value = "properties.storageTypeState") - private StorageTypeState storageTypeState; - - /** - * Get the storageModelType value. - * - * @return the storageModelType value - */ - public StorageModelType storageModelType() { - return this.storageModelType; - } - - /** - * Set the storageModelType value. - * - * @param storageModelType the storageModelType value to set - * @return the BackupStorageConfigInner object itself. - */ - public BackupStorageConfigInner withStorageModelType(StorageModelType storageModelType) { - this.storageModelType = storageModelType; - return this; - } - - /** - * Get the storageType value. - * - * @return the storageType value - */ - public StorageType storageType() { - return this.storageType; - } - - /** - * Set the storageType value. - * - * @param storageType the storageType value to set - * @return the BackupStorageConfigInner object itself. - */ - public BackupStorageConfigInner withStorageType(StorageType storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the storageTypeState value. - * - * @return the storageTypeState value - */ - public StorageTypeState storageTypeState() { - return this.storageTypeState; - } - - /** - * Set the storageTypeState value. - * - * @param storageTypeState the storageTypeState value to set - * @return the BackupStorageConfigInner object itself. - */ - public BackupStorageConfigInner withStorageTypeState(StorageTypeState storageTypeState) { - this.storageTypeState = storageTypeState; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupStorageConfigsInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupStorageConfigsInner.java deleted file mode 100755 index fcb47dc0b25..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupStorageConfigsInner.java +++ /dev/null @@ -1,242 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in BackupStorageConfigs. - */ -public class BackupStorageConfigsInner { - /** The Retrofit service to perform REST calls. */ - private BackupStorageConfigsService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of BackupStorageConfigsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public BackupStorageConfigsInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(BackupStorageConfigsService.class); - this.client = client; - } - - /** - * The interface defining all the services for BackupStorageConfigs to be - * used by Retrofit to perform actually REST calls. - */ - interface BackupStorageConfigsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.BackupStorageConfigs get" }) - @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.BackupStorageConfigs update" }) - @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Body BackupStorageConfigInner backupStorageConfig, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Fetches resource storage config. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BackupStorageConfigInner object if successful. - */ - public BackupStorageConfigInner get(String resourceGroupName, String vaultName) { - return getWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); - } - - /** - * Fetches resource storage config. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); - } - - /** - * Fetches resource storage config. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackupStorageConfigInner object - */ - public Observable getAsync(String resourceGroupName, String vaultName) { - return getWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1, BackupStorageConfigInner>() { - @Override - public BackupStorageConfigInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Fetches resource storage config. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackupStorageConfigInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String vaultName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - final String apiVersion = "2016-12-01"; - return service.get(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates vault storage model type. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param backupStorageConfig Backup storage config. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void update(String resourceGroupName, String vaultName, BackupStorageConfigInner backupStorageConfig) { - updateWithServiceResponseAsync(resourceGroupName, vaultName, backupStorageConfig).toBlocking().single().body(); - } - - /** - * Updates vault storage model type. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param backupStorageConfig Backup storage config. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String vaultName, BackupStorageConfigInner backupStorageConfig, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vaultName, backupStorageConfig), serviceCallback); - } - - /** - * Updates vault storage model type. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param backupStorageConfig Backup storage config. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable updateAsync(String resourceGroupName, String vaultName, BackupStorageConfigInner backupStorageConfig) { - return updateWithServiceResponseAsync(resourceGroupName, vaultName, backupStorageConfig).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates vault storage model type. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param backupStorageConfig Backup storage config. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vaultName, BackupStorageConfigInner backupStorageConfig) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (backupStorageConfig == null) { - throw new IllegalArgumentException("Parameter backupStorageConfig is required and cannot be null."); - } - Validator.validate(backupStorageConfig); - final String apiVersion = "2016-12-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, backupStorageConfig, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupVaultConfigInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupVaultConfigInner.java deleted file mode 100755 index 94b3030503b..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupVaultConfigInner.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.recoveryservices.StorageType; -import com.microsoft.azure.management.recoveryservices.StorageTypeState; -import com.microsoft.azure.management.recoveryservices.EnhancedSecurityState; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Backup vault config details. - */ -@JsonFlatten -public class BackupVaultConfigInner extends Resource { - /** - * Storage type. Possible values include: 'Invalid', 'GeoRedundant', - * 'LocallyRedundant'. - */ - @JsonProperty(value = "properties.storageType") - private StorageType storageType; - - /** - * Locked or Unlocked. Once a machine is registered against a resource, the - * storageTypeState is always Locked. Possible values include: 'Invalid', - * 'Locked', 'Unlocked'. - */ - @JsonProperty(value = "properties.storageTypeState") - private StorageTypeState storageTypeState; - - /** - * Enabled or Disabled. Possible values include: 'Invalid', 'Enabled', - * 'Disabled'. - */ - @JsonProperty(value = "properties.enhancedSecurityState") - private EnhancedSecurityState enhancedSecurityState; - - /** - * Get the storageType value. - * - * @return the storageType value - */ - public StorageType storageType() { - return this.storageType; - } - - /** - * Set the storageType value. - * - * @param storageType the storageType value to set - * @return the BackupVaultConfigInner object itself. - */ - public BackupVaultConfigInner withStorageType(StorageType storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the storageTypeState value. - * - * @return the storageTypeState value - */ - public StorageTypeState storageTypeState() { - return this.storageTypeState; - } - - /** - * Set the storageTypeState value. - * - * @param storageTypeState the storageTypeState value to set - * @return the BackupVaultConfigInner object itself. - */ - public BackupVaultConfigInner withStorageTypeState(StorageTypeState storageTypeState) { - this.storageTypeState = storageTypeState; - return this; - } - - /** - * Get the enhancedSecurityState value. - * - * @return the enhancedSecurityState value - */ - public EnhancedSecurityState enhancedSecurityState() { - return this.enhancedSecurityState; - } - - /** - * Set the enhancedSecurityState value. - * - * @param enhancedSecurityState the enhancedSecurityState value to set - * @return the BackupVaultConfigInner object itself. - */ - public BackupVaultConfigInner withEnhancedSecurityState(EnhancedSecurityState enhancedSecurityState) { - this.enhancedSecurityState = enhancedSecurityState; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupVaultConfigsInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupVaultConfigsInner.java deleted file mode 100755 index 0f5c9ee3b35..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/BackupVaultConfigsInner.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in BackupVaultConfigs. - */ -public class BackupVaultConfigsInner { - /** The Retrofit service to perform REST calls. */ - private BackupVaultConfigsService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of BackupVaultConfigsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public BackupVaultConfigsInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(BackupVaultConfigsService.class); - this.client = client; - } - - /** - * The interface defining all the services for BackupVaultConfigs to be - * used by Retrofit to perform actually REST calls. - */ - interface BackupVaultConfigsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.BackupVaultConfigs get" }) - @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.BackupVaultConfigs update" }) - @PATCH("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Body BackupVaultConfigInner backupVaultConfig, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Fetches vault config. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BackupVaultConfigInner object if successful. - */ - public BackupVaultConfigInner get(String resourceGroupName, String vaultName) { - return getWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); - } - - /** - * Fetches vault config. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); - } - - /** - * Fetches vault config. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackupVaultConfigInner object - */ - public Observable getAsync(String resourceGroupName, String vaultName) { - return getWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1, BackupVaultConfigInner>() { - @Override - public BackupVaultConfigInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Fetches vault config. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackupVaultConfigInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String vaultName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - final String apiVersion = "2016-12-01"; - return service.get(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates vault config model type. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param backupVaultConfig Backup vault config. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BackupVaultConfigInner object if successful. - */ - public BackupVaultConfigInner update(String resourceGroupName, String vaultName, BackupVaultConfigInner backupVaultConfig) { - return updateWithServiceResponseAsync(resourceGroupName, vaultName, backupVaultConfig).toBlocking().single().body(); - } - - /** - * Updates vault config model type. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param backupVaultConfig Backup vault config. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String vaultName, BackupVaultConfigInner backupVaultConfig, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vaultName, backupVaultConfig), serviceCallback); - } - - /** - * Updates vault config model type. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param backupVaultConfig Backup vault config. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackupVaultConfigInner object - */ - public Observable updateAsync(String resourceGroupName, String vaultName, BackupVaultConfigInner backupVaultConfig) { - return updateWithServiceResponseAsync(resourceGroupName, vaultName, backupVaultConfig).map(new Func1, BackupVaultConfigInner>() { - @Override - public BackupVaultConfigInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates vault config model type. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param backupVaultConfig Backup vault config. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackupVaultConfigInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vaultName, BackupVaultConfigInner backupVaultConfig) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (backupVaultConfig == null) { - throw new IllegalArgumentException("Parameter backupVaultConfig is required and cannot be null."); - } - Validator.validate(backupVaultConfig); - final String apiVersion = "2016-12-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, backupVaultConfig, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ClientDiscoveryValueForSingleApiInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ClientDiscoveryValueForSingleApiInner.java deleted file mode 100755 index 269d6772acc..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ClientDiscoveryValueForSingleApiInner.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.recoveryservices.ClientDiscoveryDisplay; -import com.microsoft.azure.management.recoveryservices.ClientDiscoveryForServiceSpecification; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Available operation details. - */ -@JsonFlatten -public class ClientDiscoveryValueForSingleApiInner { - /** - * Name of the operation. - */ - @JsonProperty(value = "Name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Contains the localized display information for this particular - * operation. - */ - @JsonProperty(value = "Display", access = JsonProperty.Access.WRITE_ONLY) - private ClientDiscoveryDisplay display; - - /** - * The intended executor of the operation. - */ - @JsonProperty(value = "Origin", access = JsonProperty.Access.WRITE_ONLY) - private String origin; - - /** - * Operation properties. - */ - @JsonProperty(value = "Properties.serviceSpecification", access = JsonProperty.Access.WRITE_ONLY) - private ClientDiscoveryForServiceSpecification serviceSpecification; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the display value. - * - * @return the display value - */ - public ClientDiscoveryDisplay display() { - return this.display; - } - - /** - * Get the origin value. - * - * @return the origin value - */ - public String origin() { - return this.origin; - } - - /** - * Get the serviceSpecification value. - * - * @return the serviceSpecification value - */ - public ClientDiscoveryForServiceSpecification serviceSpecification() { - return this.serviceSpecification; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/OperationsInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/OperationsInner.java deleted file mode 100755 index 24a4dc524e0..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/OperationsInner.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Operations list" }) - @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Returns the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ClientDiscoveryValueForSingleApiInner> object if successful. - */ - public PagedList list(final String resourceGroupName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Returns the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Returns the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClientDiscoveryValueForSingleApiInner> object - */ - public Observable> listAsync(final String resourceGroupName) { - return listWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Returns the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClientDiscoveryValueForSingleApiInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName) { - return listSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Returns the list of available operations. - * - ServiceResponse> * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ClientDiscoveryValueForSingleApiInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.list(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Returns the list of available operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ClientDiscoveryValueForSingleApiInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Returns the list of available operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Returns the list of available operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClientDiscoveryValueForSingleApiInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Returns the list of available operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClientDiscoveryValueForSingleApiInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Returns the list of available operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ClientDiscoveryValueForSingleApiInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/PageImpl.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/PageImpl.java deleted file mode 100755 index e7fedb807e8..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/PageImpl1.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/PageImpl1.java deleted file mode 100755 index 31479a07f98..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/PageImpl1.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl1 implements Page { - /** - * The link to the next page. - */ - @JsonProperty("NextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl1 setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl1 setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RawCertificateDataInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RawCertificateDataInner.java deleted file mode 100755 index dffda2781c3..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RawCertificateDataInner.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.recoveryservices.AuthType; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Raw certificate data. - */ -public class RawCertificateDataInner { - /** - * Specifies the authentication type. Possible values include: 'Invalid', - * 'ACS', 'AAD', 'AccessControlService', 'AzureActiveDirectory'. - */ - @JsonProperty(value = "authType") - private AuthType authType; - - /** - * The base64 encoded certificate raw data string. - */ - @JsonProperty(value = "certificate") - private byte[] certificate; - - /** - * Get the authType value. - * - * @return the authType value - */ - public AuthType authType() { - return this.authType; - } - - /** - * Set the authType value. - * - * @param authType the authType value to set - * @return the RawCertificateDataInner object itself. - */ - public RawCertificateDataInner withAuthType(AuthType authType) { - this.authType = authType; - return this; - } - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public byte[] certificate() { - return this.certificate; - } - - /** - * Set the certificate value. - * - * @param certificate the certificate value to set - * @return the RawCertificateDataInner object itself. - */ - public RawCertificateDataInner withCertificate(byte[] certificate) { - this.certificate = certificate; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RecoveryServicesClientImpl.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RecoveryServicesClientImpl.java deleted file mode 100755 index d7b0e285e91..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RecoveryServicesClientImpl.java +++ /dev/null @@ -1,295 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the RecoveryServicesClientImpl class. - */ -public class RecoveryServicesClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** The subscription Id. */ - private String subscriptionId; - - /** - * Gets The subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets The subscription Id. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public RecoveryServicesClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public RecoveryServicesClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public RecoveryServicesClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public RecoveryServicesClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The BackupVaultConfigsInner object to access its operations. - */ - private BackupVaultConfigsInner backupVaultConfigs; - - /** - * Gets the BackupVaultConfigsInner object to access its operations. - * @return the BackupVaultConfigsInner object. - */ - public BackupVaultConfigsInner backupVaultConfigs() { - return this.backupVaultConfigs; - } - - /** - * The BackupStorageConfigsInner object to access its operations. - */ - private BackupStorageConfigsInner backupStorageConfigs; - - /** - * Gets the BackupStorageConfigsInner object to access its operations. - * @return the BackupStorageConfigsInner object. - */ - public BackupStorageConfigsInner backupStorageConfigs() { - return this.backupStorageConfigs; - } - - /** - * The VaultCertificatesInner object to access its operations. - */ - private VaultCertificatesInner vaultCertificates; - - /** - * Gets the VaultCertificatesInner object to access its operations. - * @return the VaultCertificatesInner object. - */ - public VaultCertificatesInner vaultCertificates() { - return this.vaultCertificates; - } - - /** - * The RegisteredIdentitiesInner object to access its operations. - */ - private RegisteredIdentitiesInner registeredIdentities; - - /** - * Gets the RegisteredIdentitiesInner object to access its operations. - * @return the RegisteredIdentitiesInner object. - */ - public RegisteredIdentitiesInner registeredIdentities() { - return this.registeredIdentities; - } - - /** - * The ReplicationUsagesInner object to access its operations. - */ - private ReplicationUsagesInner replicationUsages; - - /** - * Gets the ReplicationUsagesInner object to access its operations. - * @return the ReplicationUsagesInner object. - */ - public ReplicationUsagesInner replicationUsages() { - return this.replicationUsages; - } - - /** - * The VaultsInner object to access its operations. - */ - private VaultsInner vaults; - - /** - * Gets the VaultsInner object to access its operations. - * @return the VaultsInner object. - */ - public VaultsInner vaults() { - return this.vaults; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * The VaultExtendedInfosInner object to access its operations. - */ - private VaultExtendedInfosInner vaultExtendedInfos; - - /** - * Gets the VaultExtendedInfosInner object to access its operations. - * @return the VaultExtendedInfosInner object. - */ - public VaultExtendedInfosInner vaultExtendedInfos() { - return this.vaultExtendedInfos; - } - - /** - * The UsagesInner object to access its operations. - */ - private UsagesInner usages; - - /** - * Gets the UsagesInner object to access its operations. - * @return the UsagesInner object. - */ - public UsagesInner usages() { - return this.usages; - } - - /** - * Initializes an instance of RecoveryServicesClient client. - * - * @param credentials the management credentials for Azure - */ - public RecoveryServicesClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of RecoveryServicesClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public RecoveryServicesClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of RecoveryServicesClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public RecoveryServicesClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.backupVaultConfigs = new BackupVaultConfigsInner(restClient().retrofit(), this); - this.backupStorageConfigs = new BackupStorageConfigsInner(restClient().retrofit(), this); - this.vaultCertificates = new VaultCertificatesInner(restClient().retrofit(), this); - this.registeredIdentities = new RegisteredIdentitiesInner(restClient().retrofit(), this); - this.replicationUsages = new ReplicationUsagesInner(restClient().retrofit(), this); - this.vaults = new VaultsInner(restClient().retrofit(), this); - this.operations = new OperationsInner(restClient().retrofit(), this); - this.vaultExtendedInfos = new VaultExtendedInfosInner(restClient().retrofit(), this); - this.usages = new UsagesInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s)", super.userAgent(), "RecoveryServicesClient"); - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RecoveryServicesManager.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RecoveryServicesManager.java deleted file mode 100755 index a66c8420195..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RecoveryServicesManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure RecoveryServices resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class RecoveryServicesManager extends Manager { - /** - * Get a Configurable instance that can be used to create RecoveryServicesManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new RecoveryServicesManager.ConfigurableImpl(); - } - /** - * Creates an instance of RecoveryServicesManager that exposes RecoveryServices resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the RecoveryServicesManager - */ - public static RecoveryServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new RecoveryServicesManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of RecoveryServicesManager that exposes RecoveryServices resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the RecoveryServicesManager - */ - public static RecoveryServicesManager authenticate(RestClient restClient, String subscriptionId) { - return new RecoveryServicesManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of RecoveryServicesManager that exposes RecoveryServices management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing RecoveryServices management API entry points that work across subscriptions - */ - RecoveryServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public RecoveryServicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return RecoveryServicesManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private RecoveryServicesManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new RecoveryServicesClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RegisteredIdentitiesInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RegisteredIdentitiesInner.java deleted file mode 100755 index 8a42ac7c4f8..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/RegisteredIdentitiesInner.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in RegisteredIdentities. - */ -public class RegisteredIdentitiesInner { - /** The Retrofit service to perform REST calls. */ - private RegisteredIdentitiesService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of RegisteredIdentitiesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public RegisteredIdentitiesInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(RegisteredIdentitiesService.class); - this.client = client; - } - - /** - * The interface defining all the services for RegisteredIdentities to be - * used by Retrofit to perform actually REST calls. - */ - interface RegisteredIdentitiesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.RegisteredIdentities delete" }) - @HTTP(path = "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Path("identityName") String identityName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Unregisters the given container from your Recovery Services vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param identityName Name of the protection container to unregister. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String vaultName, String identityName) { - deleteWithServiceResponseAsync(resourceGroupName, vaultName, identityName).toBlocking().single().body(); - } - - /** - * Unregisters the given container from your Recovery Services vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param identityName Name of the protection container to unregister. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String vaultName, String identityName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vaultName, identityName), serviceCallback); - } - - /** - * Unregisters the given container from your Recovery Services vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param identityName Name of the protection container to unregister. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String vaultName, String identityName) { - return deleteWithServiceResponseAsync(resourceGroupName, vaultName, identityName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Unregisters the given container from your Recovery Services vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param identityName Name of the protection container to unregister. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vaultName, String identityName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (identityName == null) { - throw new IllegalArgumentException("Parameter identityName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.delete(this.client.subscriptionId(), resourceGroupName, vaultName, identityName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ReplicationUsageInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ReplicationUsageInner.java deleted file mode 100755 index c5089e8519d..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ReplicationUsageInner.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.recoveryservices.MonitoringSummary; -import com.microsoft.azure.management.recoveryservices.JobsSummary; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Replication usages of a vault. - */ -public class ReplicationUsageInner { - /** - * Summary of the replication monitoring data for this vault. - */ - @JsonProperty(value = "monitoringSummary") - private MonitoringSummary monitoringSummary; - - /** - * Summary of the replication jobs data for this vault. - */ - @JsonProperty(value = "jobsSummary") - private JobsSummary jobsSummary; - - /** - * Number of replication protected items for this vault. - */ - @JsonProperty(value = "protectedItemCount") - private Integer protectedItemCount; - - /** - * Number of replication recovery plans for this vault. - */ - @JsonProperty(value = "recoveryPlanCount") - private Integer recoveryPlanCount; - - /** - * Number of servers registered to this vault. - */ - @JsonProperty(value = "registeredServersCount") - private Integer registeredServersCount; - - /** - * The authentication type of recovery service providers in the vault. - */ - @JsonProperty(value = "recoveryServicesProviderAuthType") - private Integer recoveryServicesProviderAuthType; - - /** - * Get the monitoringSummary value. - * - * @return the monitoringSummary value - */ - public MonitoringSummary monitoringSummary() { - return this.monitoringSummary; - } - - /** - * Set the monitoringSummary value. - * - * @param monitoringSummary the monitoringSummary value to set - * @return the ReplicationUsageInner object itself. - */ - public ReplicationUsageInner withMonitoringSummary(MonitoringSummary monitoringSummary) { - this.monitoringSummary = monitoringSummary; - return this; - } - - /** - * Get the jobsSummary value. - * - * @return the jobsSummary value - */ - public JobsSummary jobsSummary() { - return this.jobsSummary; - } - - /** - * Set the jobsSummary value. - * - * @param jobsSummary the jobsSummary value to set - * @return the ReplicationUsageInner object itself. - */ - public ReplicationUsageInner withJobsSummary(JobsSummary jobsSummary) { - this.jobsSummary = jobsSummary; - return this; - } - - /** - * Get the protectedItemCount value. - * - * @return the protectedItemCount value - */ - public Integer protectedItemCount() { - return this.protectedItemCount; - } - - /** - * Set the protectedItemCount value. - * - * @param protectedItemCount the protectedItemCount value to set - * @return the ReplicationUsageInner object itself. - */ - public ReplicationUsageInner withProtectedItemCount(Integer protectedItemCount) { - this.protectedItemCount = protectedItemCount; - return this; - } - - /** - * Get the recoveryPlanCount value. - * - * @return the recoveryPlanCount value - */ - public Integer recoveryPlanCount() { - return this.recoveryPlanCount; - } - - /** - * Set the recoveryPlanCount value. - * - * @param recoveryPlanCount the recoveryPlanCount value to set - * @return the ReplicationUsageInner object itself. - */ - public ReplicationUsageInner withRecoveryPlanCount(Integer recoveryPlanCount) { - this.recoveryPlanCount = recoveryPlanCount; - return this; - } - - /** - * Get the registeredServersCount value. - * - * @return the registeredServersCount value - */ - public Integer registeredServersCount() { - return this.registeredServersCount; - } - - /** - * Set the registeredServersCount value. - * - * @param registeredServersCount the registeredServersCount value to set - * @return the ReplicationUsageInner object itself. - */ - public ReplicationUsageInner withRegisteredServersCount(Integer registeredServersCount) { - this.registeredServersCount = registeredServersCount; - return this; - } - - /** - * Get the recoveryServicesProviderAuthType value. - * - * @return the recoveryServicesProviderAuthType value - */ - public Integer recoveryServicesProviderAuthType() { - return this.recoveryServicesProviderAuthType; - } - - /** - * Set the recoveryServicesProviderAuthType value. - * - * @param recoveryServicesProviderAuthType the recoveryServicesProviderAuthType value to set - * @return the ReplicationUsageInner object itself. - */ - public ReplicationUsageInner withRecoveryServicesProviderAuthType(Integer recoveryServicesProviderAuthType) { - this.recoveryServicesProviderAuthType = recoveryServicesProviderAuthType; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ReplicationUsagesInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ReplicationUsagesInner.java deleted file mode 100755 index 0c1a5b43a06..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/ReplicationUsagesInner.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ReplicationUsages. - */ -public class ReplicationUsagesInner { - /** The Retrofit service to perform REST calls. */ - private ReplicationUsagesService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of ReplicationUsagesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ReplicationUsagesInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(ReplicationUsagesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ReplicationUsages to be - * used by Retrofit to perform actually REST calls. - */ - interface ReplicationUsagesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.ReplicationUsages list" }) - @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/replicationUsages") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Fetches the replication usages of the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<ReplicationUsageInner> object if successful. - */ - public List list(String resourceGroupName, String vaultName) { - return listWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); - } - - /** - * Fetches the replication usages of the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(String resourceGroupName, String vaultName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); - } - - /** - * Fetches the replication usages of the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<ReplicationUsageInner> object - */ - public Observable> listAsync(String resourceGroupName, String vaultName) { - return listWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Fetches the replication usages of the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<ReplicationUsageInner> object - */ - public Observable>> listWithServiceResponseAsync(String resourceGroupName, String vaultName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.list(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/TrackedResourceInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/TrackedResourceInner.java deleted file mode 100755 index 89cde01069d..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/TrackedResourceInner.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.Resource; - -/** - * Tracked resource with location. - */ -public class TrackedResourceInner extends Resource { -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/UsagesInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/UsagesInner.java deleted file mode 100755 index e2fddc54c51..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/UsagesInner.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Usages. - */ -public class UsagesInner { - /** The Retrofit service to perform REST calls. */ - private UsagesService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of UsagesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public UsagesInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(UsagesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Usages to be - * used by Retrofit to perform actually REST calls. - */ - interface UsagesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Usages listByVaults" }) - @GET("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages") - Observable> listByVaults(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Fetches the usages of the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<VaultUsageInner> object if successful. - */ - public List listByVaults(String resourceGroupName, String vaultName) { - return listByVaultsWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); - } - - /** - * Fetches the usages of the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByVaultsAsync(String resourceGroupName, String vaultName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByVaultsWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); - } - - /** - * Fetches the usages of the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<VaultUsageInner> object - */ - public Observable> listByVaultsAsync(String resourceGroupName, String vaultName) { - return listByVaultsWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Fetches the usages of the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<VaultUsageInner> object - */ - public Observable>> listByVaultsWithServiceResponseAsync(String resourceGroupName, String vaultName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.listByVaults(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByVaultsDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByVaultsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultCertificateResponseInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultCertificateResponseInner.java deleted file mode 100755 index 90cc5c028cf..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultCertificateResponseInner.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.recoveryservices.ResourceCertificateDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Certificate corresponding to a vault that can be used by clients to register - * themselves with the vault. - */ -public class VaultCertificateResponseInner { - /** - * The name property. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The type property. - */ - @JsonProperty(value = "type") - private String type; - - /** - * The id property. - */ - @JsonProperty(value = "id") - private String id; - - /** - * The properties property. - */ - @JsonProperty(value = "properties") - private ResourceCertificateDetails properties; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the VaultCertificateResponseInner object itself. - */ - public VaultCertificateResponseInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the VaultCertificateResponseInner object itself. - */ - public VaultCertificateResponseInner withType(String type) { - this.type = type; - return this; - } - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the VaultCertificateResponseInner object itself. - */ - public VaultCertificateResponseInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public ResourceCertificateDetails properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the VaultCertificateResponseInner object itself. - */ - public VaultCertificateResponseInner withProperties(ResourceCertificateDetails properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultCertificatesInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultCertificatesInner.java deleted file mode 100755 index 3617fdd807c..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultCertificatesInner.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.recoveryservices.CertificateRequest; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in VaultCertificates. - */ -public class VaultCertificatesInner { - /** The Retrofit service to perform REST calls. */ - private VaultCertificatesService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of VaultCertificatesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public VaultCertificatesInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(VaultCertificatesService.class); - this.client = client; - } - - /** - * The interface defining all the services for VaultCertificates to be - * used by Retrofit to perform actually REST calls. - */ - interface VaultCertificatesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.VaultCertificates create" }) - @PUT("Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}") - Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CertificateRequest certificateRequest, @Header("User-Agent") String userAgent); - - } - - /** - * Upload a certificate for a resource. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param certificateName Certificate friendly name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VaultCertificateResponseInner object if successful. - */ - public VaultCertificateResponseInner create(String resourceGroupName, String vaultName, String certificateName) { - return createWithServiceResponseAsync(resourceGroupName, vaultName, certificateName).toBlocking().single().body(); - } - - /** - * Upload a certificate for a resource. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param certificateName Certificate friendly name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String vaultName, String certificateName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, vaultName, certificateName), serviceCallback); - } - - /** - * Upload a certificate for a resource. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param certificateName Certificate friendly name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultCertificateResponseInner object - */ - public Observable createAsync(String resourceGroupName, String vaultName, String certificateName) { - return createWithServiceResponseAsync(resourceGroupName, vaultName, certificateName).map(new Func1, VaultCertificateResponseInner>() { - @Override - public VaultCertificateResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Upload a certificate for a resource. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param certificateName Certificate friendly name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultCertificateResponseInner object - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String vaultName, String certificateName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (certificateName == null) { - throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - final RawCertificateDataInner properties = null; - CertificateRequest certificateRequest = new CertificateRequest(); - certificateRequest.withProperties(null); - return service.create(this.client.subscriptionId(), resourceGroupName, vaultName, certificateName, apiVersion, this.client.acceptLanguage(), certificateRequest, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Upload a certificate for a resource. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param certificateName Certificate friendly name. - * @param properties the RawCertificateDataInner value - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VaultCertificateResponseInner object if successful. - */ - public VaultCertificateResponseInner create(String resourceGroupName, String vaultName, String certificateName, RawCertificateDataInner properties) { - return createWithServiceResponseAsync(resourceGroupName, vaultName, certificateName, properties).toBlocking().single().body(); - } - - /** - * Upload a certificate for a resource. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param certificateName Certificate friendly name. - * @param properties the RawCertificateDataInner value - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String vaultName, String certificateName, RawCertificateDataInner properties, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, vaultName, certificateName, properties), serviceCallback); - } - - /** - * Upload a certificate for a resource. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param certificateName Certificate friendly name. - * @param properties the RawCertificateDataInner value - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultCertificateResponseInner object - */ - public Observable createAsync(String resourceGroupName, String vaultName, String certificateName, RawCertificateDataInner properties) { - return createWithServiceResponseAsync(resourceGroupName, vaultName, certificateName, properties).map(new Func1, VaultCertificateResponseInner>() { - @Override - public VaultCertificateResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Upload a certificate for a resource. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param certificateName Certificate friendly name. - * @param properties the RawCertificateDataInner value - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultCertificateResponseInner object - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String vaultName, String certificateName, RawCertificateDataInner properties) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (certificateName == null) { - throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); - } - Validator.validate(properties); - final String apiVersion = "2016-06-01"; - CertificateRequest certificateRequest = new CertificateRequest(); - certificateRequest.withProperties(properties); - return service.create(this.client.subscriptionId(), resourceGroupName, vaultName, certificateName, apiVersion, this.client.acceptLanguage(), certificateRequest, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultExtendedInfoResourceInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultExtendedInfoResourceInner.java deleted file mode 100755 index cef6553ac89..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultExtendedInfoResourceInner.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Vault extended information. - */ -@JsonFlatten -public class VaultExtendedInfoResourceInner extends Resource { - /** - * Integrity key. - */ - @JsonProperty(value = "properties.integrityKey") - private String integrityKey; - - /** - * Encryption key. - */ - @JsonProperty(value = "properties.encryptionKey") - private String encryptionKey; - - /** - * Encryption key thumbprint. - */ - @JsonProperty(value = "properties.encryptionKeyThumbprint") - private String encryptionKeyThumbprint; - - /** - * Algorithm. - */ - @JsonProperty(value = "properties.algorithm") - private String algorithm; - - /** - * Get the integrityKey value. - * - * @return the integrityKey value - */ - public String integrityKey() { - return this.integrityKey; - } - - /** - * Set the integrityKey value. - * - * @param integrityKey the integrityKey value to set - * @return the VaultExtendedInfoResourceInner object itself. - */ - public VaultExtendedInfoResourceInner withIntegrityKey(String integrityKey) { - this.integrityKey = integrityKey; - return this; - } - - /** - * Get the encryptionKey value. - * - * @return the encryptionKey value - */ - public String encryptionKey() { - return this.encryptionKey; - } - - /** - * Set the encryptionKey value. - * - * @param encryptionKey the encryptionKey value to set - * @return the VaultExtendedInfoResourceInner object itself. - */ - public VaultExtendedInfoResourceInner withEncryptionKey(String encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - /** - * Get the encryptionKeyThumbprint value. - * - * @return the encryptionKeyThumbprint value - */ - public String encryptionKeyThumbprint() { - return this.encryptionKeyThumbprint; - } - - /** - * Set the encryptionKeyThumbprint value. - * - * @param encryptionKeyThumbprint the encryptionKeyThumbprint value to set - * @return the VaultExtendedInfoResourceInner object itself. - */ - public VaultExtendedInfoResourceInner withEncryptionKeyThumbprint(String encryptionKeyThumbprint) { - this.encryptionKeyThumbprint = encryptionKeyThumbprint; - return this; - } - - /** - * Get the algorithm value. - * - * @return the algorithm value - */ - public String algorithm() { - return this.algorithm; - } - - /** - * Set the algorithm value. - * - * @param algorithm the algorithm value to set - * @return the VaultExtendedInfoResourceInner object itself. - */ - public VaultExtendedInfoResourceInner withAlgorithm(String algorithm) { - this.algorithm = algorithm; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultExtendedInfosInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultExtendedInfosInner.java deleted file mode 100755 index f80df75740d..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultExtendedInfosInner.java +++ /dev/null @@ -1,340 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in VaultExtendedInfos. - */ -public class VaultExtendedInfosInner { - /** The Retrofit service to perform REST calls. */ - private VaultExtendedInfosService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of VaultExtendedInfosInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public VaultExtendedInfosInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(VaultExtendedInfosService.class); - this.client = client; - } - - /** - * The interface defining all the services for VaultExtendedInfos to be - * used by Retrofit to perform actually REST calls. - */ - interface VaultExtendedInfosService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.VaultExtendedInfos get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.VaultExtendedInfos createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Body VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.VaultExtendedInfos update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Body VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get the vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VaultExtendedInfoResourceInner object if successful. - */ - public VaultExtendedInfoResourceInner get(String resourceGroupName, String vaultName) { - return getWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); - } - - /** - * Get the vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); - } - - /** - * Get the vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultExtendedInfoResourceInner object - */ - public Observable getAsync(String resourceGroupName, String vaultName) { - return getWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1, VaultExtendedInfoResourceInner>() { - @Override - public VaultExtendedInfoResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get the vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultExtendedInfoResourceInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String vaultName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.get(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param resourceResourceExtendedInfoDetails resourceResourceExtendedInfoDetails - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VaultExtendedInfoResourceInner object if successful. - */ - public VaultExtendedInfoResourceInner createOrUpdate(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails).toBlocking().single().body(); - } - - /** - * Create vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param resourceResourceExtendedInfoDetails resourceResourceExtendedInfoDetails - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails), serviceCallback); - } - - /** - * Create vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param resourceResourceExtendedInfoDetails resourceResourceExtendedInfoDetails - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultExtendedInfoResourceInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails).map(new Func1, VaultExtendedInfoResourceInner>() { - @Override - public VaultExtendedInfoResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param resourceResourceExtendedInfoDetails resourceResourceExtendedInfoDetails - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultExtendedInfoResourceInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (resourceResourceExtendedInfoDetails == null) { - throw new IllegalArgumentException("Parameter resourceResourceExtendedInfoDetails is required and cannot be null."); - } - Validator.validate(resourceResourceExtendedInfoDetails); - final String apiVersion = "2016-06-01"; - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, resourceResourceExtendedInfoDetails, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Update vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param resourceResourceExtendedInfoDetails resourceResourceExtendedInfoDetails - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VaultExtendedInfoResourceInner object if successful. - */ - public VaultExtendedInfoResourceInner update(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails) { - return updateWithServiceResponseAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails).toBlocking().single().body(); - } - - /** - * Update vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param resourceResourceExtendedInfoDetails resourceResourceExtendedInfoDetails - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails), serviceCallback); - } - - /** - * Update vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param resourceResourceExtendedInfoDetails resourceResourceExtendedInfoDetails - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultExtendedInfoResourceInner object - */ - public Observable updateAsync(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails) { - return updateWithServiceResponseAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails).map(new Func1, VaultExtendedInfoResourceInner>() { - @Override - public VaultExtendedInfoResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update vault extended info. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param resourceResourceExtendedInfoDetails resourceResourceExtendedInfoDetails - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultExtendedInfoResourceInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (resourceResourceExtendedInfoDetails == null) { - throw new IllegalArgumentException("Parameter resourceResourceExtendedInfoDetails is required and cannot be null."); - } - Validator.validate(resourceResourceExtendedInfoDetails); - final String apiVersion = "2016-06-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, resourceResourceExtendedInfoDetails, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultInner.java deleted file mode 100755 index cf0facf0339..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultInner.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.recoveryservices.VaultProperties; -import com.microsoft.azure.management.recoveryservices.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Resource information, as returned by the resource provider. - */ -public class VaultInner extends TrackedResourceInner { - /** - * The properties property. - */ - @JsonProperty(value = "properties") - private VaultProperties properties; - - /** - * The sku property. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /** - * Get the properties value. - * - * @return the properties value - */ - public VaultProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the VaultInner object itself. - */ - public VaultInner withProperties(VaultProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the VaultInner object itself. - */ - public VaultInner withSku(Sku sku) { - this.sku = sku; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultUsageInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultUsageInner.java deleted file mode 100755 index cf1ceb4be85..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultUsageInner.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.recoveryservices.UsagesUnit; -import org.joda.time.DateTime; -import com.microsoft.azure.management.recoveryservices.NameInfo; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Usages of a vault. - */ -public class VaultUsageInner { - /** - * Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', - * 'Percent', 'CountPerSecond', 'BytesPerSecond'. - */ - @JsonProperty(value = "unit") - private UsagesUnit unit; - - /** - * Quota period of usage. - */ - @JsonProperty(value = "quotaPeriod") - private String quotaPeriod; - - /** - * Next reset time of usage. - */ - @JsonProperty(value = "nextResetTime") - private DateTime nextResetTime; - - /** - * Current value of usage. - */ - @JsonProperty(value = "currentValue") - private Long currentValue; - - /** - * Limit of usage. - */ - @JsonProperty(value = "limit") - private Long limit; - - /** - * Name of usage. - */ - @JsonProperty(value = "name") - private NameInfo name; - - /** - * Get the unit value. - * - * @return the unit value - */ - public UsagesUnit unit() { - return this.unit; - } - - /** - * Set the unit value. - * - * @param unit the unit value to set - * @return the VaultUsageInner object itself. - */ - public VaultUsageInner withUnit(UsagesUnit unit) { - this.unit = unit; - return this; - } - - /** - * Get the quotaPeriod value. - * - * @return the quotaPeriod value - */ - public String quotaPeriod() { - return this.quotaPeriod; - } - - /** - * Set the quotaPeriod value. - * - * @param quotaPeriod the quotaPeriod value to set - * @return the VaultUsageInner object itself. - */ - public VaultUsageInner withQuotaPeriod(String quotaPeriod) { - this.quotaPeriod = quotaPeriod; - return this; - } - - /** - * Get the nextResetTime value. - * - * @return the nextResetTime value - */ - public DateTime nextResetTime() { - return this.nextResetTime; - } - - /** - * Set the nextResetTime value. - * - * @param nextResetTime the nextResetTime value to set - * @return the VaultUsageInner object itself. - */ - public VaultUsageInner withNextResetTime(DateTime nextResetTime) { - this.nextResetTime = nextResetTime; - return this; - } - - /** - * Get the currentValue value. - * - * @return the currentValue value - */ - public Long currentValue() { - return this.currentValue; - } - - /** - * Set the currentValue value. - * - * @param currentValue the currentValue value to set - * @return the VaultUsageInner object itself. - */ - public VaultUsageInner withCurrentValue(Long currentValue) { - this.currentValue = currentValue; - return this; - } - - /** - * Get the limit value. - * - * @return the limit value - */ - public Long limit() { - return this.limit; - } - - /** - * Set the limit value. - * - * @param limit the limit value to set - * @return the VaultUsageInner object itself. - */ - public VaultUsageInner withLimit(Long limit) { - this.limit = limit; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public NameInfo name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the VaultUsageInner object itself. - */ - public VaultUsageInner withName(NameInfo name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultsInner.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultsInner.java deleted file mode 100755 index 80e464ea7b7..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/VaultsInner.java +++ /dev/null @@ -1,590 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.recoveryservices.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Vaults. - */ -public class VaultsInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private VaultsService service; - /** The service client containing this operation class. */ - private RecoveryServicesClientImpl client; - - /** - * Initializes an instance of VaultsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public VaultsInner(Retrofit retrofit, RecoveryServicesClientImpl client) { - this.service = retrofit.create(VaultsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Vaults to be - * used by Retrofit to perform actually REST calls. - */ - interface VaultsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Vaults listBySubscriptionId" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults") - Observable> listBySubscriptionId(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Vaults listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Vaults getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Vaults createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Body VaultInner vault, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Vaults delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.Vaults update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Body VaultInner vault, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Fetches all the resources of the specified type in the subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<VaultInner> object if successful. - */ - public List listBySubscriptionId() { - return listBySubscriptionIdWithServiceResponseAsync().toBlocking().single().body(); - } - - /** - * Fetches all the resources of the specified type in the subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionIdAsync(final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listBySubscriptionIdWithServiceResponseAsync(), serviceCallback); - } - - /** - * Fetches all the resources of the specified type in the subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<VaultInner> object - */ - public Observable> listBySubscriptionIdAsync() { - return listBySubscriptionIdWithServiceResponseAsync().map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Fetches all the resources of the specified type in the subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<VaultInner> object - */ - public Observable>> listBySubscriptionIdWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.listBySubscriptionId(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionIdDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionIdDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Retrieve a list of Vaults. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException 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<VaultInner> object if successful. - */ - public List listByResourceGroup(String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body(); - } - - /** - * Retrieve a list of Vaults. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); - } - - /** - * Retrieve a list of Vaults. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<VaultInner> object - */ - public Observable> listByResourceGroupAsync(String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Retrieve a list of Vaults. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<VaultInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get the Vault details. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VaultInner object if successful. - */ - public VaultInner getByResourceGroup(String resourceGroupName, String vaultName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); - } - - /** - * Get the Vault details. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); - } - - /** - * Get the Vault details. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String vaultName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1, VaultInner>() { - @Override - public VaultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get the Vault details. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String vaultName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates a Recovery Services vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param vault Recovery Services Vault to be created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VaultInner object if successful. - */ - public VaultInner createOrUpdate(String resourceGroupName, String vaultName, VaultInner vault) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, vault).toBlocking().single().body(); - } - - /** - * Creates or updates a Recovery Services vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param vault Recovery Services Vault to be created. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String vaultName, VaultInner vault, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, vault), serviceCallback); - } - - /** - * Creates or updates a Recovery Services vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param vault Recovery Services Vault to be created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String vaultName, VaultInner vault) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, vault).map(new Func1, VaultInner>() { - @Override - public VaultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a Recovery Services vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param vault Recovery Services Vault to be created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vaultName, VaultInner vault) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (vault == null) { - throw new IllegalArgumentException("Parameter vault is required and cannot be null."); - } - Validator.validate(vault); - final String apiVersion = "2016-06-01"; - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, vault, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String vaultName) { - deleteWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); - } - - /** - * Deletes a vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); - } - - /** - * Deletes a vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String vaultName) { - return deleteWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vaultName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - final String apiVersion = "2016-06-01"; - return service.delete(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param vault Recovery Services Vault to be created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VaultInner object if successful. - */ - public VaultInner update(String resourceGroupName, String vaultName, VaultInner vault) { - return updateWithServiceResponseAsync(resourceGroupName, vaultName, vault).toBlocking().single().body(); - } - - /** - * Updates the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param vault Recovery Services Vault to be created. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String vaultName, VaultInner vault, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vaultName, vault), serviceCallback); - } - - /** - * Updates the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param vault Recovery Services Vault to be created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultInner object - */ - public Observable updateAsync(String resourceGroupName, String vaultName, VaultInner vault) { - return updateWithServiceResponseAsync(resourceGroupName, vaultName, vault).map(new Func1, VaultInner>() { - @Override - public VaultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the vault. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param vault Recovery Services Vault to be created. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VaultInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vaultName, VaultInner vault) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vaultName == null) { - throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); - } - if (vault == null) { - throw new IllegalArgumentException("Parameter vault is required and cannot be null."); - } - Validator.validate(vault); - final String apiVersion = "2016-06-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, vaultName, apiVersion, vault, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/package-info.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/package-info.java deleted file mode 100755 index d465195c301..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for RecoveryServicesClient. - * Composite Swagger for Recovery Services Client. - */ -package com.microsoft.azure.management.recoveryservices.implementation; diff --git a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/package-info.java b/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/package-info.java deleted file mode 100755 index 616016d1a6c..00000000000 --- a/azure-mgmt-recoveryservices/src/main/java/com/microsoft/azure/management/recoveryservices/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for RecoveryServicesClient. - * Composite Swagger for Recovery Services Client. - */ -package com.microsoft.azure.management.recoveryservices; diff --git a/azure-mgmt-relay/pom.xml b/azure-mgmt-relay/pom.xml deleted file mode 100755 index 3f8c7490dca..00000000000 --- a/azure-mgmt-relay/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-relay - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for Relay Management - This package contains Microsoft Relay Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/AccessRights.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/AccessRights.java deleted file mode 100755 index 5858eb119b7..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/AccessRights.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for AccessRights. - */ -public enum AccessRights { - /** Enum value Manage. */ - MANAGE("Manage"), - - /** Enum value Send. */ - SEND("Send"), - - /** Enum value Listen. */ - LISTEN("Listen"); - - /** The actual serialized value for a AccessRights instance. */ - private String value; - - AccessRights(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AccessRights instance. - * - * @param value the serialized value to parse. - * @return the parsed AccessRights object, or null if unable to parse. - */ - @JsonCreator - public static AccessRights fromString(String value) { - AccessRights[] items = AccessRights.values(); - for (AccessRights item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/CheckNameAvailability.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/CheckNameAvailability.java deleted file mode 100755 index 1ef02e5ee83..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/CheckNameAvailability.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Description of a Check Name availability request properties. - */ -public class CheckNameAvailability { - /** - * The Name to check the namespce name availability and The namespace name - * can contain only letters, numbers, and hyphens. The namespace must start - * with a letter, and it must end with a letter or number. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the CheckNameAvailability object itself. - */ - public CheckNameAvailability withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ErrorResponse.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ErrorResponse.java deleted file mode 100755 index 73f5ff27e2f..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ErrorResponse.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Error reponse indicates Relay service is not able to process the incoming - * request. The reason is provided in the error message. - */ -public class ErrorResponse { - /** - * Error code. - */ - @JsonProperty(value = "code") - private String code; - - /** - * Error message indicating why the operation failed. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ErrorResponse object itself. - */ - public ErrorResponse withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ErrorResponse object itself. - */ - public ErrorResponse withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ErrorResponseException.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ErrorResponseException.java deleted file mode 100755 index 519171845bc..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ErrorResponseException.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with ErrorResponse information. - */ -public class ErrorResponseException extends RestException { - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorResponseException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { - super(message, response, body); - } - - @Override - public ErrorResponse body() { - return (ErrorResponse) super.body(); - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/KeyType.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/KeyType.java deleted file mode 100755 index 5c12954c121..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/KeyType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for KeyType. - */ -public enum KeyType { - /** Enum value PrimaryKey. */ - PRIMARY_KEY("PrimaryKey"), - - /** Enum value SecondaryKey. */ - SECONDARY_KEY("SecondaryKey"); - - /** The actual serialized value for a KeyType instance. */ - private String value; - - KeyType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a KeyType instance. - * - * @param value the serialized value to parse. - * @return the parsed KeyType object, or null if unable to parse. - */ - @JsonCreator - public static KeyType fromString(String value) { - KeyType[] items = KeyType.values(); - for (KeyType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/OperationDisplay.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/OperationDisplay.java deleted file mode 100755 index c136448f170..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/OperationDisplay.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The object that represents the operation. - */ -public class OperationDisplay { - /** - * Service provider: Relay. - */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) - private String provider; - - /** - * Resource on which the operation is performed: Invoice, etc. - */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) - private String resource; - - /** - * Operation type: Read, write, delete, etc. - */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ProvisioningStateEnum.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ProvisioningStateEnum.java deleted file mode 100755 index de438dba9e8..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/ProvisioningStateEnum.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ProvisioningStateEnum. - */ -public enum ProvisioningStateEnum { - /** Enum value Created. */ - CREATED("Created"), - - /** Enum value Succeeded. */ - SUCCEEDED("Succeeded"), - - /** Enum value Deleted. */ - DELETED("Deleted"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Updating. */ - UPDATING("Updating"), - - /** Enum value Unknown. */ - UNKNOWN("Unknown"); - - /** The actual serialized value for a ProvisioningStateEnum instance. */ - private String value; - - ProvisioningStateEnum(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ProvisioningStateEnum instance. - * - * @param value the serialized value to parse. - * @return the parsed ProvisioningStateEnum object, or null if unable to parse. - */ - @JsonCreator - public static ProvisioningStateEnum fromString(String value) { - ProvisioningStateEnum[] items = ProvisioningStateEnum.values(); - for (ProvisioningStateEnum item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/Relaytype.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/Relaytype.java deleted file mode 100755 index 63ecc5d4ea9..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/Relaytype.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for Relaytype. - */ -public enum Relaytype { - /** Enum value NetTcp. */ - NET_TCP("NetTcp"), - - /** Enum value Http. */ - HTTP("Http"); - - /** The actual serialized value for a Relaytype instance. */ - private String value; - - Relaytype(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Relaytype instance. - * - * @param value the serialized value to parse. - * @return the parsed Relaytype object, or null if unable to parse. - */ - @JsonCreator - public static Relaytype fromString(String value) { - Relaytype[] items = Relaytype.values(); - for (Relaytype item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/Sku.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/Sku.java deleted file mode 100755 index a65b806dcc2..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/Sku.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Sku of the Namespace. - */ -public class Sku { - /** - * Name of this Sku. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * The tier of this particular SKU. Possible values include: 'Standard'. - */ - @JsonProperty(value = "tier") - private SkuTier tier; - - /** - * Creates an instance of Sku class. - */ - public Sku() { - name = "Standard"; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Sku object itself. - */ - public Sku withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier value. - * - * @return the tier value - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Set the tier value. - * - * @param tier the tier value to set - * @return the Sku object itself. - */ - public Sku withTier(SkuTier tier) { - this.tier = tier; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/SkuTier.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/SkuTier.java deleted file mode 100755 index 087fbf9dc24..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/SkuTier.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SkuTier. - */ -public enum SkuTier { - /** Enum value Standard. */ - STANDARD("Standard"); - - /** The actual serialized value for a SkuTier instance. */ - private String value; - - SkuTier(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuTier instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuTier object, or null if unable to parse. - */ - @JsonCreator - public static SkuTier fromString(String value) { - SkuTier[] items = SkuTier.values(); - for (SkuTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/UnavailableReason.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/UnavailableReason.java deleted file mode 100755 index 1f8a87e2a73..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/UnavailableReason.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for UnavailableReason. - */ -public enum UnavailableReason { - /** Enum value None. */ - NONE("None"), - - /** Enum value InvalidName. */ - INVALID_NAME("InvalidName"), - - /** Enum value SubscriptionIsDisabled. */ - SUBSCRIPTION_IS_DISABLED("SubscriptionIsDisabled"), - - /** Enum value NameInUse. */ - NAME_IN_USE("NameInUse"), - - /** Enum value NameInLockdown. */ - NAME_IN_LOCKDOWN("NameInLockdown"), - - /** Enum value TooManyNamespaceInCurrentSubscription. */ - TOO_MANY_NAMESPACE_IN_CURRENT_SUBSCRIPTION("TooManyNamespaceInCurrentSubscription"); - - /** The actual serialized value for a UnavailableReason instance. */ - private String value; - - UnavailableReason(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a UnavailableReason instance. - * - * @param value the serialized value to parse. - * @return the parsed UnavailableReason object, or null if unable to parse. - */ - @JsonCreator - public static UnavailableReason fromString(String value) { - UnavailableReason[] items = UnavailableReason.values(); - for (UnavailableReason item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/AccessKeysInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/AccessKeysInner.java deleted file mode 100755 index 931d9cec197..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/AccessKeysInner.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Namespace/Relay Connection String. - */ -public class AccessKeysInner { - /** - * PrimaryConnectionString of the created Namespace AuthorizationRule. - */ - @JsonProperty(value = "primaryConnectionString") - private String primaryConnectionString; - - /** - * SecondaryConnectionString of the created Namespace AuthorizationRule. - */ - @JsonProperty(value = "secondaryConnectionString") - private String secondaryConnectionString; - - /** - * A base64-encoded 256-bit primary key for signing and validating the SAS - * token. - */ - @JsonProperty(value = "primaryKey") - private String primaryKey; - - /** - * A base64-encoded 256-bit secondary key for signing and validating the - * SAS token. - */ - @JsonProperty(value = "secondaryKey") - private String secondaryKey; - - /** - * A string that describes the authorization rule. - */ - @JsonProperty(value = "keyName") - private String keyName; - - /** - * Get the primaryConnectionString value. - * - * @return the primaryConnectionString value - */ - public String primaryConnectionString() { - return this.primaryConnectionString; - } - - /** - * Set the primaryConnectionString value. - * - * @param primaryConnectionString the primaryConnectionString value to set - * @return the AccessKeysInner object itself. - */ - public AccessKeysInner withPrimaryConnectionString(String primaryConnectionString) { - this.primaryConnectionString = primaryConnectionString; - return this; - } - - /** - * Get the secondaryConnectionString value. - * - * @return the secondaryConnectionString value - */ - public String secondaryConnectionString() { - return this.secondaryConnectionString; - } - - /** - * Set the secondaryConnectionString value. - * - * @param secondaryConnectionString the secondaryConnectionString value to set - * @return the AccessKeysInner object itself. - */ - public AccessKeysInner withSecondaryConnectionString(String secondaryConnectionString) { - this.secondaryConnectionString = secondaryConnectionString; - return this; - } - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the AccessKeysInner object itself. - */ - public AccessKeysInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the AccessKeysInner object itself. - */ - public AccessKeysInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Get the keyName value. - * - * @return the keyName value - */ - public String keyName() { - return this.keyName; - } - - /** - * Set the keyName value. - * - * @param keyName the keyName value to set - * @return the AccessKeysInner object itself. - */ - public AccessKeysInner withKeyName(String keyName) { - this.keyName = keyName; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/AuthorizationRuleInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/AuthorizationRuleInner.java deleted file mode 100755 index 98dde7d32d3..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/AuthorizationRuleInner.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import java.util.List; -import com.microsoft.azure.management.relay.AccessRights; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of a Namespace AuthorizationRules. - */ -@JsonFlatten -public class AuthorizationRuleInner extends Resource { - /** - * The rights associated with the rule. - */ - @JsonProperty(value = "properties.rights") - private List rights; - - /** - * Get the rights value. - * - * @return the rights value - */ - public List rights() { - return this.rights; - } - - /** - * Set the rights value. - * - * @param rights the rights value to set - * @return the AuthorizationRuleInner object itself. - */ - public AuthorizationRuleInner withRights(List rights) { - this.rights = rights; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/CheckNameAvailabilityResultInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/CheckNameAvailabilityResultInner.java deleted file mode 100755 index fed097107ac..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/CheckNameAvailabilityResultInner.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.management.relay.UnavailableReason; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Description of a Check Name availability request properties. - */ -public class CheckNameAvailabilityResultInner { - /** - * The detailed info regarding the reason associated with the namespace. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * Value indicating namespace is availability, true if the namespace is - * available; otherwise, false. - */ - @JsonProperty(value = "nameAvailable") - private Boolean nameAvailable; - - /** - * The reason for unavailability of a namespace. Possible values include: - * 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', - * 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'. - */ - @JsonProperty(value = "reason") - private UnavailableReason reason; - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Get the nameAvailable value. - * - * @return the nameAvailable value - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable value. - * - * @param nameAvailable the nameAvailable value to set - * @return the CheckNameAvailabilityResultInner object itself. - */ - public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - - /** - * Get the reason value. - * - * @return the reason value - */ - public UnavailableReason reason() { - return this.reason; - } - - /** - * Set the reason value. - * - * @param reason the reason value to set - * @return the CheckNameAvailabilityResultInner object itself. - */ - public CheckNameAvailabilityResultInner withReason(UnavailableReason reason) { - this.reason = reason; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/HybridConnectionInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/HybridConnectionInner.java deleted file mode 100755 index 6175e1ec45b..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/HybridConnectionInner.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of HybridConnection Resource. - */ -@JsonFlatten -public class HybridConnectionInner extends Resource { - /** - * The time the HybridConnection was created. - */ - @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdAt; - - /** - * The time the namespace was updated. - */ - @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) - private DateTime updatedAt; - - /** - * The number of listeners for this HybridConnection. min : 1 and max:25 - * supported. - */ - @JsonProperty(value = "properties.listenerCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer listenerCount; - - /** - * true if client authorization is needed for this HybridConnection; - * otherwise, false. - */ - @JsonProperty(value = "properties.requiresClientAuthorization") - private Boolean requiresClientAuthorization; - - /** - * usermetadata is a placeholder to store user-defined string data for the - * HybridConnection endpoint.e.g. it can be used to store descriptive - * data, such as list of teams and their contact information also - * user-defined configuration settings can be stored. - */ - @JsonProperty(value = "properties.userMetadata") - private String userMetadata; - - /** - * Get the createdAt value. - * - * @return the createdAt value - */ - public DateTime createdAt() { - return this.createdAt; - } - - /** - * Get the updatedAt value. - * - * @return the updatedAt value - */ - public DateTime updatedAt() { - return this.updatedAt; - } - - /** - * Get the listenerCount value. - * - * @return the listenerCount value - */ - public Integer listenerCount() { - return this.listenerCount; - } - - /** - * Get the requiresClientAuthorization value. - * - * @return the requiresClientAuthorization value - */ - public Boolean requiresClientAuthorization() { - return this.requiresClientAuthorization; - } - - /** - * Set the requiresClientAuthorization value. - * - * @param requiresClientAuthorization the requiresClientAuthorization value to set - * @return the HybridConnectionInner object itself. - */ - public HybridConnectionInner withRequiresClientAuthorization(Boolean requiresClientAuthorization) { - this.requiresClientAuthorization = requiresClientAuthorization; - return this; - } - - /** - * Get the userMetadata value. - * - * @return the userMetadata value - */ - public String userMetadata() { - return this.userMetadata; - } - - /** - * Set the userMetadata value. - * - * @param userMetadata the userMetadata value to set - * @return the HybridConnectionInner object itself. - */ - public HybridConnectionInner withUserMetadata(String userMetadata) { - this.userMetadata = userMetadata; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/HybridConnectionsInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/HybridConnectionsInner.java deleted file mode 100755 index 6b10f11b031..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/HybridConnectionsInner.java +++ /dev/null @@ -1,1490 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.relay.AccessRights; -import com.microsoft.azure.management.relay.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in HybridConnections. - */ -public class HybridConnectionsInner { - /** The Retrofit service to perform REST calls. */ - private HybridConnectionsService service; - /** The service client containing this operation class. */ - private RelayManagementClientImpl client; - - /** - * Initializes an instance of HybridConnectionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public HybridConnectionsInner(Retrofit retrofit, RelayManagementClientImpl client) { - this.service = retrofit.create(HybridConnectionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for HybridConnections to be - * used by Retrofit to perform actually REST calls. - */ - interface HybridConnectionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections listByNamespace" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections") - Observable> listByNamespace(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("subscriptionId") String subscriptionId, @Body HybridConnectionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections listAuthorizationRules" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules") - Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections createOrUpdateAuthorizationRule" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}") - Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AuthorizationRuleInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections deleteAuthorizationRule" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) - Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections getAuthorizationRule" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}") - Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections regenerateKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys") - Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections listByNamespaceNext" }) - @GET - Observable> listByNamespaceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.HybridConnections listAuthorizationRulesNext" }) - @GET - Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the HybridConnection within the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<HybridConnectionInner> object if successful. - */ - public PagedList listByNamespace(final String resourceGroupName, final String namespaceName) { - ServiceResponse> response = listByNamespaceSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the HybridConnection within the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByNamespaceSinglePageAsync(resourceGroupName, namespaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the HybridConnection within the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HybridConnectionInner> object - */ - public Observable> listByNamespaceAsync(final String resourceGroupName, final String namespaceName) { - return listByNamespaceWithServiceResponseAsync(resourceGroupName, namespaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the HybridConnection within the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HybridConnectionInner> object - */ - public Observable>> listByNamespaceWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { - return listByNamespaceSinglePageAsync(resourceGroupName, namespaceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the HybridConnection within the namespace. - * - ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription. - ServiceResponse> * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<HybridConnectionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByNamespaceSinglePageAsync(final String resourceGroupName, final String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByNamespace(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByNamespaceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByNamespaceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Creates or Updates a service HybridConnection. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param parameters Parameters supplied to create a HybridConnection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the HybridConnectionInner object if successful. - */ - public HybridConnectionInner createOrUpdate(String resourceGroupName, String namespaceName, String hybridConnectionName, HybridConnectionInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates a service HybridConnection. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param parameters Parameters supplied to create a HybridConnection. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, HybridConnectionInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, parameters), serviceCallback); - } - - /** - * Creates or Updates a service HybridConnection. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param parameters Parameters supplied to create a HybridConnection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HybridConnectionInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, HybridConnectionInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, parameters).map(new Func1, HybridConnectionInner>() { - @Override - public HybridConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a service HybridConnection. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param parameters Parameters supplied to create a HybridConnection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HybridConnectionInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, HybridConnectionInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, namespaceName, hybridConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes a HybridConnection . - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String namespaceName, String hybridConnectionName) { - deleteWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName).toBlocking().single().body(); - } - - /** - * Deletes a HybridConnection . - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName), serviceCallback); - } - - /** - * Deletes a HybridConnection . - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) { - return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a HybridConnection . - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, namespaceName, hybridConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Returns the description for the specified HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the HybridConnectionInner object if successful. - */ - public HybridConnectionInner get(String resourceGroupName, String namespaceName, String hybridConnectionName) { - return getWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName).toBlocking().single().body(); - } - - /** - * Returns the description for the specified HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName), serviceCallback); - } - - /** - * Returns the description for the specified HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HybridConnectionInner object - */ - public Observable getAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) { - return getWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName).map(new Func1, HybridConnectionInner>() { - @Override - public HybridConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Returns the description for the specified HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the HybridConnectionInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, namespaceName, hybridConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Authorization rules for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationRuleInner> object if successful. - */ - public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName, final String hybridConnectionName) { - ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, hybridConnectionName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Authorization rules for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, hybridConnectionName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Authorization rules for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName) { - return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Authorization rules for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName) { - return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, hybridConnectionName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Authorization rules for a HybridConnection. - * - ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription. - ServiceResponse> * @param namespaceName The Namespace Name - ServiceResponse> * @param hybridConnectionName The hybrid connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listAuthorizationRules(resourceGroupName, namespaceName, hybridConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Creates or Updates an authorization rule for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Creates or Updates an authorization rule for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName), serviceCallback); - } - - /** - * Creates or Updates an authorization rule for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates an authorization rule for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final List rights = null; - AuthorizationRuleInner parameters = new AuthorizationRuleInner(); - parameters.withRights(null); - return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates an authorization rule for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, List rights) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, rights).toBlocking().single().body(); - } - - /** - * Creates or Updates an authorization rule for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, List rights, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, rights), serviceCallback); - } - - /** - * Creates or Updates an authorization rule for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, List rights) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, rights).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates an authorization rule for a HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, List rights) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(rights); - AuthorizationRuleInner parameters = new AuthorizationRuleInner(); - parameters.withRights(rights); - return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes a HybridConnection authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Deletes a HybridConnection authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName), serviceCallback); - } - - /** - * Deletes a HybridConnection authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a HybridConnection authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteAuthorizationRule(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * HybridConnection authorizationRule for a HybridConnection by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * HybridConnection authorizationRule for a HybridConnection by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName), serviceCallback); - } - - /** - * HybridConnection authorizationRule for a HybridConnection by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * HybridConnection authorizationRule for a HybridConnection by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAuthorizationRule(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Primary and Secondary ConnectionStrings to the HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AccessKeysInner object if successful. - */ - public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Primary and Secondary ConnectionStrings to the HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName), serviceCallback); - } - - /** - * Primary and Secondary ConnectionStrings to the HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).map(new Func1, AccessKeysInner>() { - @Override - public AccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Primary and Secondary ConnectionStrings to the HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AccessKeysInner object if successful. - */ - public AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, parameters).toBlocking().single().body(); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, parameters), serviceCallback); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, parameters).map(new Func1, AccessKeysInner>() { - @Override - public AccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the HybridConnection. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param hybridConnectionName The hybrid connection name. - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (hybridConnectionName == null) { - throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.regenerateKeys(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the HybridConnection within the namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<HybridConnectionInner> object if successful. - */ - public PagedList listByNamespaceNext(final String nextPageLink) { - ServiceResponse> response = listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the HybridConnection within the namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByNamespaceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByNamespaceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the HybridConnection within the namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HybridConnectionInner> object - */ - public Observable> listByNamespaceNextAsync(final String nextPageLink) { - return listByNamespaceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the HybridConnection within the namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<HybridConnectionInner> object - */ - public Observable>> listByNamespaceNextWithServiceResponseAsync(final String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the HybridConnection within the namespace. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<HybridConnectionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByNamespaceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByNamespaceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByNamespaceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByNamespaceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Authorization rules for a HybridConnection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationRuleInner> object if successful. - */ - public PagedList listAuthorizationRulesNext(final String nextPageLink) { - ServiceResponse> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Authorization rules for a HybridConnection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Authorization rules for a HybridConnection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable> listAuthorizationRulesNextAsync(final String nextPageLink) { - return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Authorization rules for a HybridConnection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Authorization rules for a HybridConnection. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/NamespacesInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/NamespacesInner.java deleted file mode 100755 index b23c668f608..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/NamespacesInner.java +++ /dev/null @@ -1,1981 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.relay.AccessRights; -import com.microsoft.azure.management.relay.CheckNameAvailability; -import com.microsoft.azure.management.relay.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Namespaces. - */ -public class NamespacesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private NamespacesService service; - /** The service client containing this operation class. */ - private RelayManagementClientImpl client; - - /** - * Initializes an instance of NamespacesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public NamespacesInner(Retrofit retrofit, RelayManagementClientImpl client) { - this.service = retrofit.create(NamespacesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Namespaces to be - * used by Retrofit to perform actually REST calls. - */ - interface NamespacesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces checkNameAvailabilityMethod" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.Relay/checkNameAvailability") - Observable> checkNameAvailabilityMethod(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailability parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Relay/namespaces") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body RelayNamespaceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body RelayNamespaceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body RelayUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces listAuthorizationRules" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules") - Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces createOrUpdateAuthorizationRule" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}") - Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AuthorizationRuleInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces deleteAuthorizationRule" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) - Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces getAuthorizationRule" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}") - Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces regenerateKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys") - Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Namespaces listAuthorizationRulesNext" }) - @GET - Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Check the give namespace name availability. - * - * @param name The Name to check the namespce name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CheckNameAvailabilityResultInner object if successful. - */ - public CheckNameAvailabilityResultInner checkNameAvailabilityMethod(String name) { - return checkNameAvailabilityMethodWithServiceResponseAsync(name).toBlocking().single().body(); - } - - /** - * Check the give namespace name availability. - * - * @param name The Name to check the namespce name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkNameAvailabilityMethodAsync(String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkNameAvailabilityMethodWithServiceResponseAsync(name), serviceCallback); - } - - /** - * Check the give namespace name availability. - * - * @param name The Name to check the namespce name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameAvailabilityResultInner object - */ - public Observable checkNameAvailabilityMethodAsync(String name) { - return checkNameAvailabilityMethodWithServiceResponseAsync(name).map(new Func1, CheckNameAvailabilityResultInner>() { - @Override - public CheckNameAvailabilityResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Check the give namespace name availability. - * - * @param name The Name to check the namespce name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameAvailabilityResultInner object - */ - public Observable> checkNameAvailabilityMethodWithServiceResponseAsync(String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - CheckNameAvailability parameters = new CheckNameAvailability(); - parameters.withName(name); - return service.checkNameAvailabilityMethod(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkNameAvailabilityMethodDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkNameAvailabilityMethodDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RelayNamespaceInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelayNamespaceInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelayNamespaceInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RelayNamespaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RelayNamespaceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelayNamespaceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelayNamespaceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RelayNamespaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Create Azure Relay namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelayNamespaceInner object if successful. - */ - public RelayNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, RelayNamespaceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().last().body(); - } - - /** - * Create Azure Relay namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters supplied to create a Namespace Resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, RelayNamespaceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); - } - - /** - * Create Azure Relay namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, RelayNamespaceInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, RelayNamespaceInner>() { - @Override - public RelayNamespaceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create Azure Relay namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, RelayNamespaceInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create Azure Relay namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelayNamespaceInner object if successful. - */ - public RelayNamespaceInner beginCreateOrUpdate(String resourceGroupName, String namespaceName, RelayNamespaceInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); - } - - /** - * Create Azure Relay namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters supplied to create a Namespace Resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, RelayNamespaceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); - } - - /** - * Create Azure Relay namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelayNamespaceInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, RelayNamespaceInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, RelayNamespaceInner>() { - @Override - public RelayNamespaceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create Azure Relay namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters supplied to create a Namespace Resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelayNamespaceInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, RelayNamespaceInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String namespaceName) { - deleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().last().body(); - } - - /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); - } - - /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String namespaceName) { - return deleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String namespaceName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); - } - - /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); - } - - /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String namespaceName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Returns the description for the specified namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelayNamespaceInner object if successful. - */ - public RelayNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); - } - - /** - * Returns the description for the specified namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); - } - - /** - * Returns the description for the specified namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelayNamespaceInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String namespaceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, RelayNamespaceInner>() { - @Override - public RelayNamespaceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Returns the description for the specified namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelayNamespaceInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters for updating a namespace resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RelayNamespaceInner object if successful. - */ - public RelayNamespaceInner update(String resourceGroupName, String namespaceName, RelayUpdateParametersInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters for updating a namespace resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String namespaceName, RelayUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); - } - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters for updating a namespace resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelayNamespaceInner object - */ - public Observable updateAsync(String resourceGroupName, String namespaceName, RelayUpdateParametersInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, RelayNamespaceInner>() { - @Override - public RelayNamespaceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param parameters Parameters for updating a namespace resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RelayNamespaceInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String namespaceName, RelayUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Authorization rules for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationRuleInner> object if successful. - */ - public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName) { - ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Authorization rules for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Authorization rules for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName) { - return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Authorization rules for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { - return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Authorization rules for a namespace. - * - ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription. - ServiceResponse> * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listAuthorizationRules(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Creates or Updates an authorization rule for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Creates or Updates an authorization rule for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); - } - - /** - * Creates or Updates an authorization rule for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates an authorization rule for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final List rights = null; - AuthorizationRuleInner parameters = new AuthorizationRuleInner(); - parameters.withRights(null); - return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates an authorization rule for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights).toBlocking().single().body(); - } - - /** - * Creates or Updates an authorization rule for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights), serviceCallback); - } - - /** - * Creates or Updates an authorization rule for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates an authorization rule for a namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(rights); - AuthorizationRuleInner parameters = new AuthorizationRuleInner(); - parameters.withRights(rights); - return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes a namespace authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { - deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Deletes a namespace authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); - } - - /** - * Deletes a namespace authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a namespace authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Authorization rule for a namespace by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Authorization rule for a namespace by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); - } - - /** - * Authorization rule for a namespace by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Authorization rule for a namespace by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Primary and Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AccessKeysInner object if successful. - */ - public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Primary and Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); - } - - /** - * Primary and Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, AccessKeysInner>() { - @Override - public AccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Primary and Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AccessKeysInner object if successful. - */ - public AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).toBlocking().single().body(); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters), serviceCallback); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).map(new Func1, AccessKeysInner>() { - @Override - public AccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.regenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RelayNamespaceInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelayNamespaceInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelayNamespaceInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all the available namespaces within the subscription irrespective of the resourceGroups. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RelayNamespaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RelayNamespaceInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelayNamespaceInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RelayNamespaceInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all the available namespaces within the ResourceGroup. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RelayNamespaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Authorization rules for a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationRuleInner> object if successful. - */ - public PagedList listAuthorizationRulesNext(final String nextPageLink) { - ServiceResponse> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Authorization rules for a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Authorization rules for a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable> listAuthorizationRulesNextAsync(final String nextPageLink) { - return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Authorization rules for a namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Authorization rules for a namespace. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/OperationInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/OperationInner.java deleted file mode 100755 index 0a7d96ca54d..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/OperationInner.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.management.relay.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A Relay REST API operation. - */ -public class OperationInner { - /** - * Operation name: {provider}/{resource}/{operation}. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * The object that represents the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/OperationsInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/OperationsInner.java deleted file mode 100755 index f1554b14ec9..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/OperationsInner.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.relay.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private RelayManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, RelayManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Operations list" }) - @GET("providers/Microsoft.Relay/operations") - Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available Relay REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available Relay REST API operations. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available Relay REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available Relay REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available Relay REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists all of the available Relay REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available Relay REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available Relay REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available Relay REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available Relay REST API operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/PageImpl.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/PageImpl.java deleted file mode 100755 index 51730f25982..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RegenerateAccessKeyParametersInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RegenerateAccessKeyParametersInner.java deleted file mode 100755 index 970dbd1ba7a..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RegenerateAccessKeyParametersInner.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.management.relay.KeyType; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Regenerate Authorization Rule operation, - * specifies which key neeeds to be reset. - */ -public class RegenerateAccessKeyParametersInner { - /** - * The access key to regenerate. Possible values include: 'PrimaryKey', - * 'SecondaryKey'. - */ - @JsonProperty(value = "keyType", required = true) - private KeyType keyType; - - /** - * Optional, if the key value provided, is set for KeyType or autogenerated - * Key value set for keyType. - */ - @JsonProperty(value = "key") - private String key; - - /** - * Get the keyType value. - * - * @return the keyType value - */ - public KeyType keyType() { - return this.keyType; - } - - /** - * Set the keyType value. - * - * @param keyType the keyType value to set - * @return the RegenerateAccessKeyParametersInner object itself. - */ - public RegenerateAccessKeyParametersInner withKeyType(KeyType keyType) { - this.keyType = keyType; - return this; - } - - /** - * Get the key value. - * - * @return the key value - */ - public String key() { - return this.key; - } - - /** - * Set the key value. - * - * @param key the key value to set - * @return the RegenerateAccessKeyParametersInner object itself. - */ - public RegenerateAccessKeyParametersInner withKey(String key) { - this.key = key; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayManagementClientImpl.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayManagementClientImpl.java deleted file mode 100755 index e4d15c2476d..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayManagementClientImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the RelayManagementClientImpl class. - */ -public class RelayManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ - private String subscriptionId; - - /** - * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public RelayManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Client Api Version. */ - private String apiVersion; - - /** - * Gets Client Api Version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public RelayManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public RelayManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public RelayManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * The NamespacesInner object to access its operations. - */ - private NamespacesInner namespaces; - - /** - * Gets the NamespacesInner object to access its operations. - * @return the NamespacesInner object. - */ - public NamespacesInner namespaces() { - return this.namespaces; - } - - /** - * The HybridConnectionsInner object to access its operations. - */ - private HybridConnectionsInner hybridConnections; - - /** - * Gets the HybridConnectionsInner object to access its operations. - * @return the HybridConnectionsInner object. - */ - public HybridConnectionsInner hybridConnections() { - return this.hybridConnections; - } - - /** - * The WCFRelaysInner object to access its operations. - */ - private WCFRelaysInner wCFRelays; - - /** - * Gets the WCFRelaysInner object to access its operations. - * @return the WCFRelaysInner object. - */ - public WCFRelaysInner wCFRelays() { - return this.wCFRelays; - } - - /** - * Initializes an instance of RelayManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public RelayManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of RelayManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public RelayManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of RelayManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public RelayManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2017-04-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.operations = new OperationsInner(restClient().retrofit(), this); - this.namespaces = new NamespacesInner(restClient().retrofit(), this); - this.hybridConnections = new HybridConnectionsInner(restClient().retrofit(), this); - this.wCFRelays = new WCFRelaysInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "RelayManagementClient", "2017-04-01"); - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayManager.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayManager.java deleted file mode 100755 index d72029d2bcc..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure Relay resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class RelayManager extends Manager { - /** - * Get a Configurable instance that can be used to create RelayManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new RelayManager.ConfigurableImpl(); - } - /** - * Creates an instance of RelayManager that exposes Relay resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the RelayManager - */ - public static RelayManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new RelayManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of RelayManager that exposes Relay resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the RelayManager - */ - public static RelayManager authenticate(RestClient restClient, String subscriptionId) { - return new RelayManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of RelayManager that exposes Relay management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing Relay management API entry points that work across subscriptions - */ - RelayManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public RelayManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return RelayManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private RelayManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new RelayManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayNamespaceInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayNamespaceInner.java deleted file mode 100755 index 021046b535c..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayNamespaceInner.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.management.relay.Sku; -import com.microsoft.azure.management.relay.ProvisioningStateEnum; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Description of a Namespace resource. - */ -@JsonFlatten -public class RelayNamespaceInner extends TrackedResourceInner { - /** - * Sku of the Namespace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /** - * Possible values include: 'Created', 'Succeeded', 'Deleted', 'Failed', - * 'Updating', 'Unknown'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStateEnum provisioningState; - - /** - * The time the namespace was created. - */ - @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdAt; - - /** - * The time the namespace was updated. - */ - @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) - private DateTime updatedAt; - - /** - * Endpoint you can use to perform Service Bus operations. - */ - @JsonProperty(value = "properties.serviceBusEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String serviceBusEndpoint; - - /** - * Identifier for Azure Insights metrics. - */ - @JsonProperty(value = "properties.metricId", access = JsonProperty.Access.WRITE_ONLY) - private String metricId; - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the RelayNamespaceInner object itself. - */ - public RelayNamespaceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStateEnum provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdAt value. - * - * @return the createdAt value - */ - public DateTime createdAt() { - return this.createdAt; - } - - /** - * Get the updatedAt value. - * - * @return the updatedAt value - */ - public DateTime updatedAt() { - return this.updatedAt; - } - - /** - * Get the serviceBusEndpoint value. - * - * @return the serviceBusEndpoint value - */ - public String serviceBusEndpoint() { - return this.serviceBusEndpoint; - } - - /** - * Get the metricId value. - * - * @return the metricId value - */ - public String metricId() { - return this.metricId; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayUpdateParametersInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayUpdateParametersInner.java deleted file mode 100755 index a9de5ba2f95..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayUpdateParametersInner.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.management.relay.Sku; -import com.microsoft.azure.management.relay.ProvisioningStateEnum; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Description of a Namespace resource. - */ -@JsonFlatten -public class RelayUpdateParametersInner extends ResourceNamespacePatchInner { - /** - * Sku of the Namespace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /** - * Possible values include: 'Created', 'Succeeded', 'Deleted', 'Failed', - * 'Updating', 'Unknown'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStateEnum provisioningState; - - /** - * The time the namespace was created. - */ - @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdAt; - - /** - * The time the namespace was updated. - */ - @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) - private DateTime updatedAt; - - /** - * Endpoint you can use to perform Service Bus operations. - */ - @JsonProperty(value = "properties.serviceBusEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String serviceBusEndpoint; - - /** - * Identifier for Azure Insights metrics. - */ - @JsonProperty(value = "properties.metricId", access = JsonProperty.Access.WRITE_ONLY) - private String metricId; - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the RelayUpdateParametersInner object itself. - */ - public RelayUpdateParametersInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningStateEnum provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdAt value. - * - * @return the createdAt value - */ - public DateTime createdAt() { - return this.createdAt; - } - - /** - * Get the updatedAt value. - * - * @return the updatedAt value - */ - public DateTime updatedAt() { - return this.updatedAt; - } - - /** - * Get the serviceBusEndpoint value. - * - * @return the serviceBusEndpoint value - */ - public String serviceBusEndpoint() { - return this.serviceBusEndpoint; - } - - /** - * Get the metricId value. - * - * @return the metricId value - */ - public String metricId() { - return this.metricId; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/ResourceNamespacePatchInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/ResourceNamespacePatchInner.java deleted file mode 100755 index 61f91615012..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/ResourceNamespacePatchInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; - -/** - * Definition of Resource. - */ -public class ResourceNamespacePatchInner extends Resource { - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the ResourceNamespacePatchInner object itself. - */ - public ResourceNamespacePatchInner withTags(Map tags) { - this.tags = tags; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/TrackedResourceInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/TrackedResourceInner.java deleted file mode 100755 index d7a2c54b457..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/TrackedResourceInner.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import com.microsoft.azure.Resource; - -/** - * Definition of Resource. - */ -public class TrackedResourceInner extends Resource { - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/WCFRelaysInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/WCFRelaysInner.java deleted file mode 100755 index 9a544905276..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/WCFRelaysInner.java +++ /dev/null @@ -1,1492 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.relay.AccessRights; -import com.microsoft.azure.management.relay.ErrorResponseException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in WCFRelays. - */ -public class WCFRelaysInner { - /** The Retrofit service to perform REST calls. */ - private WCFRelaysService service; - /** The service client containing this operation class. */ - private RelayManagementClientImpl client; - - /** - * Initializes an instance of WCFRelaysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public WCFRelaysInner(Retrofit retrofit, RelayManagementClientImpl client) { - this.service = retrofit.create(WCFRelaysService.class); - this.client = client; - } - - /** - * The interface defining all the services for WCFRelays to be - * used by Retrofit to perform actually REST calls. - */ - interface WCFRelaysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays listByNamespace" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays") - Observable> listByNamespace(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Body WcfRelayInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays listAuthorizationRules" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules") - Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays createOrUpdateAuthorizationRule" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}") - Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AuthorizationRuleInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays deleteAuthorizationRule" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) - Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays getAuthorizationRule" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}") - Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays regenerateKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys") - Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays listByNamespaceNext" }) - @GET - Observable> listByNamespaceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.WCFRelays listAuthorizationRulesNext" }) - @GET - Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists the WCFRelays within the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WcfRelayInner> object if successful. - */ - public PagedList listByNamespace(final String resourceGroupName, final String namespaceName) { - ServiceResponse> response = listByNamespaceSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the WCFRelays within the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByNamespaceSinglePageAsync(resourceGroupName, namespaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the WCFRelays within the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WcfRelayInner> object - */ - public Observable> listByNamespaceAsync(final String resourceGroupName, final String namespaceName) { - return listByNamespaceWithServiceResponseAsync(resourceGroupName, namespaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the WCFRelays within the namespace. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WcfRelayInner> object - */ - public Observable>> listByNamespaceWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { - return listByNamespaceSinglePageAsync(resourceGroupName, namespaceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the WCFRelays within the namespace. - * - ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription. - ServiceResponse> * @param namespaceName The Namespace Name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WcfRelayInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByNamespaceSinglePageAsync(final String resourceGroupName, final String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByNamespace(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByNamespaceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByNamespaceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Creates or Updates a WCFRelay. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param parameters Parameters supplied to create a WCFRelays. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WcfRelayInner object if successful. - */ - public WcfRelayInner createOrUpdate(String resourceGroupName, String namespaceName, String relayName, WcfRelayInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, parameters).toBlocking().single().body(); - } - - /** - * Creates or Updates a WCFRelay. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param parameters Parameters supplied to create a WCFRelays. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String relayName, WcfRelayInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, parameters), serviceCallback); - } - - /** - * Creates or Updates a WCFRelay. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param parameters Parameters supplied to create a WCFRelays. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WcfRelayInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String relayName, WcfRelayInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, parameters).map(new Func1, WcfRelayInner>() { - @Override - public WcfRelayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates a WCFRelay. This operation is idempotent. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param parameters Parameters supplied to create a WCFRelays. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WcfRelayInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName, WcfRelayInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, namespaceName, relayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes a WCFRelays . - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String namespaceName, String relayName) { - deleteWithServiceResponseAsync(resourceGroupName, namespaceName, relayName).toBlocking().single().body(); - } - - /** - * Deletes a WCFRelays . - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, String relayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, relayName), serviceCallback); - } - - /** - * Deletes a WCFRelays . - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String namespaceName, String relayName) { - return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, relayName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a WCFRelays . - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Returns the description for the specified WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the WcfRelayInner object if successful. - */ - public WcfRelayInner get(String resourceGroupName, String namespaceName, String relayName) { - return getWithServiceResponseAsync(resourceGroupName, namespaceName, relayName).toBlocking().single().body(); - } - - /** - * Returns the description for the specified WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String namespaceName, String relayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, relayName), serviceCallback); - } - - /** - * Returns the description for the specified WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WcfRelayInner object - */ - public Observable getAsync(String resourceGroupName, String namespaceName, String relayName) { - return getWithServiceResponseAsync(resourceGroupName, namespaceName, relayName).map(new Func1, WcfRelayInner>() { - @Override - public WcfRelayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Returns the description for the specified WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WcfRelayInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Authorization rules for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationRuleInner> object if successful. - */ - public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName, final String relayName) { - ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, relayName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Authorization rules for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String relayName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, relayName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Authorization rules for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String relayName) { - return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName, relayName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Authorization rules for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String relayName) { - return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, relayName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Authorization rules for a WCFRelays. - * - ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription. - ServiceResponse> * @param namespaceName The Namespace Name - ServiceResponse> * @param relayName The relay name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName, final String relayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listAuthorizationRules(resourceGroupName, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or Updates an authorization rule for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Creates or Updates an authorization rule for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName), serviceCallback); - } - - /** - * Creates or Updates an authorization rule for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates an authorization rule for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final List rights = null; - AuthorizationRuleInner parameters = new AuthorizationRuleInner(); - parameters.withRights(null); - return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, relayName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or Updates an authorization rule for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, List rights) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, rights).toBlocking().single().body(); - } - - /** - * Creates or Updates an authorization rule for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, List rights, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, rights), serviceCallback); - } - - /** - * Creates or Updates an authorization rule for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, List rights) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, rights).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or Updates an authorization rule for a WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param rights The rights associated with the rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, List rights) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(rights); - AuthorizationRuleInner parameters = new AuthorizationRuleInner(); - parameters.withRights(rights); - return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, relayName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Deletes a WCFRelays authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Deletes a WCFRelays authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName), serviceCallback); - } - - /** - * Deletes a WCFRelays authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a WCFRelays authorization rule. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteAuthorizationRule(resourceGroupName, namespaceName, relayName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Get authorizationRule for a WCFRelays by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AuthorizationRuleInner object if successful. - */ - public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Get authorizationRule for a WCFRelays by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName), serviceCallback); - } - - /** - * Get authorizationRule for a WCFRelays by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { - @Override - public AuthorizationRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get authorizationRule for a WCFRelays by name. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AuthorizationRuleInner object - */ - public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAuthorizationRule(resourceGroupName, namespaceName, relayName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getAuthorizationRuleDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Primary and Secondary ConnectionStrings to the WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AccessKeysInner object if successful. - */ - public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).toBlocking().single().body(); - } - - /** - * Primary and Secondary ConnectionStrings to the WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName), serviceCallback); - } - - /** - * Primary and Secondary ConnectionStrings to the WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).map(new Func1, AccessKeysInner>() { - @Override - public AccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Primary and Secondary ConnectionStrings to the WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listKeys(resourceGroupName, namespaceName, relayName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AccessKeysInner object if successful. - */ - public AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, parameters).toBlocking().single().body(); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, parameters), serviceCallback); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, parameters).map(new Func1, AccessKeysInner>() { - @Override - public AccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param namespaceName The Namespace Name - * @param relayName The relay name - * @param authorizationRuleName The authorizationRule name. - * @param parameters Parameters supplied to regenerate Auth Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AccessKeysInner object - */ - public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName, RegenerateAccessKeyParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (relayName == null) { - throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); - } - if (authorizationRuleName == null) { - throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.regenerateKeys(resourceGroupName, namespaceName, relayName, authorizationRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Lists the WCFRelays within the namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<WcfRelayInner> object if successful. - */ - public PagedList listByNamespaceNext(final String nextPageLink) { - ServiceResponse> response = listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists the WCFRelays within the namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByNamespaceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByNamespaceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists the WCFRelays within the namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WcfRelayInner> object - */ - public Observable> listByNamespaceNextAsync(final String nextPageLink) { - return listByNamespaceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists the WCFRelays within the namespace. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<WcfRelayInner> object - */ - public Observable>> listByNamespaceNextWithServiceResponseAsync(final String nextPageLink) { - return listByNamespaceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists the WCFRelays within the namespace. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WcfRelayInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByNamespaceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByNamespaceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByNamespaceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByNamespaceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Authorization rules for a WCFRelays. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<AuthorizationRuleInner> object if successful. - */ - public PagedList listAuthorizationRulesNext(final String nextPageLink) { - ServiceResponse> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Authorization rules for a WCFRelays. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listAuthorizationRulesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Authorization rules for a WCFRelays. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable> listAuthorizationRulesNextAsync(final String nextPageLink) { - return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Authorization rules for a WCFRelays. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AuthorizationRuleInner> object - */ - public Observable>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) { - return listAuthorizationRulesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Authorization rules for a WCFRelays. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listAuthorizationRulesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listAuthorizationRulesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/WcfRelayInner.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/WcfRelayInner.java deleted file mode 100755 index d476b7ebb12..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/WcfRelayInner.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.relay.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.relay.Relaytype; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of WcfRelays Resource. - */ -@JsonFlatten -public class WcfRelayInner extends Resource { - /** - * true if the relay is dynamic; otherwise, false. - */ - @JsonProperty(value = "properties.isDynamic", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDynamic; - - /** - * The time the WCFRelay was created. - */ - @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdAt; - - /** - * The time the namespace was updated. - */ - @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) - private DateTime updatedAt; - - /** - * The number of listeners for this relay. min :1 and max:25 supported. - */ - @JsonProperty(value = "properties.listenerCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer listenerCount; - - /** - * WCFRelay Type. Possible values include: 'NetTcp', 'Http'. - */ - @JsonProperty(value = "properties.relayType") - private Relaytype relayType; - - /** - * true if client authorization is needed for this relay; otherwise, false. - */ - @JsonProperty(value = "properties.requiresClientAuthorization") - private Boolean requiresClientAuthorization; - - /** - * true if transport security is needed for this relay; otherwise, false. - */ - @JsonProperty(value = "properties.requiresTransportSecurity") - private Boolean requiresTransportSecurity; - - /** - * usermetadata is a placeholder to store user-defined string data for the - * HybridConnection endpoint.e.g. it can be used to store descriptive - * data, such as list of teams and their contact information also - * user-defined configuration settings can be stored. - */ - @JsonProperty(value = "properties.userMetadata") - private String userMetadata; - - /** - * Get the isDynamic value. - * - * @return the isDynamic value - */ - public Boolean isDynamic() { - return this.isDynamic; - } - - /** - * Get the createdAt value. - * - * @return the createdAt value - */ - public DateTime createdAt() { - return this.createdAt; - } - - /** - * Get the updatedAt value. - * - * @return the updatedAt value - */ - public DateTime updatedAt() { - return this.updatedAt; - } - - /** - * Get the listenerCount value. - * - * @return the listenerCount value - */ - public Integer listenerCount() { - return this.listenerCount; - } - - /** - * Get the relayType value. - * - * @return the relayType value - */ - public Relaytype relayType() { - return this.relayType; - } - - /** - * Set the relayType value. - * - * @param relayType the relayType value to set - * @return the WcfRelayInner object itself. - */ - public WcfRelayInner withRelayType(Relaytype relayType) { - this.relayType = relayType; - return this; - } - - /** - * Get the requiresClientAuthorization value. - * - * @return the requiresClientAuthorization value - */ - public Boolean requiresClientAuthorization() { - return this.requiresClientAuthorization; - } - - /** - * Set the requiresClientAuthorization value. - * - * @param requiresClientAuthorization the requiresClientAuthorization value to set - * @return the WcfRelayInner object itself. - */ - public WcfRelayInner withRequiresClientAuthorization(Boolean requiresClientAuthorization) { - this.requiresClientAuthorization = requiresClientAuthorization; - return this; - } - - /** - * Get the requiresTransportSecurity value. - * - * @return the requiresTransportSecurity value - */ - public Boolean requiresTransportSecurity() { - return this.requiresTransportSecurity; - } - - /** - * Set the requiresTransportSecurity value. - * - * @param requiresTransportSecurity the requiresTransportSecurity value to set - * @return the WcfRelayInner object itself. - */ - public WcfRelayInner withRequiresTransportSecurity(Boolean requiresTransportSecurity) { - this.requiresTransportSecurity = requiresTransportSecurity; - return this; - } - - /** - * Get the userMetadata value. - * - * @return the userMetadata value - */ - public String userMetadata() { - return this.userMetadata; - } - - /** - * Set the userMetadata value. - * - * @param userMetadata the userMetadata value to set - * @return the WcfRelayInner object itself. - */ - public WcfRelayInner withUserMetadata(String userMetadata) { - this.userMetadata = userMetadata; - return this; - } - -} diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/package-info.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/package-info.java deleted file mode 100755 index 37949044297..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for RelayManagementClient. - * Use these API to manage Azure Relay resources through Azure Resources Manager. - */ -package com.microsoft.azure.management.relay.implementation; diff --git a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/package-info.java b/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/package-info.java deleted file mode 100755 index b70581414c9..00000000000 --- a/azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for RelayManagementClient. - * Use these API to manage Azure Relay resources through Azure Resources Manager. - */ -package com.microsoft.azure.management.relay; diff --git a/azure-mgmt-scheduler/pom.xml b/azure-mgmt-scheduler/pom.xml deleted file mode 100644 index fe7269c067c..00000000000 --- a/azure-mgmt-scheduler/pom.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - - azure-mgmt-scheduler - jar - 1.12.2-beta-SNAPSHOT - - Microsoft Azure SDK for Scheduler Management - This package contains Microsoft Azure Sche Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - UTF-8 - - - - - - microsoft - Microsoft - - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - true - true - - true - true - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/]]>
-
-
- -
-
-
diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/BasicAuthentication.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/BasicAuthentication.java deleted file mode 100644 index 7187d8eaf9a..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/BasicAuthentication.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The BasicAuthentication model. - */ -public class BasicAuthentication extends HttpAuthentication { - /** - * Gets or sets the username. - */ - @JsonProperty(value = "username") - private String username; - - /** - * Gets or sets the password, return value will always be empty. - */ - @JsonProperty(value = "password") - private String password; - - /** - * Get the username value. - * - * @return the username value - */ - public String username() { - return this.username; - } - - /** - * Set the username value. - * - * @param username the username value to set - * @return the BasicAuthentication object itself. - */ - public BasicAuthentication withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the BasicAuthentication object itself. - */ - public BasicAuthentication withPassword(String password) { - this.password = password; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ClientCertAuthentication.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ClientCertAuthentication.java deleted file mode 100644 index 01c1f3e35cf..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ClientCertAuthentication.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The ClientCertAuthentication model. - */ -public class ClientCertAuthentication extends HttpAuthentication { - /** - * Gets or sets the certificate password, return value will always be - * empty. - */ - @JsonProperty(value = "password") - private String password; - - /** - * Gets or sets the pfx certificate. Accepts certification in base64 - * encoding, return value will always be empty. - */ - @JsonProperty(value = "pfx") - private String pfx; - - /** - * Gets or sets the certificate thumbprint. - */ - @JsonProperty(value = "certificateThumbprint") - private String certificateThumbprint; - - /** - * Gets or sets the certificate expiration date. - */ - @JsonProperty(value = "certificateExpirationDate") - private DateTime certificateExpirationDate; - - /** - * Gets or sets the certificate subject name. - */ - @JsonProperty(value = "certificateSubjectName") - private String certificateSubjectName; - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the ClientCertAuthentication object itself. - */ - public ClientCertAuthentication withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the pfx value. - * - * @return the pfx value - */ - public String pfx() { - return this.pfx; - } - - /** - * Set the pfx value. - * - * @param pfx the pfx value to set - * @return the ClientCertAuthentication object itself. - */ - public ClientCertAuthentication withPfx(String pfx) { - this.pfx = pfx; - return this; - } - - /** - * Get the certificateThumbprint value. - * - * @return the certificateThumbprint value - */ - public String certificateThumbprint() { - return this.certificateThumbprint; - } - - /** - * Set the certificateThumbprint value. - * - * @param certificateThumbprint the certificateThumbprint value to set - * @return the ClientCertAuthentication object itself. - */ - public ClientCertAuthentication withCertificateThumbprint(String certificateThumbprint) { - this.certificateThumbprint = certificateThumbprint; - return this; - } - - /** - * Get the certificateExpirationDate value. - * - * @return the certificateExpirationDate value - */ - public DateTime certificateExpirationDate() { - return this.certificateExpirationDate; - } - - /** - * Set the certificateExpirationDate value. - * - * @param certificateExpirationDate the certificateExpirationDate value to set - * @return the ClientCertAuthentication object itself. - */ - public ClientCertAuthentication withCertificateExpirationDate(DateTime certificateExpirationDate) { - this.certificateExpirationDate = certificateExpirationDate; - return this; - } - - /** - * Get the certificateSubjectName value. - * - * @return the certificateSubjectName value - */ - public String certificateSubjectName() { - return this.certificateSubjectName; - } - - /** - * Set the certificateSubjectName value. - * - * @param certificateSubjectName the certificateSubjectName value to set - * @return the ClientCertAuthentication object itself. - */ - public ClientCertAuthentication withCertificateSubjectName(String certificateSubjectName) { - this.certificateSubjectName = certificateSubjectName; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/DayOfWeek.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/DayOfWeek.java deleted file mode 100644 index 1e5323955a1..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/DayOfWeek.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for DayOfWeek. - */ -public enum DayOfWeek { - /** Enum value Sunday. */ - SUNDAY("Sunday"), - - /** Enum value Monday. */ - MONDAY("Monday"), - - /** Enum value Tuesday. */ - TUESDAY("Tuesday"), - - /** Enum value Wednesday. */ - WEDNESDAY("Wednesday"), - - /** Enum value Thursday. */ - THURSDAY("Thursday"), - - /** Enum value Friday. */ - FRIDAY("Friday"), - - /** Enum value Saturday. */ - SATURDAY("Saturday"); - - /** The actual serialized value for a DayOfWeek instance. */ - private String value; - - DayOfWeek(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DayOfWeek instance. - * - * @param value the serialized value to parse. - * @return the parsed DayOfWeek object, or null if unable to parse. - */ - @JsonCreator - public static DayOfWeek fromString(String value) { - DayOfWeek[] items = DayOfWeek.values(); - for (DayOfWeek item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpAuthentication.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpAuthentication.java deleted file mode 100644 index 54fabc4b3b5..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpAuthentication.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The HttpAuthentication model. - */ -public class HttpAuthentication { - /** - * Gets or sets the HTTP authentication type. Possible values include: - * 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', 'Basic'. - */ - @JsonProperty(value = "type") - private HttpAuthenticationType type; - - /** - * Get the type value. - * - * @return the type value - */ - public HttpAuthenticationType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the HttpAuthentication object itself. - */ - public HttpAuthentication withType(HttpAuthenticationType type) { - this.type = type; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpAuthenticationType.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpAuthenticationType.java deleted file mode 100644 index 0cda60458bf..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpAuthenticationType.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for HttpAuthenticationType. - */ -public enum HttpAuthenticationType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value ClientCertificate. */ - CLIENT_CERTIFICATE("ClientCertificate"), - - /** Enum value ActiveDirectoryOAuth. */ - ACTIVE_DIRECTORY_OAUTH("ActiveDirectoryOAuth"), - - /** Enum value Basic. */ - BASIC("Basic"); - - /** The actual serialized value for a HttpAuthenticationType instance. */ - private String value; - - HttpAuthenticationType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a HttpAuthenticationType instance. - * - * @param value the serialized value to parse. - * @return the parsed HttpAuthenticationType object, or null if unable to parse. - */ - @JsonCreator - public static HttpAuthenticationType fromString(String value) { - HttpAuthenticationType[] items = HttpAuthenticationType.values(); - for (HttpAuthenticationType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpRequest.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpRequest.java deleted file mode 100644 index 7bc07953699..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/HttpRequest.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The HttpRequest model. - */ -public class HttpRequest { - /** - * Gets or sets the authentication method of the request. - */ - @JsonProperty(value = "authentication") - private HttpAuthentication authentication; - - /** - * Gets or sets the URI of the request. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * Gets or sets the method of the request. - */ - @JsonProperty(value = "method") - private String method; - - /** - * Gets or sets the request body. - */ - @JsonProperty(value = "body") - private String body; - - /** - * Gets or sets the headers. - */ - @JsonProperty(value = "headers") - private Map headers; - - /** - * Get the authentication value. - * - * @return the authentication value - */ - public HttpAuthentication authentication() { - return this.authentication; - } - - /** - * Set the authentication value. - * - * @param authentication the authentication value to set - * @return the HttpRequest object itself. - */ - public HttpRequest withAuthentication(HttpAuthentication authentication) { - this.authentication = authentication; - return this; - } - - /** - * Get the uri value. - * - * @return the uri value - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri value. - * - * @param uri the uri value to set - * @return the HttpRequest object itself. - */ - public HttpRequest withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the method value. - * - * @return the method value - */ - public String method() { - return this.method; - } - - /** - * Set the method value. - * - * @param method the method value to set - * @return the HttpRequest object itself. - */ - public HttpRequest withMethod(String method) { - this.method = method; - return this; - } - - /** - * Get the body value. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set the body value. - * - * @param body the body value to set - * @return the HttpRequest object itself. - */ - public HttpRequest withBody(String body) { - this.body = body; - return this; - } - - /** - * Get the headers value. - * - * @return the headers value - */ - public Map headers() { - return this.headers; - } - - /** - * Set the headers value. - * - * @param headers the headers value to set - * @return the HttpRequest object itself. - */ - public HttpRequest withHeaders(Map headers) { - this.headers = headers; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobAction.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobAction.java deleted file mode 100644 index 7fe0eb798f9..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobAction.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobAction model. - */ -public class JobAction { - /** - * Gets or sets the job action type. Possible values include: 'Http', - * 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic'. - */ - @JsonProperty(value = "type") - private JobActionType type; - - /** - * Gets or sets the http requests. - */ - @JsonProperty(value = "request") - private HttpRequest request; - - /** - * Gets or sets the storage queue message. - */ - @JsonProperty(value = "queueMessage") - private StorageQueueMessage queueMessage; - - /** - * Gets or sets the service bus queue message. - */ - @JsonProperty(value = "serviceBusQueueMessage") - private ServiceBusQueueMessage serviceBusQueueMessage; - - /** - * Gets or sets the service bus topic message. - */ - @JsonProperty(value = "serviceBusTopicMessage") - private ServiceBusTopicMessage serviceBusTopicMessage; - - /** - * Gets or sets the retry policy. - */ - @JsonProperty(value = "retryPolicy") - private RetryPolicy retryPolicy; - - /** - * Gets or sets the error action. - */ - @JsonProperty(value = "errorAction") - private JobErrorAction errorAction; - - /** - * Get the type value. - * - * @return the type value - */ - public JobActionType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the JobAction object itself. - */ - public JobAction withType(JobActionType type) { - this.type = type; - return this; - } - - /** - * Get the request value. - * - * @return the request value - */ - public HttpRequest request() { - return this.request; - } - - /** - * Set the request value. - * - * @param request the request value to set - * @return the JobAction object itself. - */ - public JobAction withRequest(HttpRequest request) { - this.request = request; - return this; - } - - /** - * Get the queueMessage value. - * - * @return the queueMessage value - */ - public StorageQueueMessage queueMessage() { - return this.queueMessage; - } - - /** - * Set the queueMessage value. - * - * @param queueMessage the queueMessage value to set - * @return the JobAction object itself. - */ - public JobAction withQueueMessage(StorageQueueMessage queueMessage) { - this.queueMessage = queueMessage; - return this; - } - - /** - * Get the serviceBusQueueMessage value. - * - * @return the serviceBusQueueMessage value - */ - public ServiceBusQueueMessage serviceBusQueueMessage() { - return this.serviceBusQueueMessage; - } - - /** - * Set the serviceBusQueueMessage value. - * - * @param serviceBusQueueMessage the serviceBusQueueMessage value to set - * @return the JobAction object itself. - */ - public JobAction withServiceBusQueueMessage(ServiceBusQueueMessage serviceBusQueueMessage) { - this.serviceBusQueueMessage = serviceBusQueueMessage; - return this; - } - - /** - * Get the serviceBusTopicMessage value. - * - * @return the serviceBusTopicMessage value - */ - public ServiceBusTopicMessage serviceBusTopicMessage() { - return this.serviceBusTopicMessage; - } - - /** - * Set the serviceBusTopicMessage value. - * - * @param serviceBusTopicMessage the serviceBusTopicMessage value to set - * @return the JobAction object itself. - */ - public JobAction withServiceBusTopicMessage(ServiceBusTopicMessage serviceBusTopicMessage) { - this.serviceBusTopicMessage = serviceBusTopicMessage; - return this; - } - - /** - * Get the retryPolicy value. - * - * @return the retryPolicy value - */ - public RetryPolicy retryPolicy() { - return this.retryPolicy; - } - - /** - * Set the retryPolicy value. - * - * @param retryPolicy the retryPolicy value to set - * @return the JobAction object itself. - */ - public JobAction withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = retryPolicy; - return this; - } - - /** - * Get the errorAction value. - * - * @return the errorAction value - */ - public JobErrorAction errorAction() { - return this.errorAction; - } - - /** - * Set the errorAction value. - * - * @param errorAction the errorAction value to set - * @return the JobAction object itself. - */ - public JobAction withErrorAction(JobErrorAction errorAction) { - this.errorAction = errorAction; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobActionType.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobActionType.java deleted file mode 100644 index 5777b2af54e..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobActionType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JobActionType. - */ -public enum JobActionType { - /** Enum value Http. */ - HTTP("Http"), - - /** Enum value Https. */ - HTTPS("Https"), - - /** Enum value StorageQueue. */ - STORAGE_QUEUE("StorageQueue"), - - /** Enum value ServiceBusQueue. */ - SERVICE_BUS_QUEUE("ServiceBusQueue"), - - /** Enum value ServiceBusTopic. */ - SERVICE_BUS_TOPIC("ServiceBusTopic"); - - /** The actual serialized value for a JobActionType instance. */ - private String value; - - JobActionType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a JobActionType instance. - * - * @param value the serialized value to parse. - * @return the parsed JobActionType object, or null if unable to parse. - */ - @JsonCreator - public static JobActionType fromString(String value) { - JobActionType[] items = JobActionType.values(); - for (JobActionType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionProperties.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionProperties.java deleted file mode 100644 index da4485e67b0..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionProperties.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobCollectionProperties model. - */ -public class JobCollectionProperties { - /** - * Gets or sets the SKU. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /** - * Gets or sets the state. Possible values include: 'Enabled', 'Disabled', - * 'Suspended', 'Deleted'. - */ - @JsonProperty(value = "state") - private JobCollectionState state; - - /** - * Gets or sets the job collection quota. - */ - @JsonProperty(value = "quota") - private JobCollectionQuota quota; - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the JobCollectionProperties object itself. - */ - public JobCollectionProperties withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public JobCollectionState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the JobCollectionProperties object itself. - */ - public JobCollectionProperties withState(JobCollectionState state) { - this.state = state; - return this; - } - - /** - * Get the quota value. - * - * @return the quota value - */ - public JobCollectionQuota quota() { - return this.quota; - } - - /** - * Set the quota value. - * - * @param quota the quota value to set - * @return the JobCollectionProperties object itself. - */ - public JobCollectionProperties withQuota(JobCollectionQuota quota) { - this.quota = quota; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionQuota.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionQuota.java deleted file mode 100644 index 4238f9c6c79..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionQuota.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobCollectionQuota model. - */ -public class JobCollectionQuota { - /** - * Gets or set the maximum job count. - */ - @JsonProperty(value = "maxJobCount") - private Integer maxJobCount; - - /** - * Gets or sets the maximum job occurrence. - */ - @JsonProperty(value = "maxJobOccurrence") - private Integer maxJobOccurrence; - - /** - * Gets or set the maximum recurrence. - */ - @JsonProperty(value = "maxRecurrence") - private JobMaxRecurrence maxRecurrence; - - /** - * Get the maxJobCount value. - * - * @return the maxJobCount value - */ - public Integer maxJobCount() { - return this.maxJobCount; - } - - /** - * Set the maxJobCount value. - * - * @param maxJobCount the maxJobCount value to set - * @return the JobCollectionQuota object itself. - */ - public JobCollectionQuota withMaxJobCount(Integer maxJobCount) { - this.maxJobCount = maxJobCount; - return this; - } - - /** - * Get the maxJobOccurrence value. - * - * @return the maxJobOccurrence value - */ - public Integer maxJobOccurrence() { - return this.maxJobOccurrence; - } - - /** - * Set the maxJobOccurrence value. - * - * @param maxJobOccurrence the maxJobOccurrence value to set - * @return the JobCollectionQuota object itself. - */ - public JobCollectionQuota withMaxJobOccurrence(Integer maxJobOccurrence) { - this.maxJobOccurrence = maxJobOccurrence; - return this; - } - - /** - * Get the maxRecurrence value. - * - * @return the maxRecurrence value - */ - public JobMaxRecurrence maxRecurrence() { - return this.maxRecurrence; - } - - /** - * Set the maxRecurrence value. - * - * @param maxRecurrence the maxRecurrence value to set - * @return the JobCollectionQuota object itself. - */ - public JobCollectionQuota withMaxRecurrence(JobMaxRecurrence maxRecurrence) { - this.maxRecurrence = maxRecurrence; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionState.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionState.java deleted file mode 100644 index 7e34346f8b0..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobCollectionState.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JobCollectionState. - */ -public enum JobCollectionState { - /** Enum value Enabled. */ - ENABLED("Enabled"), - - /** Enum value Disabled. */ - DISABLED("Disabled"), - - /** Enum value Suspended. */ - SUSPENDED("Suspended"), - - /** Enum value Deleted. */ - DELETED("Deleted"); - - /** The actual serialized value for a JobCollectionState instance. */ - private String value; - - JobCollectionState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a JobCollectionState instance. - * - * @param value the serialized value to parse. - * @return the parsed JobCollectionState object, or null if unable to parse. - */ - @JsonCreator - public static JobCollectionState fromString(String value) { - JobCollectionState[] items = JobCollectionState.values(); - for (JobCollectionState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobErrorAction.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobErrorAction.java deleted file mode 100644 index ffe170c3458..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobErrorAction.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobErrorAction model. - */ -public class JobErrorAction { - /** - * Gets or sets the job error action type. Possible values include: 'Http', - * 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic'. - */ - @JsonProperty(value = "type") - private JobActionType type; - - /** - * Gets or sets the http requests. - */ - @JsonProperty(value = "request") - private HttpRequest request; - - /** - * Gets or sets the storage queue message. - */ - @JsonProperty(value = "queueMessage") - private StorageQueueMessage queueMessage; - - /** - * Gets or sets the service bus queue message. - */ - @JsonProperty(value = "serviceBusQueueMessage") - private ServiceBusQueueMessage serviceBusQueueMessage; - - /** - * Gets or sets the service bus topic message. - */ - @JsonProperty(value = "serviceBusTopicMessage") - private ServiceBusTopicMessage serviceBusTopicMessage; - - /** - * Gets or sets the retry policy. - */ - @JsonProperty(value = "retryPolicy") - private RetryPolicy retryPolicy; - - /** - * Get the type value. - * - * @return the type value - */ - public JobActionType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the JobErrorAction object itself. - */ - public JobErrorAction withType(JobActionType type) { - this.type = type; - return this; - } - - /** - * Get the request value. - * - * @return the request value - */ - public HttpRequest request() { - return this.request; - } - - /** - * Set the request value. - * - * @param request the request value to set - * @return the JobErrorAction object itself. - */ - public JobErrorAction withRequest(HttpRequest request) { - this.request = request; - return this; - } - - /** - * Get the queueMessage value. - * - * @return the queueMessage value - */ - public StorageQueueMessage queueMessage() { - return this.queueMessage; - } - - /** - * Set the queueMessage value. - * - * @param queueMessage the queueMessage value to set - * @return the JobErrorAction object itself. - */ - public JobErrorAction withQueueMessage(StorageQueueMessage queueMessage) { - this.queueMessage = queueMessage; - return this; - } - - /** - * Get the serviceBusQueueMessage value. - * - * @return the serviceBusQueueMessage value - */ - public ServiceBusQueueMessage serviceBusQueueMessage() { - return this.serviceBusQueueMessage; - } - - /** - * Set the serviceBusQueueMessage value. - * - * @param serviceBusQueueMessage the serviceBusQueueMessage value to set - * @return the JobErrorAction object itself. - */ - public JobErrorAction withServiceBusQueueMessage(ServiceBusQueueMessage serviceBusQueueMessage) { - this.serviceBusQueueMessage = serviceBusQueueMessage; - return this; - } - - /** - * Get the serviceBusTopicMessage value. - * - * @return the serviceBusTopicMessage value - */ - public ServiceBusTopicMessage serviceBusTopicMessage() { - return this.serviceBusTopicMessage; - } - - /** - * Set the serviceBusTopicMessage value. - * - * @param serviceBusTopicMessage the serviceBusTopicMessage value to set - * @return the JobErrorAction object itself. - */ - public JobErrorAction withServiceBusTopicMessage(ServiceBusTopicMessage serviceBusTopicMessage) { - this.serviceBusTopicMessage = serviceBusTopicMessage; - return this; - } - - /** - * Get the retryPolicy value. - * - * @return the retryPolicy value - */ - public RetryPolicy retryPolicy() { - return this.retryPolicy; - } - - /** - * Set the retryPolicy value. - * - * @param retryPolicy the retryPolicy value to set - * @return the JobErrorAction object itself. - */ - public JobErrorAction withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = retryPolicy; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobExecutionStatus.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobExecutionStatus.java deleted file mode 100644 index c9549346321..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobExecutionStatus.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JobExecutionStatus. - */ -public enum JobExecutionStatus { - /** Enum value Completed. */ - COMPLETED("Completed"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Postponed. */ - POSTPONED("Postponed"); - - /** The actual serialized value for a JobExecutionStatus instance. */ - private String value; - - JobExecutionStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a JobExecutionStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed JobExecutionStatus object, or null if unable to parse. - */ - @JsonCreator - public static JobExecutionStatus fromString(String value) { - JobExecutionStatus[] items = JobExecutionStatus.values(); - for (JobExecutionStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryActionName.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryActionName.java deleted file mode 100644 index f8cc269b64f..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryActionName.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JobHistoryActionName. - */ -public enum JobHistoryActionName { - /** Enum value MainAction. */ - MAIN_ACTION("MainAction"), - - /** Enum value ErrorAction. */ - ERROR_ACTION("ErrorAction"); - - /** The actual serialized value for a JobHistoryActionName instance. */ - private String value; - - JobHistoryActionName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a JobHistoryActionName instance. - * - * @param value the serialized value to parse. - * @return the parsed JobHistoryActionName object, or null if unable to parse. - */ - @JsonCreator - public static JobHistoryActionName fromString(String value) { - JobHistoryActionName[] items = JobHistoryActionName.values(); - for (JobHistoryActionName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryDefinitionProperties.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryDefinitionProperties.java deleted file mode 100644 index 7e4321d8f76..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryDefinitionProperties.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobHistoryDefinitionProperties model. - */ -public class JobHistoryDefinitionProperties { - /** - * Gets the start time for this job. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime startTime; - - /** - * Gets the end time for this job. - */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime endTime; - - /** - * Gets the expected execution time for this job. - */ - @JsonProperty(value = "expectedExecutionTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime expectedExecutionTime; - - /** - * Gets the job history action name. Possible values include: 'MainAction', - * 'ErrorAction'. - */ - @JsonProperty(value = "actionName", access = JsonProperty.Access.WRITE_ONLY) - private JobHistoryActionName actionName; - - /** - * Gets the job history status. Possible values include: 'Completed', - * 'Failed', 'Postponed'. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private JobExecutionStatus status; - - /** - * Gets the message for the job history. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * Gets the retry count for job. - */ - @JsonProperty(value = "retryCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer retryCount; - - /** - * Gets the repeat count for the job. - */ - @JsonProperty(value = "repeatCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer repeatCount; - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Get the expectedExecutionTime value. - * - * @return the expectedExecutionTime value - */ - public DateTime expectedExecutionTime() { - return this.expectedExecutionTime; - } - - /** - * Get the actionName value. - * - * @return the actionName value - */ - public JobHistoryActionName actionName() { - return this.actionName; - } - - /** - * Get the status value. - * - * @return the status value - */ - public JobExecutionStatus status() { - return this.status; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Get the retryCount value. - * - * @return the retryCount value - */ - public Integer retryCount() { - return this.retryCount; - } - - /** - * Get the repeatCount value. - * - * @return the repeatCount value - */ - public Integer repeatCount() { - return this.repeatCount; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryFilter.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryFilter.java deleted file mode 100644 index 3752dcbd842..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobHistoryFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobHistoryFilter model. - */ -public class JobHistoryFilter { - /** - * Gets or sets the job execution status. Possible values include: - * 'Completed', 'Failed', 'Postponed'. - */ - @JsonProperty(value = "status") - private JobExecutionStatus status; - - /** - * Get the status value. - * - * @return the status value - */ - public JobExecutionStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the JobHistoryFilter object itself. - */ - public JobHistoryFilter withStatus(JobExecutionStatus status) { - this.status = status; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobMaxRecurrence.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobMaxRecurrence.java deleted file mode 100644 index a2e7f12cfdc..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobMaxRecurrence.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobMaxRecurrence model. - */ -public class JobMaxRecurrence { - /** - * Gets or sets the frequency of recurrence (second, minute, hour, day, - * week, month). Possible values include: 'Minute', 'Hour', 'Day', 'Week', - * 'Month'. - */ - @JsonProperty(value = "frequency") - private RecurrenceFrequency frequency; - - /** - * Gets or sets the interval between retries. - */ - @JsonProperty(value = "interval") - private Integer interval; - - /** - * Get the frequency value. - * - * @return the frequency value - */ - public RecurrenceFrequency frequency() { - return this.frequency; - } - - /** - * Set the frequency value. - * - * @param frequency the frequency value to set - * @return the JobMaxRecurrence object itself. - */ - public JobMaxRecurrence withFrequency(RecurrenceFrequency frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the interval value. - * - * @return the interval value - */ - public Integer interval() { - return this.interval; - } - - /** - * Set the interval value. - * - * @param interval the interval value to set - * @return the JobMaxRecurrence object itself. - */ - public JobMaxRecurrence withInterval(Integer interval) { - this.interval = interval; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrence.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrence.java deleted file mode 100644 index 479a2d8ae88..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrence.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobRecurrence model. - */ -public class JobRecurrence { - /** - * Gets or sets the frequency of recurrence (second, minute, hour, day, - * week, month). Possible values include: 'Minute', 'Hour', 'Day', 'Week', - * 'Month'. - */ - @JsonProperty(value = "frequency") - private RecurrenceFrequency frequency; - - /** - * Gets or sets the interval between retries. - */ - @JsonProperty(value = "interval") - private Integer interval; - - /** - * Gets or sets the maximum number of times that the job should run. - */ - @JsonProperty(value = "count") - private Integer count; - - /** - * Gets or sets the time at which the job will complete. - */ - @JsonProperty(value = "endTime") - private DateTime endTime; - - /** - * The schedule property. - */ - @JsonProperty(value = "schedule") - private JobRecurrenceSchedule schedule; - - /** - * Get the frequency value. - * - * @return the frequency value - */ - public RecurrenceFrequency frequency() { - return this.frequency; - } - - /** - * Set the frequency value. - * - * @param frequency the frequency value to set - * @return the JobRecurrence object itself. - */ - public JobRecurrence withFrequency(RecurrenceFrequency frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the interval value. - * - * @return the interval value - */ - public Integer interval() { - return this.interval; - } - - /** - * Set the interval value. - * - * @param interval the interval value to set - * @return the JobRecurrence object itself. - */ - public JobRecurrence withInterval(Integer interval) { - this.interval = interval; - return this; - } - - /** - * Get the count value. - * - * @return the count value - */ - public Integer count() { - return this.count; - } - - /** - * Set the count value. - * - * @param count the count value to set - * @return the JobRecurrence object itself. - */ - public JobRecurrence withCount(Integer count) { - this.count = count; - return this; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime value. - * - * @param endTime the endTime value to set - * @return the JobRecurrence object itself. - */ - public JobRecurrence withEndTime(DateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the schedule value. - * - * @return the schedule value - */ - public JobRecurrenceSchedule schedule() { - return this.schedule; - } - - /** - * Set the schedule value. - * - * @param schedule the schedule value to set - * @return the JobRecurrence object itself. - */ - public JobRecurrence withSchedule(JobRecurrenceSchedule schedule) { - this.schedule = schedule; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrenceSchedule.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrenceSchedule.java deleted file mode 100644 index de876efd896..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrenceSchedule.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobRecurrenceSchedule model. - */ -public class JobRecurrenceSchedule { - /** - * Gets or sets the days of the week that the job should execute on. - */ - @JsonProperty(value = "weekDays") - private List weekDays; - - /** - * Gets or sets the hours of the day that the job should execute at. - */ - @JsonProperty(value = "hours") - private List hours; - - /** - * Gets or sets the minutes of the hour that the job should execute at. - */ - @JsonProperty(value = "minutes") - private List minutes; - - /** - * Gets or sets the days of the month that the job should execute on. Must - * be between 1 and 31. - */ - @JsonProperty(value = "monthDays") - private List monthDays; - - /** - * Gets or sets the occurrences of days within a month. - */ - @JsonProperty(value = "monthlyOccurrences") - private List monthlyOccurrences; - - /** - * Get the weekDays value. - * - * @return the weekDays value - */ - public List weekDays() { - return this.weekDays; - } - - /** - * Set the weekDays value. - * - * @param weekDays the weekDays value to set - * @return the JobRecurrenceSchedule object itself. - */ - public JobRecurrenceSchedule withWeekDays(List weekDays) { - this.weekDays = weekDays; - return this; - } - - /** - * Get the hours value. - * - * @return the hours value - */ - public List hours() { - return this.hours; - } - - /** - * Set the hours value. - * - * @param hours the hours value to set - * @return the JobRecurrenceSchedule object itself. - */ - public JobRecurrenceSchedule withHours(List hours) { - this.hours = hours; - return this; - } - - /** - * Get the minutes value. - * - * @return the minutes value - */ - public List minutes() { - return this.minutes; - } - - /** - * Set the minutes value. - * - * @param minutes the minutes value to set - * @return the JobRecurrenceSchedule object itself. - */ - public JobRecurrenceSchedule withMinutes(List minutes) { - this.minutes = minutes; - return this; - } - - /** - * Get the monthDays value. - * - * @return the monthDays value - */ - public List monthDays() { - return this.monthDays; - } - - /** - * Set the monthDays value. - * - * @param monthDays the monthDays value to set - * @return the JobRecurrenceSchedule object itself. - */ - public JobRecurrenceSchedule withMonthDays(List monthDays) { - this.monthDays = monthDays; - return this; - } - - /** - * Get the monthlyOccurrences value. - * - * @return the monthlyOccurrences value - */ - public List monthlyOccurrences() { - return this.monthlyOccurrences; - } - - /** - * Set the monthlyOccurrences value. - * - * @param monthlyOccurrences the monthlyOccurrences value to set - * @return the JobRecurrenceSchedule object itself. - */ - public JobRecurrenceSchedule withMonthlyOccurrences(List monthlyOccurrences) { - this.monthlyOccurrences = monthlyOccurrences; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrenceScheduleMonthlyOccurrence.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrenceScheduleMonthlyOccurrence.java deleted file mode 100644 index 91fa69035a5..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobRecurrenceScheduleMonthlyOccurrence.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobRecurrenceScheduleMonthlyOccurrence model. - */ -public class JobRecurrenceScheduleMonthlyOccurrence { - /** - * Gets or sets the day. Must be one of monday, tuesday, wednesday, - * thursday, friday, saturday, sunday. Possible values include: 'Monday', - * 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'. - */ - @JsonProperty(value = "day") - private JobScheduleDay day; - - /** - * Gets or sets the occurrence. Must be between -5 and 5. - */ - @JsonProperty(value = "Occurrence") - private Integer occurrence; - - /** - * Get the day value. - * - * @return the day value - */ - public JobScheduleDay day() { - return this.day; - } - - /** - * Set the day value. - * - * @param day the day value to set - * @return the JobRecurrenceScheduleMonthlyOccurrence object itself. - */ - public JobRecurrenceScheduleMonthlyOccurrence withDay(JobScheduleDay day) { - this.day = day; - return this; - } - - /** - * Get the occurrence value. - * - * @return the occurrence value - */ - public Integer occurrence() { - return this.occurrence; - } - - /** - * Set the occurrence value. - * - * @param occurrence the occurrence value to set - * @return the JobRecurrenceScheduleMonthlyOccurrence object itself. - */ - public JobRecurrenceScheduleMonthlyOccurrence withOccurrence(Integer occurrence) { - this.occurrence = occurrence; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobScheduleDay.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobScheduleDay.java deleted file mode 100644 index b22e9df031f..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobScheduleDay.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JobScheduleDay. - */ -public enum JobScheduleDay { - /** Enum value Monday. */ - MONDAY("Monday"), - - /** Enum value Tuesday. */ - TUESDAY("Tuesday"), - - /** Enum value Wednesday. */ - WEDNESDAY("Wednesday"), - - /** Enum value Thursday. */ - THURSDAY("Thursday"), - - /** Enum value Friday. */ - FRIDAY("Friday"), - - /** Enum value Saturday. */ - SATURDAY("Saturday"), - - /** Enum value Sunday. */ - SUNDAY("Sunday"); - - /** The actual serialized value for a JobScheduleDay instance. */ - private String value; - - JobScheduleDay(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a JobScheduleDay instance. - * - * @param value the serialized value to parse. - * @return the parsed JobScheduleDay object, or null if unable to parse. - */ - @JsonCreator - public static JobScheduleDay fromString(String value) { - JobScheduleDay[] items = JobScheduleDay.values(); - for (JobScheduleDay item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobState.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobState.java deleted file mode 100644 index df5b03000e6..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobState.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JobState. - */ -public enum JobState { - /** Enum value Enabled. */ - ENABLED("Enabled"), - - /** Enum value Disabled. */ - DISABLED("Disabled"), - - /** Enum value Faulted. */ - FAULTED("Faulted"), - - /** Enum value Completed. */ - COMPLETED("Completed"); - - /** The actual serialized value for a JobState instance. */ - private String value; - - JobState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a JobState instance. - * - * @param value the serialized value to parse. - * @return the parsed JobState object, or null if unable to parse. - */ - @JsonCreator - public static JobState fromString(String value) { - JobState[] items = JobState.values(); - for (JobState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobStateFilter.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobStateFilter.java deleted file mode 100644 index a95d50de834..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobStateFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobStateFilter model. - */ -public class JobStateFilter { - /** - * Gets or sets the job state. Possible values include: 'Enabled', - * 'Disabled', 'Faulted', 'Completed'. - */ - @JsonProperty(value = "state") - private JobState state; - - /** - * Get the state value. - * - * @return the state value - */ - public JobState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the JobStateFilter object itself. - */ - public JobStateFilter withState(JobState state) { - this.state = state; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobStatus.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobStatus.java deleted file mode 100644 index b4437881cf1..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/JobStatus.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobStatus model. - */ -public class JobStatus { - /** - * Gets the number of times this job has executed. - */ - @JsonProperty(value = "executionCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer executionCount; - - /** - * Gets the number of times this job has failed. - */ - @JsonProperty(value = "failureCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer failureCount; - - /** - * Gets the number of faulted occurrences (occurrences that were retried - * and failed as many times as the retry policy states). - */ - @JsonProperty(value = "faultedCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer faultedCount; - - /** - * Gets the time the last occurrence executed in ISO-8601 format. Could be - * empty if job has not run yet. - */ - @JsonProperty(value = "lastExecutionTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastExecutionTime; - - /** - * Gets the time of the next occurrence in ISO-8601 format. Could be empty - * if the job is completed. - */ - @JsonProperty(value = "nextExecutionTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime nextExecutionTime; - - /** - * Get the executionCount value. - * - * @return the executionCount value - */ - public Integer executionCount() { - return this.executionCount; - } - - /** - * Get the failureCount value. - * - * @return the failureCount value - */ - public Integer failureCount() { - return this.failureCount; - } - - /** - * Get the faultedCount value. - * - * @return the faultedCount value - */ - public Integer faultedCount() { - return this.faultedCount; - } - - /** - * Get the lastExecutionTime value. - * - * @return the lastExecutionTime value - */ - public DateTime lastExecutionTime() { - return this.lastExecutionTime; - } - - /** - * Get the nextExecutionTime value. - * - * @return the nextExecutionTime value - */ - public DateTime nextExecutionTime() { - return this.nextExecutionTime; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/OAuthAuthentication.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/OAuthAuthentication.java deleted file mode 100644 index d5ccae20491..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/OAuthAuthentication.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The OAuthAuthentication model. - */ -public class OAuthAuthentication extends HttpAuthentication { - /** - * Gets or sets the secret, return value will always be empty. - */ - @JsonProperty(value = "secret") - private String secret; - - /** - * Gets or sets the tenant. - */ - @JsonProperty(value = "tenant") - private String tenant; - - /** - * Gets or sets the audience. - */ - @JsonProperty(value = "audience") - private String audience; - - /** - * Gets or sets the client identifier. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /** - * Get the secret value. - * - * @return the secret value - */ - public String secret() { - return this.secret; - } - - /** - * Set the secret value. - * - * @param secret the secret value to set - * @return the OAuthAuthentication object itself. - */ - public OAuthAuthentication withSecret(String secret) { - this.secret = secret; - return this; - } - - /** - * Get the tenant value. - * - * @return the tenant value - */ - public String tenant() { - return this.tenant; - } - - /** - * Set the tenant value. - * - * @param tenant the tenant value to set - * @return the OAuthAuthentication object itself. - */ - public OAuthAuthentication withTenant(String tenant) { - this.tenant = tenant; - return this; - } - - /** - * Get the audience value. - * - * @return the audience value - */ - public String audience() { - return this.audience; - } - - /** - * Set the audience value. - * - * @param audience the audience value to set - * @return the OAuthAuthentication object itself. - */ - public OAuthAuthentication withAudience(String audience) { - this.audience = audience; - return this; - } - - /** - * Get the clientId value. - * - * @return the clientId value - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId value. - * - * @param clientId the clientId value to set - * @return the OAuthAuthentication object itself. - */ - public OAuthAuthentication withClientId(String clientId) { - this.clientId = clientId; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RecurrenceFrequency.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RecurrenceFrequency.java deleted file mode 100644 index c1bbc6ef6be..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RecurrenceFrequency.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for RecurrenceFrequency. - */ -public enum RecurrenceFrequency { - /** Enum value Minute. */ - MINUTE("Minute"), - - /** Enum value Hour. */ - HOUR("Hour"), - - /** Enum value Day. */ - DAY("Day"), - - /** Enum value Week. */ - WEEK("Week"), - - /** Enum value Month. */ - MONTH("Month"); - - /** The actual serialized value for a RecurrenceFrequency instance. */ - private String value; - - RecurrenceFrequency(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a RecurrenceFrequency instance. - * - * @param value the serialized value to parse. - * @return the parsed RecurrenceFrequency object, or null if unable to parse. - */ - @JsonCreator - public static RecurrenceFrequency fromString(String value) { - RecurrenceFrequency[] items = RecurrenceFrequency.values(); - for (RecurrenceFrequency item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RetryPolicy.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RetryPolicy.java deleted file mode 100644 index 3826820ae84..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RetryPolicy.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The RetryPolicy model. - */ -public class RetryPolicy { - /** - * Gets or sets the retry strategy to be used. Possible values include: - * 'None', 'Fixed'. - */ - @JsonProperty(value = "retryType") - private RetryType retryType; - - /** - * Gets or sets the retry interval between retries, specify duration in ISO - * 8601 format. - */ - @JsonProperty(value = "retryInterval") - private Period retryInterval; - - /** - * Gets or sets the number of times a retry should be attempted. - */ - @JsonProperty(value = "retryCount") - private Integer retryCount; - - /** - * Get the retryType value. - * - * @return the retryType value - */ - public RetryType retryType() { - return this.retryType; - } - - /** - * Set the retryType value. - * - * @param retryType the retryType value to set - * @return the RetryPolicy object itself. - */ - public RetryPolicy withRetryType(RetryType retryType) { - this.retryType = retryType; - return this; - } - - /** - * Get the retryInterval value. - * - * @return the retryInterval value - */ - public Period retryInterval() { - return this.retryInterval; - } - - /** - * Set the retryInterval value. - * - * @param retryInterval the retryInterval value to set - * @return the RetryPolicy object itself. - */ - public RetryPolicy withRetryInterval(Period retryInterval) { - this.retryInterval = retryInterval; - return this; - } - - /** - * Get the retryCount value. - * - * @return the retryCount value - */ - public Integer retryCount() { - return this.retryCount; - } - - /** - * Set the retryCount value. - * - * @param retryCount the retryCount value to set - * @return the RetryPolicy object itself. - */ - public RetryPolicy withRetryCount(Integer retryCount) { - this.retryCount = retryCount; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RetryType.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RetryType.java deleted file mode 100644 index ee45f9cde1b..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/RetryType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for RetryType. - */ -public enum RetryType { - /** Enum value None. */ - NONE("None"), - - /** Enum value Fixed. */ - FIXED("Fixed"); - - /** The actual serialized value for a RetryType instance. */ - private String value; - - RetryType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a RetryType instance. - * - * @param value the serialized value to parse. - * @return the parsed RetryType object, or null if unable to parse. - */ - @JsonCreator - public static RetryType fromString(String value) { - RetryType[] items = RetryType.values(); - for (RetryType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusAuthentication.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusAuthentication.java deleted file mode 100644 index f5c20bbfe03..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusAuthentication.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The ServiceBusAuthentication model. - */ -public class ServiceBusAuthentication { - /** - * Gets or sets the SAS key. - */ - @JsonProperty(value = "sasKey") - private String sasKey; - - /** - * Gets or sets the SAS key name. - */ - @JsonProperty(value = "sasKeyName") - private String sasKeyName; - - /** - * Gets or sets the authentication type. Possible values include: - * 'NotSpecified', 'SharedAccessKey'. - */ - @JsonProperty(value = "type") - private ServiceBusAuthenticationType type; - - /** - * Get the sasKey value. - * - * @return the sasKey value - */ - public String sasKey() { - return this.sasKey; - } - - /** - * Set the sasKey value. - * - * @param sasKey the sasKey value to set - * @return the ServiceBusAuthentication object itself. - */ - public ServiceBusAuthentication withSasKey(String sasKey) { - this.sasKey = sasKey; - return this; - } - - /** - * Get the sasKeyName value. - * - * @return the sasKeyName value - */ - public String sasKeyName() { - return this.sasKeyName; - } - - /** - * Set the sasKeyName value. - * - * @param sasKeyName the sasKeyName value to set - * @return the ServiceBusAuthentication object itself. - */ - public ServiceBusAuthentication withSasKeyName(String sasKeyName) { - this.sasKeyName = sasKeyName; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public ServiceBusAuthenticationType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ServiceBusAuthentication object itself. - */ - public ServiceBusAuthentication withType(ServiceBusAuthenticationType type) { - this.type = type; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusAuthenticationType.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusAuthenticationType.java deleted file mode 100644 index 983026f26a1..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusAuthenticationType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ServiceBusAuthenticationType. - */ -public enum ServiceBusAuthenticationType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value SharedAccessKey. */ - SHARED_ACCESS_KEY("SharedAccessKey"); - - /** The actual serialized value for a ServiceBusAuthenticationType instance. */ - private String value; - - ServiceBusAuthenticationType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ServiceBusAuthenticationType instance. - * - * @param value the serialized value to parse. - * @return the parsed ServiceBusAuthenticationType object, or null if unable to parse. - */ - @JsonCreator - public static ServiceBusAuthenticationType fromString(String value) { - ServiceBusAuthenticationType[] items = ServiceBusAuthenticationType.values(); - for (ServiceBusAuthenticationType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusBrokeredMessageProperties.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusBrokeredMessageProperties.java deleted file mode 100644 index 42a8ed401b3..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusBrokeredMessageProperties.java +++ /dev/null @@ -1,357 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import org.joda.time.DateTime; -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The ServiceBusBrokeredMessageProperties model. - */ -public class ServiceBusBrokeredMessageProperties { - /** - * Gets or sets the content type. - */ - @JsonProperty(value = "contentType") - private String contentType; - - /** - * Gets or sets the correlation ID. - */ - @JsonProperty(value = "correlationId") - private String correlationId; - - /** - * Gets or sets the force persistence. - */ - @JsonProperty(value = "forcePersistence") - private Boolean forcePersistence; - - /** - * Gets or sets the label. - */ - @JsonProperty(value = "label") - private String label; - - /** - * Gets or sets the message ID. - */ - @JsonProperty(value = "messageId") - private String messageId; - - /** - * Gets or sets the partition key. - */ - @JsonProperty(value = "partitionKey") - private String partitionKey; - - /** - * Gets or sets the reply to. - */ - @JsonProperty(value = "replyTo") - private String replyTo; - - /** - * Gets or sets the reply to session ID. - */ - @JsonProperty(value = "replyToSessionId") - private String replyToSessionId; - - /** - * Gets or sets the scheduled enqueue time UTC. - */ - @JsonProperty(value = "scheduledEnqueueTimeUtc") - private DateTime scheduledEnqueueTimeUtc; - - /** - * Gets or sets the session ID. - */ - @JsonProperty(value = "sessionId") - private String sessionId; - - /** - * Gets or sets the time to live. - */ - @JsonProperty(value = "timeToLive") - private Period timeToLive; - - /** - * Gets or sets the to. - */ - @JsonProperty(value = "to") - private String to; - - /** - * Gets or sets the via partition key. - */ - @JsonProperty(value = "viaPartitionKey") - private String viaPartitionKey; - - /** - * Get the contentType value. - * - * @return the contentType value - */ - public String contentType() { - return this.contentType; - } - - /** - * Set the contentType value. - * - * @param contentType the contentType value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the correlationId value. - * - * @return the correlationId value - */ - public String correlationId() { - return this.correlationId; - } - - /** - * Set the correlationId value. - * - * @param correlationId the correlationId value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withCorrelationId(String correlationId) { - this.correlationId = correlationId; - return this; - } - - /** - * Get the forcePersistence value. - * - * @return the forcePersistence value - */ - public Boolean forcePersistence() { - return this.forcePersistence; - } - - /** - * Set the forcePersistence value. - * - * @param forcePersistence the forcePersistence value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withForcePersistence(Boolean forcePersistence) { - this.forcePersistence = forcePersistence; - return this; - } - - /** - * Get the label value. - * - * @return the label value - */ - public String label() { - return this.label; - } - - /** - * Set the label value. - * - * @param label the label value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withLabel(String label) { - this.label = label; - return this; - } - - /** - * Get the messageId value. - * - * @return the messageId value - */ - public String messageId() { - return this.messageId; - } - - /** - * Set the messageId value. - * - * @param messageId the messageId value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withMessageId(String messageId) { - this.messageId = messageId; - return this; - } - - /** - * Get the partitionKey value. - * - * @return the partitionKey value - */ - public String partitionKey() { - return this.partitionKey; - } - - /** - * Set the partitionKey value. - * - * @param partitionKey the partitionKey value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withPartitionKey(String partitionKey) { - this.partitionKey = partitionKey; - return this; - } - - /** - * Get the replyTo value. - * - * @return the replyTo value - */ - public String replyTo() { - return this.replyTo; - } - - /** - * Set the replyTo value. - * - * @param replyTo the replyTo value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withReplyTo(String replyTo) { - this.replyTo = replyTo; - return this; - } - - /** - * Get the replyToSessionId value. - * - * @return the replyToSessionId value - */ - public String replyToSessionId() { - return this.replyToSessionId; - } - - /** - * Set the replyToSessionId value. - * - * @param replyToSessionId the replyToSessionId value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withReplyToSessionId(String replyToSessionId) { - this.replyToSessionId = replyToSessionId; - return this; - } - - /** - * Get the scheduledEnqueueTimeUtc value. - * - * @return the scheduledEnqueueTimeUtc value - */ - public DateTime scheduledEnqueueTimeUtc() { - return this.scheduledEnqueueTimeUtc; - } - - /** - * Set the scheduledEnqueueTimeUtc value. - * - * @param scheduledEnqueueTimeUtc the scheduledEnqueueTimeUtc value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withScheduledEnqueueTimeUtc(DateTime scheduledEnqueueTimeUtc) { - this.scheduledEnqueueTimeUtc = scheduledEnqueueTimeUtc; - return this; - } - - /** - * Get the sessionId value. - * - * @return the sessionId value - */ - public String sessionId() { - return this.sessionId; - } - - /** - * Set the sessionId value. - * - * @param sessionId the sessionId value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * Get the timeToLive value. - * - * @return the timeToLive value - */ - public Period timeToLive() { - return this.timeToLive; - } - - /** - * Set the timeToLive value. - * - * @param timeToLive the timeToLive value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withTimeToLive(Period timeToLive) { - this.timeToLive = timeToLive; - return this; - } - - /** - * Get the to value. - * - * @return the to value - */ - public String to() { - return this.to; - } - - /** - * Set the to value. - * - * @param to the to value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withTo(String to) { - this.to = to; - return this; - } - - /** - * Get the viaPartitionKey value. - * - * @return the viaPartitionKey value - */ - public String viaPartitionKey() { - return this.viaPartitionKey; - } - - /** - * Set the viaPartitionKey value. - * - * @param viaPartitionKey the viaPartitionKey value to set - * @return the ServiceBusBrokeredMessageProperties object itself. - */ - public ServiceBusBrokeredMessageProperties withViaPartitionKey(String viaPartitionKey) { - this.viaPartitionKey = viaPartitionKey; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusMessage.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusMessage.java deleted file mode 100644 index aca970c1eab..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusMessage.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The ServiceBusMessage model. - */ -public class ServiceBusMessage { - /** - * Gets or sets the Service Bus authentication. - */ - @JsonProperty(value = "authentication") - private ServiceBusAuthentication authentication; - - /** - * Gets or sets the brokered message properties. - */ - @JsonProperty(value = "brokeredMessageProperties") - private ServiceBusBrokeredMessageProperties brokeredMessageProperties; - - /** - * Gets or sets the custom message properties. - */ - @JsonProperty(value = "customMessageProperties") - private Map customMessageProperties; - - /** - * Gets or sets the message. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Gets or sets the namespace. - */ - @JsonProperty(value = "namespace") - private String namespace; - - /** - * Gets or sets the transport type. Possible values include: - * 'NotSpecified', 'NetMessaging', 'AMQP'. - */ - @JsonProperty(value = "transportType") - private ServiceBusTransportType transportType; - - /** - * Get the authentication value. - * - * @return the authentication value - */ - public ServiceBusAuthentication authentication() { - return this.authentication; - } - - /** - * Set the authentication value. - * - * @param authentication the authentication value to set - * @return the ServiceBusMessage object itself. - */ - public ServiceBusMessage withAuthentication(ServiceBusAuthentication authentication) { - this.authentication = authentication; - return this; - } - - /** - * Get the brokeredMessageProperties value. - * - * @return the brokeredMessageProperties value - */ - public ServiceBusBrokeredMessageProperties brokeredMessageProperties() { - return this.brokeredMessageProperties; - } - - /** - * Set the brokeredMessageProperties value. - * - * @param brokeredMessageProperties the brokeredMessageProperties value to set - * @return the ServiceBusMessage object itself. - */ - public ServiceBusMessage withBrokeredMessageProperties(ServiceBusBrokeredMessageProperties brokeredMessageProperties) { - this.brokeredMessageProperties = brokeredMessageProperties; - return this; - } - - /** - * Get the customMessageProperties value. - * - * @return the customMessageProperties value - */ - public Map customMessageProperties() { - return this.customMessageProperties; - } - - /** - * Set the customMessageProperties value. - * - * @param customMessageProperties the customMessageProperties value to set - * @return the ServiceBusMessage object itself. - */ - public ServiceBusMessage withCustomMessageProperties(Map customMessageProperties) { - this.customMessageProperties = customMessageProperties; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ServiceBusMessage object itself. - */ - public ServiceBusMessage withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the namespace value. - * - * @return the namespace value - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace value. - * - * @param namespace the namespace value to set - * @return the ServiceBusMessage object itself. - */ - public ServiceBusMessage withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the transportType value. - * - * @return the transportType value - */ - public ServiceBusTransportType transportType() { - return this.transportType; - } - - /** - * Set the transportType value. - * - * @param transportType the transportType value to set - * @return the ServiceBusMessage object itself. - */ - public ServiceBusMessage withTransportType(ServiceBusTransportType transportType) { - this.transportType = transportType; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusQueueMessage.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusQueueMessage.java deleted file mode 100644 index a71477759e8..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusQueueMessage.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The ServiceBusQueueMessage model. - */ -public class ServiceBusQueueMessage extends ServiceBusMessage { - /** - * Gets or sets the queue name. - */ - @JsonProperty(value = "queueName") - private String queueName; - - /** - * Get the queueName value. - * - * @return the queueName value - */ - public String queueName() { - return this.queueName; - } - - /** - * Set the queueName value. - * - * @param queueName the queueName value to set - * @return the ServiceBusQueueMessage object itself. - */ - public ServiceBusQueueMessage withQueueName(String queueName) { - this.queueName = queueName; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusTopicMessage.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusTopicMessage.java deleted file mode 100644 index feab435530e..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusTopicMessage.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The ServiceBusTopicMessage model. - */ -public class ServiceBusTopicMessage extends ServiceBusMessage { - /** - * Gets or sets the topic path. - */ - @JsonProperty(value = "topicPath") - private String topicPath; - - /** - * Get the topicPath value. - * - * @return the topicPath value - */ - public String topicPath() { - return this.topicPath; - } - - /** - * Set the topicPath value. - * - * @param topicPath the topicPath value to set - * @return the ServiceBusTopicMessage object itself. - */ - public ServiceBusTopicMessage withTopicPath(String topicPath) { - this.topicPath = topicPath; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusTransportType.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusTransportType.java deleted file mode 100644 index d0c3be5ad78..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/ServiceBusTransportType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ServiceBusTransportType. - */ -public enum ServiceBusTransportType { - /** Enum value NotSpecified. */ - NOT_SPECIFIED("NotSpecified"), - - /** Enum value NetMessaging. */ - NET_MESSAGING("NetMessaging"), - - /** Enum value AMQP. */ - AMQP("AMQP"); - - /** The actual serialized value for a ServiceBusTransportType instance. */ - private String value; - - ServiceBusTransportType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ServiceBusTransportType instance. - * - * @param value the serialized value to parse. - * @return the parsed ServiceBusTransportType object, or null if unable to parse. - */ - @JsonCreator - public static ServiceBusTransportType fromString(String value) { - ServiceBusTransportType[] items = ServiceBusTransportType.values(); - for (ServiceBusTransportType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/Sku.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/Sku.java deleted file mode 100644 index 1954ee3505e..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/Sku.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The Sku model. - */ -public class Sku { - /** - * Gets or set the SKU. Possible values include: 'Standard', 'Free', - * 'P10Premium', 'P20Premium'. - */ - @JsonProperty(value = "name") - private SkuDefinition name; - - /** - * Get the name value. - * - * @return the name value - */ - public SkuDefinition name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Sku object itself. - */ - public Sku withName(SkuDefinition name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/SkuDefinition.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/SkuDefinition.java deleted file mode 100644 index 65f0254b87c..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/SkuDefinition.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SkuDefinition. - */ -public enum SkuDefinition { - /** Enum value Standard. */ - STANDARD("Standard"), - - /** Enum value Free. */ - FREE("Free"), - - /** Enum value P10Premium. */ - P10PREMIUM("P10Premium"), - - /** Enum value P20Premium. */ - P20PREMIUM("P20Premium"); - - /** The actual serialized value for a SkuDefinition instance. */ - private String value; - - SkuDefinition(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuDefinition instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuDefinition object, or null if unable to parse. - */ - @JsonCreator - public static SkuDefinition fromString(String value) { - SkuDefinition[] items = SkuDefinition.values(); - for (SkuDefinition item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/StorageQueueMessage.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/StorageQueueMessage.java deleted file mode 100644 index 24681a386d7..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/StorageQueueMessage.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The StorageQueueMessage model. - */ -public class StorageQueueMessage { - /** - * Gets or sets the storage account name. - */ - @JsonProperty(value = "storageAccount") - private String storageAccount; - - /** - * Gets or sets the queue name. - */ - @JsonProperty(value = "queueName") - private String queueName; - - /** - * Gets or sets the SAS key. - */ - @JsonProperty(value = "sasToken") - private String sasToken; - - /** - * Gets or sets the message. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the storageAccount value. - * - * @return the storageAccount value - */ - public String storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount value. - * - * @param storageAccount the storageAccount value to set - * @return the StorageQueueMessage object itself. - */ - public StorageQueueMessage withStorageAccount(String storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Get the queueName value. - * - * @return the queueName value - */ - public String queueName() { - return this.queueName; - } - - /** - * Set the queueName value. - * - * @param queueName the queueName value to set - * @return the StorageQueueMessage object itself. - */ - public StorageQueueMessage withQueueName(String queueName) { - this.queueName = queueName; - return this; - } - - /** - * Get the sasToken value. - * - * @return the sasToken value - */ - public String sasToken() { - return this.sasToken; - } - - /** - * Set the sasToken value. - * - * @param sasToken the sasToken value to set - * @return the StorageQueueMessage object itself. - */ - public StorageQueueMessage withSasToken(String sasToken) { - this.sasToken = sasToken; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the StorageQueueMessage object itself. - */ - public StorageQueueMessage withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobCollectionDefinitionInner.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobCollectionDefinitionInner.java deleted file mode 100644 index 07a9363ca25..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobCollectionDefinitionInner.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler.implementation; - -import com.microsoft.azure.Resource; -import com.microsoft.azure.management.scheduler.JobCollectionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * The JobCollectionDefinitionInner model. - */ -@JsonFlatten -public class JobCollectionDefinitionInner extends Resource { -// /** -// * Gets the job collection resource identifier. -// */ -// @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) -// private String id; -// -// /** -// * Gets the job collection resource type. -// */ -// @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) -// private String type; -// -// /** -// * Gets or sets the job collection resource name. -// */ -// @JsonProperty(value = "name") -// private String name; -// -// /** -// * Gets or sets the storage account location. -// */ -// @JsonProperty(value = "location") -// private String location; -// -// /** -// * Gets or sets the tags. -// */ -// @JsonProperty(value = "tags") -// private Map tags; - - /** - * Gets or sets the job collection properties. - */ - @JsonProperty(value = "properties") - private JobCollectionProperties properties; - -// /** -// * Get the id value. -// * -// * @return the id value -// */ -// public String id() { -// return this.id; -// } -// -// /** -// * Get the type value. -// * -// * @return the type value -// */ -// public String type() { -// return this.type; -// } -// -// /** -// * Get the name value. -// * -// * @return the name value -// */ -// public String name() { -// return this.name; -// } -// -// /** -// * Set the name value. -// * -// * @param name the name value to set -// * @return the JobCollectionDefinitionInner object itself. -// */ -// public JobCollectionDefinitionInner withName(String name) { -// this.name = name; -// return this; -// } -// -// /** -// * Get the location value. -// * -// * @return the location value -// */ -// public String location() { -// return this.location; -// } -// -// /** -// * Set the location value. -// * -// * @param location the location value to set -// * @return the JobCollectionDefinitionInner object itself. -// */ -// public JobCollectionDefinitionInner withLocation(String location) { -// this.location = location; -// return this; -// } -// -// /** -// * Get the tags value. -// * -// * @return the tags value -// */ -// public Map tags() { -// return this.tags; -// } -// -// /** -// * Set the tags value. -// * -// * @param tags the tags value to set -// * @return the JobCollectionDefinitionInner object itself. -// */ -// public JobCollectionDefinitionInner withTags(Map tags) { -// this.tags = tags; -// return this; -// } - - /** - * Get the properties value. - * - * @return the properties value - */ - public JobCollectionProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the JobCollectionDefinitionInner object itself. - */ - public JobCollectionDefinitionInner withProperties(JobCollectionProperties properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobCollectionsInner.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobCollectionsInner.java deleted file mode 100644 index f2c8bcbf8fd..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobCollectionsInner.java +++ /dev/null @@ -1,1303 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in JobCollections. - */ -public class JobCollectionsInner implements InnerSupportsGet, InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private JobCollectionsService service; - /** The service client containing this operation class. */ - private SchedulerManagementClientImpl client; - - /** - * Initializes an instance of JobCollectionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public JobCollectionsInner(Retrofit retrofit, SchedulerManagementClientImpl client) { - this.service = retrofit.create(JobCollectionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for JobCollections to be - * used by Retrofit to perform actually REST calls. - */ - interface JobCollectionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections listBySubscription" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Scheduler/jobCollections") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Body JobCollectionDefinitionInner jobCollection, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections patch" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}") - Observable> patch(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Body JobCollectionDefinitionInner jobCollection, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections enable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/enable") - Observable> enable(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections beginEnable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/enable") - Observable> beginEnable(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections disable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/disable") - Observable> disable(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections beginDisable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/disable") - Observable> beginDisable(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections listBySubscriptionNext" }) - @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets all job collections under specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobCollectionDefinitionInner> object if successful. - */ - public PagedList listBySubscription() { - ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all job collections under specified subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all job collections under specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobCollectionDefinitionInner> object - */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all job collections under specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobCollectionDefinitionInner> object - */ - public Observable>> listBySubscriptionWithServiceResponseAsync() { - return listBySubscriptionSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all job collections under specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobCollectionDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all job collections under specified resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobCollectionDefinitionInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all job collections under specified resource group. - * - * @param resourceGroupName The resource group name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all job collections under specified resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobCollectionDefinitionInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all job collections under specified resource group. - * - * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobCollectionDefinitionInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all job collections under specified resource group. - * - ServiceResponse> * @param resourceGroupName The resource group name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobCollectionDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobCollectionDefinitionInner object if successful. - */ - public JobCollectionDefinitionInner getByResourceGroup(String resourceGroupName, String jobCollectionName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobCollectionName).toBlocking().single().body(); - } - - /** - * Gets a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String jobCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobCollectionName), serviceCallback); - } - - /** - * Gets a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobCollectionDefinitionInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String jobCollectionName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobCollectionName).map(new Func1, JobCollectionDefinitionInner>() { - @Override - public JobCollectionDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobCollectionDefinitionInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String jobCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Provisions a new job collection or updates an existing job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobCollection The job collection definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobCollectionDefinitionInner object if successful. - */ - public JobCollectionDefinitionInner createOrUpdate(String resourceGroupName, String jobCollectionName, JobCollectionDefinitionInner jobCollection) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobCollection).toBlocking().single().body(); - } - - /** - * Provisions a new job collection or updates an existing job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobCollection The job collection definition. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String jobCollectionName, JobCollectionDefinitionInner jobCollection, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobCollection), serviceCallback); - } - - /** - * Provisions a new job collection or updates an existing job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobCollection The job collection definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobCollectionDefinitionInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String jobCollectionName, JobCollectionDefinitionInner jobCollection) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobCollection).map(new Func1, JobCollectionDefinitionInner>() { - @Override - public JobCollectionDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Provisions a new job collection or updates an existing job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobCollection The job collection definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobCollectionDefinitionInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, JobCollectionDefinitionInner jobCollection) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (jobCollection == null) { - throw new IllegalArgumentException("Parameter jobCollection is required and cannot be null."); - } - Validator.validate(jobCollection); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), jobCollection, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Patches an existing job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobCollection The job collection definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobCollectionDefinitionInner object if successful. - */ - public JobCollectionDefinitionInner patch(String resourceGroupName, String jobCollectionName, JobCollectionDefinitionInner jobCollection) { - return patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobCollection).toBlocking().single().body(); - } - - /** - * Patches an existing job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobCollection The job collection definition. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture patchAsync(String resourceGroupName, String jobCollectionName, JobCollectionDefinitionInner jobCollection, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobCollection), serviceCallback); - } - - /** - * Patches an existing job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobCollection The job collection definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobCollectionDefinitionInner object - */ - public Observable patchAsync(String resourceGroupName, String jobCollectionName, JobCollectionDefinitionInner jobCollection) { - return patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobCollection).map(new Func1, JobCollectionDefinitionInner>() { - @Override - public JobCollectionDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Patches an existing job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobCollection The job collection definition. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobCollectionDefinitionInner object - */ - public Observable> patchWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, JobCollectionDefinitionInner jobCollection) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (jobCollection == null) { - throw new IllegalArgumentException("Parameter jobCollection is required and cannot be null."); - } - Validator.validate(jobCollection); - return service.patch(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), jobCollection, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = patchDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse patchDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String jobCollectionName) { - deleteWithServiceResponseAsync(resourceGroupName, jobCollectionName).toBlocking().last().body(); - } - - /** - * Deletes a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String jobCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, jobCollectionName), serviceCallback); - } - - /** - * Deletes a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String jobCollectionName) { - return deleteWithServiceResponseAsync(resourceGroupName, jobCollectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String jobCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String jobCollectionName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, jobCollectionName).toBlocking().single().body(); - } - - /** - * Deletes a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String jobCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, jobCollectionName), serviceCallback); - } - - /** - * Deletes a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String jobCollectionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, jobCollectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String jobCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Enables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void enable(String resourceGroupName, String jobCollectionName) { - enableWithServiceResponseAsync(resourceGroupName, jobCollectionName).toBlocking().last().body(); - } - - /** - * Enables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture enableAsync(String resourceGroupName, String jobCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(enableWithServiceResponseAsync(resourceGroupName, jobCollectionName), serviceCallback); - } - - /** - * Enables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable enableAsync(String resourceGroupName, String jobCollectionName) { - return enableWithServiceResponseAsync(resourceGroupName, jobCollectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Enables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> enableWithServiceResponseAsync(String resourceGroupName, String jobCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.enable(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Enables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginEnable(String resourceGroupName, String jobCollectionName) { - beginEnableWithServiceResponseAsync(resourceGroupName, jobCollectionName).toBlocking().single().body(); - } - - /** - * Enables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginEnableAsync(String resourceGroupName, String jobCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginEnableWithServiceResponseAsync(resourceGroupName, jobCollectionName), serviceCallback); - } - - /** - * Enables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginEnableAsync(String resourceGroupName, String jobCollectionName) { - return beginEnableWithServiceResponseAsync(resourceGroupName, jobCollectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Enables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginEnableWithServiceResponseAsync(String resourceGroupName, String jobCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginEnable(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginEnableDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginEnableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Disables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void disable(String resourceGroupName, String jobCollectionName) { - disableWithServiceResponseAsync(resourceGroupName, jobCollectionName).toBlocking().last().body(); - } - - /** - * Disables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture disableAsync(String resourceGroupName, String jobCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(disableWithServiceResponseAsync(resourceGroupName, jobCollectionName), serviceCallback); - } - - /** - * Disables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable disableAsync(String resourceGroupName, String jobCollectionName) { - return disableWithServiceResponseAsync(resourceGroupName, jobCollectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Disables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> disableWithServiceResponseAsync(String resourceGroupName, String jobCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.disable(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Disables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDisable(String resourceGroupName, String jobCollectionName) { - beginDisableWithServiceResponseAsync(resourceGroupName, jobCollectionName).toBlocking().single().body(); - } - - /** - * Disables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDisableAsync(String resourceGroupName, String jobCollectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDisableWithServiceResponseAsync(resourceGroupName, jobCollectionName), serviceCallback); - } - - /** - * Disables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDisableAsync(String resourceGroupName, String jobCollectionName) { - return beginDisableWithServiceResponseAsync(resourceGroupName, jobCollectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Disables all of the jobs in the job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDisableWithServiceResponseAsync(String resourceGroupName, String jobCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDisable(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDisableDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDisableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all job collections under specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobCollectionDefinitionInner> object if successful. - */ - public PagedList listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all job collections under specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all job collections under specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobCollectionDefinitionInner> object - */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all job collections under specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobCollectionDefinitionInner> object - */ - public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all job collections under specified subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobCollectionDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all job collections under specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobCollectionDefinitionInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all job collections under specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all job collections under specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobCollectionDefinitionInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all job collections under specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobCollectionDefinitionInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all job collections under specified resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobCollectionDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobDefinitionInner.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobDefinitionInner.java deleted file mode 100644 index 2531e07c3fc..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobDefinitionInner.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobDefinitionInner model. - */ -public class JobDefinitionInner { - /** - * Gets the job resource identifier. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Gets the job resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Gets the job resource name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets or sets the job properties. - */ - @JsonProperty(value = "properties") - private JobPropertiesInner properties; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public JobPropertiesInner properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the JobDefinitionInner object itself. - */ - public JobDefinitionInner withProperties(JobPropertiesInner properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobHistoryDefinitionInner.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobHistoryDefinitionInner.java deleted file mode 100644 index c7e38ea7d92..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobHistoryDefinitionInner.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler.implementation; - -import com.microsoft.azure.management.scheduler.JobHistoryDefinitionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobHistoryDefinitionInner model. - */ -public class JobHistoryDefinitionInner { - /** - * Gets the job history identifier. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Gets the job history resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Gets the job history name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Gets or sets the job history properties. - */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) - private JobHistoryDefinitionProperties properties; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public JobHistoryDefinitionProperties properties() { - return this.properties; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobPropertiesInner.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobPropertiesInner.java deleted file mode 100644 index 8a5892b51d9..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobPropertiesInner.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler.implementation; - -import org.joda.time.DateTime; -import com.microsoft.azure.management.scheduler.JobAction; -import com.microsoft.azure.management.scheduler.JobRecurrence; -import com.microsoft.azure.management.scheduler.JobState; -import com.microsoft.azure.management.scheduler.JobStatus; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The JobPropertiesInner model. - */ -public class JobPropertiesInner { - /** - * Gets or sets the job start time. - */ - @JsonProperty(value = "startTime") - private DateTime startTime; - - /** - * Gets or sets the job action. - */ - @JsonProperty(value = "action") - private JobAction action; - - /** - * Gets or sets the job recurrence. - */ - @JsonProperty(value = "recurrence") - private JobRecurrence recurrence; - - /** - * Gets or set the job state. Possible values include: 'Enabled', - * 'Disabled', 'Faulted', 'Completed'. - */ - @JsonProperty(value = "state") - private JobState state; - - /** - * Gets the job status. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private JobStatus status; - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime value. - * - * @param startTime the startTime value to set - * @return the JobPropertiesInner object itself. - */ - public JobPropertiesInner withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the action value. - * - * @return the action value - */ - public JobAction action() { - return this.action; - } - - /** - * Set the action value. - * - * @param action the action value to set - * @return the JobPropertiesInner object itself. - */ - public JobPropertiesInner withAction(JobAction action) { - this.action = action; - return this; - } - - /** - * Get the recurrence value. - * - * @return the recurrence value - */ - public JobRecurrence recurrence() { - return this.recurrence; - } - - /** - * Set the recurrence value. - * - * @param recurrence the recurrence value to set - * @return the JobPropertiesInner object itself. - */ - public JobPropertiesInner withRecurrence(JobRecurrence recurrence) { - this.recurrence = recurrence; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public JobState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the JobPropertiesInner object itself. - */ - public JobPropertiesInner withState(JobState state) { - this.state = state; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public JobStatus status() { - return this.status; - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobsInner.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobsInner.java deleted file mode 100644 index 8c23668897d..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/JobsInner.java +++ /dev/null @@ -1,1512 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Jobs. - */ -public class JobsInner { - /** The Retrofit service to perform REST calls. */ - private JobsService service; - /** The service client containing this operation class. */ - private SchedulerManagementClientImpl client; - - /** - * Initializes an instance of JobsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public JobsInner(Retrofit retrofit, SchedulerManagementClientImpl client) { - this.service = retrofit.create(JobsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Jobs to be - * used by Retrofit to perform actually REST calls. - */ - interface JobsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body JobDefinitionInner job, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs patch" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}") - Observable> patch(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body JobDefinitionInner job, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs run" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run") - Observable> run(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs") - Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs listJobHistory" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/history") - Observable> listJobHistory(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.Jobs listJobHistoryNext" }) - @GET - Observable> listJobHistoryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobDefinitionInner object if successful. - */ - public JobDefinitionInner get(String resourceGroupName, String jobCollectionName, String jobName) { - return getWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).toBlocking().single().body(); - } - - /** - * Gets a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String jobCollectionName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName), serviceCallback); - } - - /** - * Gets a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable getAsync(String resourceGroupName, String jobCollectionName, String jobName) { - return getWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).map(new Func1, JobDefinitionInner>() { - @Override - public JobDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Provisions a new job or updates an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobDefinitionInner object if successful. - */ - public JobDefinitionInner createOrUpdate(String resourceGroupName, String jobCollectionName, String jobName) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).toBlocking().single().body(); - } - - /** - * Provisions a new job or updates an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String jobCollectionName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName), serviceCallback); - } - - /** - * Provisions a new job or updates an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String jobCollectionName, String jobName) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).map(new Func1, JobDefinitionInner>() { - @Override - public JobDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Provisions a new job or updates an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final JobPropertiesInner properties = null; - JobDefinitionInner job = new JobDefinitionInner(); - job.withProperties(null); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), job, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Provisions a new job or updates an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param properties Gets or sets the job properties. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobDefinitionInner object if successful. - */ - public JobDefinitionInner createOrUpdate(String resourceGroupName, String jobCollectionName, String jobName, JobPropertiesInner properties) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName, properties).toBlocking().single().body(); - } - - /** - * Provisions a new job or updates an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param properties Gets or sets the job properties. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String jobCollectionName, String jobName, JobPropertiesInner properties, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName, properties), serviceCallback); - } - - /** - * Provisions a new job or updates an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param properties Gets or sets the job properties. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String jobCollectionName, String jobName, JobPropertiesInner properties) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName, properties).map(new Func1, JobDefinitionInner>() { - @Override - public JobDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Provisions a new job or updates an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param properties Gets or sets the job properties. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, String jobName, JobPropertiesInner properties) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(properties); - JobDefinitionInner job = new JobDefinitionInner(); - job.withProperties(properties); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), job, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Patches an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobDefinitionInner object if successful. - */ - public JobDefinitionInner patch(String resourceGroupName, String jobCollectionName, String jobName) { - return patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).toBlocking().single().body(); - } - - /** - * Patches an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture patchAsync(String resourceGroupName, String jobCollectionName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName), serviceCallback); - } - - /** - * Patches an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable patchAsync(String resourceGroupName, String jobCollectionName, String jobName) { - return patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).map(new Func1, JobDefinitionInner>() { - @Override - public JobDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Patches an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable> patchWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final JobPropertiesInner properties = null; - JobDefinitionInner job = new JobDefinitionInner(); - job.withProperties(null); - return service.patch(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), job, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = patchDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Patches an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param properties Gets or sets the job properties. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the JobDefinitionInner object if successful. - */ - public JobDefinitionInner patch(String resourceGroupName, String jobCollectionName, String jobName, JobPropertiesInner properties) { - return patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName, properties).toBlocking().single().body(); - } - - /** - * Patches an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param properties Gets or sets the job properties. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture patchAsync(String resourceGroupName, String jobCollectionName, String jobName, JobPropertiesInner properties, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName, properties), serviceCallback); - } - - /** - * Patches an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param properties Gets or sets the job properties. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable patchAsync(String resourceGroupName, String jobCollectionName, String jobName, JobPropertiesInner properties) { - return patchWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName, properties).map(new Func1, JobDefinitionInner>() { - @Override - public JobDefinitionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Patches an existing job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param properties Gets or sets the job properties. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobDefinitionInner object - */ - public Observable> patchWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, String jobName, JobPropertiesInner properties) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(properties); - JobDefinitionInner job = new JobDefinitionInner(); - job.withProperties(properties); - return service.patch(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), job, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = patchDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse patchDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String jobCollectionName, String jobName) { - deleteWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).toBlocking().single().body(); - } - - /** - * Deletes a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String jobCollectionName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName), serviceCallback); - } - - /** - * Deletes a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String jobCollectionName, String jobName) { - return deleteWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Runs a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void run(String resourceGroupName, String jobCollectionName, String jobName) { - runWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).toBlocking().single().body(); - } - - /** - * Runs a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture runAsync(String resourceGroupName, String jobCollectionName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(runWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName), serviceCallback); - } - - /** - * Runs a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable runAsync(String resourceGroupName, String jobCollectionName, String jobName) { - return runWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Runs a job. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> runWithServiceResponseAsync(String resourceGroupName, String jobCollectionName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.run(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = runDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse runDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobDefinitionInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String jobCollectionName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, jobCollectionName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String jobCollectionName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, jobCollectionName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobDefinitionInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String jobCollectionName) { - return listWithServiceResponseAsync(resourceGroupName, jobCollectionName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobDefinitionInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String jobCollectionName) { - return listSinglePageAsync(resourceGroupName, jobCollectionName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String jobCollectionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - final String filter = null; - return service.list(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), top, skip, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param top The number of jobs to request, in the of range of [1..100]. - * @param skip The (0-based) index of the job history list from which to begin requesting entries. - * @param filter The filter to apply on the job state. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobDefinitionInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String jobCollectionName, final Integer top, final Integer skip, final String filter) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, jobCollectionName, top, skip, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param top The number of jobs to request, in the of range of [1..100]. - * @param skip The (0-based) index of the job history list from which to begin requesting entries. - * @param filter The filter to apply on the job state. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String jobCollectionName, final Integer top, final Integer skip, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, jobCollectionName, top, skip, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param top The number of jobs to request, in the of range of [1..100]. - * @param skip The (0-based) index of the job history list from which to begin requesting entries. - * @param filter The filter to apply on the job state. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobDefinitionInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String jobCollectionName, final Integer top, final Integer skip, final String filter) { - return listWithServiceResponseAsync(resourceGroupName, jobCollectionName, top, skip, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param top The number of jobs to request, in the of range of [1..100]. - * @param skip The (0-based) index of the job history list from which to begin requesting entries. - * @param filter The filter to apply on the job state. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobDefinitionInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String jobCollectionName, final Integer top, final Integer skip, final String filter) { - return listSinglePageAsync(resourceGroupName, jobCollectionName, top, skip, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all jobs under the specified job collection. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param jobCollectionName The job collection name. - ServiceResponse> * @param top The number of jobs to request, in the of range of [1..100]. - ServiceResponse> * @param skip The (0-based) index of the job history list from which to begin requesting entries. - ServiceResponse> * @param filter The filter to apply on the job state. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String jobCollectionName, final Integer top, final Integer skip, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), resourceGroupName, jobCollectionName, this.client.apiVersion(), top, skip, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobHistoryDefinitionInner> object if successful. - */ - public PagedList listJobHistory(final String resourceGroupName, final String jobCollectionName, final String jobName) { - ServiceResponse> response = listJobHistorySinglePageAsync(resourceGroupName, jobCollectionName, jobName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listJobHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listJobHistoryAsync(final String resourceGroupName, final String jobCollectionName, final String jobName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listJobHistorySinglePageAsync(resourceGroupName, jobCollectionName, jobName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listJobHistoryNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobHistoryDefinitionInner> object - */ - public Observable> listJobHistoryAsync(final String resourceGroupName, final String jobCollectionName, final String jobName) { - return listJobHistoryWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobHistoryDefinitionInner> object - */ - public Observable>> listJobHistoryWithServiceResponseAsync(final String resourceGroupName, final String jobCollectionName, final String jobName) { - return listJobHistorySinglePageAsync(resourceGroupName, jobCollectionName, jobName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listJobHistoryNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobHistoryDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listJobHistorySinglePageAsync(final String resourceGroupName, final String jobCollectionName, final String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Integer top = null; - final Integer skip = null; - final String filter = null; - return service.listJobHistory(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), top, skip, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listJobHistoryDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param top the number of job history to request, in the of range of [1..100]. - * @param skip The (0-based) index of the job history list from which to begin requesting entries. - * @param filter The filter to apply on the job state. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobHistoryDefinitionInner> object if successful. - */ - public PagedList listJobHistory(final String resourceGroupName, final String jobCollectionName, final String jobName, final Integer top, final Integer skip, final String filter) { - ServiceResponse> response = listJobHistorySinglePageAsync(resourceGroupName, jobCollectionName, jobName, top, skip, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listJobHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param top the number of job history to request, in the of range of [1..100]. - * @param skip The (0-based) index of the job history list from which to begin requesting entries. - * @param filter The filter to apply on the job state. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listJobHistoryAsync(final String resourceGroupName, final String jobCollectionName, final String jobName, final Integer top, final Integer skip, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listJobHistorySinglePageAsync(resourceGroupName, jobCollectionName, jobName, top, skip, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listJobHistoryNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param top the number of job history to request, in the of range of [1..100]. - * @param skip The (0-based) index of the job history list from which to begin requesting entries. - * @param filter The filter to apply on the job state. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobHistoryDefinitionInner> object - */ - public Observable> listJobHistoryAsync(final String resourceGroupName, final String jobCollectionName, final String jobName, final Integer top, final Integer skip, final String filter) { - return listJobHistoryWithServiceResponseAsync(resourceGroupName, jobCollectionName, jobName, top, skip, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists job history. - * - * @param resourceGroupName The resource group name. - * @param jobCollectionName The job collection name. - * @param jobName The job name. - * @param top the number of job history to request, in the of range of [1..100]. - * @param skip The (0-based) index of the job history list from which to begin requesting entries. - * @param filter The filter to apply on the job state. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobHistoryDefinitionInner> object - */ - public Observable>> listJobHistoryWithServiceResponseAsync(final String resourceGroupName, final String jobCollectionName, final String jobName, final Integer top, final Integer skip, final String filter) { - return listJobHistorySinglePageAsync(resourceGroupName, jobCollectionName, jobName, top, skip, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listJobHistoryNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists job history. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param jobCollectionName The job collection name. - ServiceResponse> * @param jobName The job name. - ServiceResponse> * @param top the number of job history to request, in the of range of [1..100]. - ServiceResponse> * @param skip The (0-based) index of the job history list from which to begin requesting entries. - ServiceResponse> * @param filter The filter to apply on the job state. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobHistoryDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listJobHistorySinglePageAsync(final String resourceGroupName, final String jobCollectionName, final String jobName, final Integer top, final Integer skip, final String filter) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobCollectionName == null) { - throw new IllegalArgumentException("Parameter jobCollectionName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listJobHistory(this.client.subscriptionId(), resourceGroupName, jobCollectionName, jobName, this.client.apiVersion(), top, skip, filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listJobHistoryDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listJobHistoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobDefinitionInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all jobs under the specified job collection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobDefinitionInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all jobs under the specified job collection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobDefinitionInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all jobs under the specified job collection. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists job history. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<JobHistoryDefinitionInner> object if successful. - */ - public PagedList listJobHistoryNext(final String nextPageLink) { - ServiceResponse> response = listJobHistoryNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listJobHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists job history. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listJobHistoryNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listJobHistoryNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listJobHistoryNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists job history. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobHistoryDefinitionInner> object - */ - public Observable> listJobHistoryNextAsync(final String nextPageLink) { - return listJobHistoryNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists job history. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<JobHistoryDefinitionInner> object - */ - public Observable>> listJobHistoryNextWithServiceResponseAsync(final String nextPageLink) { - return listJobHistoryNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listJobHistoryNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists job history. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<JobHistoryDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listJobHistoryNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listJobHistoryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listJobHistoryNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listJobHistoryNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/PageImpl.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/PageImpl.java deleted file mode 100644 index 79a1cba4c47..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/ScheduleServiceManager.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/ScheduleServiceManager.java deleted file mode 100644 index 07843410554..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/ScheduleServiceManager.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ -package com.microsoft.azure.management.scheduler.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure Scheduler service management. - */ -@Beta(Beta.SinceVersion.V1_2_0) -public final class ScheduleServiceManager extends Manager { - - // Collections - - /** - * Get a Configurable instance that can be used to create ScheduleServiceManager with optional configuration. - * - * @return Configurable - */ - public static Configurable configure() { - return new ScheduleServiceManager.ConfigurableImpl(); - } - - /** - * Creates an instance of ScheduleServiceManager that exposes Scheduler resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription - * @return the ScheduleServiceManager - */ - public static ScheduleServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new ScheduleServiceManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .build(), subscriptionId); - } - - /** - * Creates an instance of ScheduleServiceManager that exposes Scheduler resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription - * @return the ScheduleServiceManager - */ - public static ScheduleServiceManager authenticate(RestClient restClient, String subscriptionId) { - return new ScheduleServiceManager(restClient, subscriptionId); - } - - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of ScheduleServiceManager that exposes Scheduler resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription - * @return the ScheduleServiceManager - */ - ScheduleServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - @Override - public ScheduleServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return ScheduleServiceManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - - private ScheduleServiceManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new SchedulerManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/SchedulerManagementClientImpl.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/SchedulerManagementClientImpl.java deleted file mode 100644 index 370d7b3c631..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/SchedulerManagementClientImpl.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.scheduler.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the SchedulerManagementClientImpl class. - */ -public class SchedulerManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** The subscription id. */ - private String subscriptionId; - - /** - * Gets The subscription id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets The subscription id. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public SchedulerManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** The API version. */ - private String apiVersion; - - /** - * Gets The API version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public SchedulerManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public SchedulerManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public SchedulerManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The JobCollectionsInner object to access its operations. - */ - private JobCollectionsInner jobCollections; - - /** - * Gets the JobCollectionsInner object to access its operations. - * @return the JobCollectionsInner object. - */ - public JobCollectionsInner jobCollections() { - return this.jobCollections; - } - - /** - * The JobsInner object to access its operations. - */ - private JobsInner jobs; - - /** - * Gets the JobsInner object to access its operations. - * @return the JobsInner object. - */ - public JobsInner jobs() { - return this.jobs; - } - - /** - * Initializes an instance of SchedulerManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public SchedulerManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of SchedulerManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public SchedulerManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of SchedulerManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public SchedulerManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2016-03-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.jobCollections = new JobCollectionsInner(restClient().retrofit(), this); - this.jobs = new JobsInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "SchedulerManagementClient", "2016-03-01"); - } -} diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/package-info.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/package-info.java deleted file mode 100644 index 1925dc32d66..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/implementation/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for SchedulerManagementClient. - */ -package com.microsoft.azure.management.scheduler.implementation; diff --git a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/package-info.java b/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/package-info.java deleted file mode 100644 index 1bd5b71131c..00000000000 --- a/azure-mgmt-scheduler/src/main/java/com/microsoft/azure/management/scheduler/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for SchedulerManagementClient. - */ -package com.microsoft.azure.management.scheduler; diff --git a/azure-mgmt-servicefabric/pom.xml b/azure-mgmt-servicefabric/pom.xml deleted file mode 100644 index 5c789da0b95..00000000000 --- a/azure-mgmt-servicefabric/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-servicefabric - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for ServiceFabric Management - This package contains Microsoft ServiceFabric Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/AvailableOperationDisplay.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/AvailableOperationDisplay.java deleted file mode 100644 index bd1065f833b..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/AvailableOperationDisplay.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Operation supported by ServiceFabric resource provider. - */ -public class AvailableOperationDisplay { - /** - * Provider name. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * Resource name. - */ - @JsonProperty(value = "resource") - private String resource; - - /** - * Operation name. - */ - @JsonProperty(value = "operation") - private String operation; - - /** - * Operation description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the AvailableOperationDisplay object itself. - */ - public AvailableOperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource value. - * - * @param resource the resource value to set - * @return the AvailableOperationDisplay object itself. - */ - public AvailableOperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the AvailableOperationDisplay object itself. - */ - public AvailableOperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the AvailableOperationDisplay object itself. - */ - public AvailableOperationDisplay withDescription(String description) { - this.description = description; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/AzureActiveDirectory.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/AzureActiveDirectory.java deleted file mode 100644 index 97b6653baff..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/AzureActiveDirectory.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The settings to enable AAD authentication on the cluster. - */ -public class AzureActiveDirectory { - /** - * Azure active directory tenant id. - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /** - * Azure active directory cluster application id. - */ - @JsonProperty(value = "clusterApplication") - private String clusterApplication; - - /** - * Azure active directory client application id. - */ - @JsonProperty(value = "clientApplication") - private String clientApplication; - - /** - * Get the tenantId value. - * - * @return the tenantId value - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId value. - * - * @param tenantId the tenantId value to set - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the clusterApplication value. - * - * @return the clusterApplication value - */ - public String clusterApplication() { - return this.clusterApplication; - } - - /** - * Set the clusterApplication value. - * - * @param clusterApplication the clusterApplication value to set - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withClusterApplication(String clusterApplication) { - this.clusterApplication = clusterApplication; - return this; - } - - /** - * Get the clientApplication value. - * - * @return the clientApplication value - */ - public String clientApplication() { - return this.clientApplication; - } - - /** - * Set the clientApplication value. - * - * @param clientApplication the clientApplication value to set - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withClientApplication(String clientApplication) { - this.clientApplication = clientApplication; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/CertificateDescription.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/CertificateDescription.java deleted file mode 100644 index fadcdb3e7c5..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/CertificateDescription.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Certificate details. - */ -public class CertificateDescription { - /** - * Thumbprint of the primary certificate. - */ - @JsonProperty(value = "thumbprint", required = true) - private String thumbprint; - - /** - * Thumbprint of the secondary certificate. - */ - @JsonProperty(value = "thumbprintSecondary") - private String thumbprintSecondary; - - /** - * The local certificate store location. Possible values include: - * 'AddressBook', 'AuthRoot', 'CertificateAuthority', 'Disallowed', 'My', - * 'Root', 'TrustedPeople', 'TrustedPublisher'. - */ - @JsonProperty(value = "x509StoreName") - private String x509StoreName; - - /** - * Get the thumbprint value. - * - * @return the thumbprint value - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint value. - * - * @param thumbprint the thumbprint value to set - * @return the CertificateDescription object itself. - */ - public CertificateDescription withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - - /** - * Get the thumbprintSecondary value. - * - * @return the thumbprintSecondary value - */ - public String thumbprintSecondary() { - return this.thumbprintSecondary; - } - - /** - * Set the thumbprintSecondary value. - * - * @param thumbprintSecondary the thumbprintSecondary value to set - * @return the CertificateDescription object itself. - */ - public CertificateDescription withThumbprintSecondary(String thumbprintSecondary) { - this.thumbprintSecondary = thumbprintSecondary; - return this; - } - - /** - * Get the x509StoreName value. - * - * @return the x509StoreName value - */ - public String x509StoreName() { - return this.x509StoreName; - } - - /** - * Set the x509StoreName value. - * - * @param x509StoreName the x509StoreName value to set - * @return the CertificateDescription object itself. - */ - public CertificateDescription withX509StoreName(String x509StoreName) { - this.x509StoreName = x509StoreName; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClientCertificateCommonName.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClientCertificateCommonName.java deleted file mode 100644 index f3982f922bc..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClientCertificateCommonName.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Client certificate details using common name. - */ -public class ClientCertificateCommonName { - /** - * Is this certificate used for admin access from the client, if false , it - * is used or query only access. - */ - @JsonProperty(value = "isAdmin", required = true) - private boolean isAdmin; - - /** - * Certificate common name to be granted access; be carefull using wild - * card common names. - */ - @JsonProperty(value = "certificateCommonName", required = true) - private String certificateCommonName; - - /** - * Certificate issuer thumbprint. - */ - @JsonProperty(value = "certificateIssuerThumbprint", required = true) - private String certificateIssuerThumbprint; - - /** - * Get the isAdmin value. - * - * @return the isAdmin value - */ - public boolean isAdmin() { - return this.isAdmin; - } - - /** - * Set the isAdmin value. - * - * @param isAdmin the isAdmin value to set - * @return the ClientCertificateCommonName object itself. - */ - public ClientCertificateCommonName withIsAdmin(boolean isAdmin) { - this.isAdmin = isAdmin; - return this; - } - - /** - * Get the certificateCommonName value. - * - * @return the certificateCommonName value - */ - public String certificateCommonName() { - return this.certificateCommonName; - } - - /** - * Set the certificateCommonName value. - * - * @param certificateCommonName the certificateCommonName value to set - * @return the ClientCertificateCommonName object itself. - */ - public ClientCertificateCommonName withCertificateCommonName(String certificateCommonName) { - this.certificateCommonName = certificateCommonName; - return this; - } - - /** - * Get the certificateIssuerThumbprint value. - * - * @return the certificateIssuerThumbprint value - */ - public String certificateIssuerThumbprint() { - return this.certificateIssuerThumbprint; - } - - /** - * Set the certificateIssuerThumbprint value. - * - * @param certificateIssuerThumbprint the certificateIssuerThumbprint value to set - * @return the ClientCertificateCommonName object itself. - */ - public ClientCertificateCommonName withCertificateIssuerThumbprint(String certificateIssuerThumbprint) { - this.certificateIssuerThumbprint = certificateIssuerThumbprint; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClientCertificateThumbprint.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClientCertificateThumbprint.java deleted file mode 100644 index ce8ade65f21..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClientCertificateThumbprint.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Client certificate details using thumbprint. - */ -public class ClientCertificateThumbprint { - /** - * Is this certificate used for admin access from the client, if false, it - * is used or query only access. - */ - @JsonProperty(value = "isAdmin", required = true) - private boolean isAdmin; - - /** - * Certificate thumbprint. - */ - @JsonProperty(value = "certificateThumbprint", required = true) - private String certificateThumbprint; - - /** - * Get the isAdmin value. - * - * @return the isAdmin value - */ - public boolean isAdmin() { - return this.isAdmin; - } - - /** - * Set the isAdmin value. - * - * @param isAdmin the isAdmin value to set - * @return the ClientCertificateThumbprint object itself. - */ - public ClientCertificateThumbprint withIsAdmin(boolean isAdmin) { - this.isAdmin = isAdmin; - return this; - } - - /** - * Get the certificateThumbprint value. - * - * @return the certificateThumbprint value - */ - public String certificateThumbprint() { - return this.certificateThumbprint; - } - - /** - * Set the certificateThumbprint value. - * - * @param certificateThumbprint the certificateThumbprint value to set - * @return the ClientCertificateThumbprint object itself. - */ - public ClientCertificateThumbprint withCertificateThumbprint(String certificateThumbprint) { - this.certificateThumbprint = certificateThumbprint; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterHealthPolicy.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterHealthPolicy.java deleted file mode 100644 index 33cfbb90f76..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterHealthPolicy.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines a health policy used to evaluate the health of the cluster or of a - * cluster node. - */ -public class ClusterHealthPolicy { - /** - * The maximum allowed percentage of unhealthy nodes before reporting an - * error. For example, to allow 10% of nodes to be unhealthy, this value - * would be 10. - */ - @JsonProperty(value = "maxPercentUnhealthyNodes") - private Integer maxPercentUnhealthyNodes; - - /** - * The maximum allowed percentage of unhealthy applications before - * reporting an error. For example, to allow 10% of applications to be - * unhealthy, this value would be 10. - */ - @JsonProperty(value = "maxPercentUnhealthyApplications") - private Integer maxPercentUnhealthyApplications; - - /** - * Get the maxPercentUnhealthyNodes value. - * - * @return the maxPercentUnhealthyNodes value - */ - public Integer maxPercentUnhealthyNodes() { - return this.maxPercentUnhealthyNodes; - } - - /** - * Set the maxPercentUnhealthyNodes value. - * - * @param maxPercentUnhealthyNodes the maxPercentUnhealthyNodes value to set - * @return the ClusterHealthPolicy object itself. - */ - public ClusterHealthPolicy withMaxPercentUnhealthyNodes(Integer maxPercentUnhealthyNodes) { - this.maxPercentUnhealthyNodes = maxPercentUnhealthyNodes; - return this; - } - - /** - * Get the maxPercentUnhealthyApplications value. - * - * @return the maxPercentUnhealthyApplications value - */ - public Integer maxPercentUnhealthyApplications() { - return this.maxPercentUnhealthyApplications; - } - - /** - * Set the maxPercentUnhealthyApplications value. - * - * @param maxPercentUnhealthyApplications the maxPercentUnhealthyApplications value to set - * @return the ClusterHealthPolicy object itself. - */ - public ClusterHealthPolicy withMaxPercentUnhealthyApplications(Integer maxPercentUnhealthyApplications) { - this.maxPercentUnhealthyApplications = maxPercentUnhealthyApplications; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterUpgradeDeltaHealthPolicy.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterUpgradeDeltaHealthPolicy.java deleted file mode 100644 index c43b6c4c6dd..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterUpgradeDeltaHealthPolicy.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Delta health policy for the cluster. - */ -public class ClusterUpgradeDeltaHealthPolicy { - /** - * Additional unhealthy nodes percentage. - */ - @JsonProperty(value = "maxPercentDeltaUnhealthyNodes", required = true) - private int maxPercentDeltaUnhealthyNodes; - - /** - * Additional unhealthy nodes percentage per upgrade domain. - */ - @JsonProperty(value = "maxPercentUpgradeDomainDeltaUnhealthyNodes", required = true) - private int maxPercentUpgradeDomainDeltaUnhealthyNodes; - - /** - * Additional unhealthy applications percentage. - */ - @JsonProperty(value = "maxPercentDeltaUnhealthyApplications", required = true) - private int maxPercentDeltaUnhealthyApplications; - - /** - * Get the maxPercentDeltaUnhealthyNodes value. - * - * @return the maxPercentDeltaUnhealthyNodes value - */ - public int maxPercentDeltaUnhealthyNodes() { - return this.maxPercentDeltaUnhealthyNodes; - } - - /** - * Set the maxPercentDeltaUnhealthyNodes value. - * - * @param maxPercentDeltaUnhealthyNodes the maxPercentDeltaUnhealthyNodes value to set - * @return the ClusterUpgradeDeltaHealthPolicy object itself. - */ - public ClusterUpgradeDeltaHealthPolicy withMaxPercentDeltaUnhealthyNodes(int maxPercentDeltaUnhealthyNodes) { - this.maxPercentDeltaUnhealthyNodes = maxPercentDeltaUnhealthyNodes; - return this; - } - - /** - * Get the maxPercentUpgradeDomainDeltaUnhealthyNodes value. - * - * @return the maxPercentUpgradeDomainDeltaUnhealthyNodes value - */ - public int maxPercentUpgradeDomainDeltaUnhealthyNodes() { - return this.maxPercentUpgradeDomainDeltaUnhealthyNodes; - } - - /** - * Set the maxPercentUpgradeDomainDeltaUnhealthyNodes value. - * - * @param maxPercentUpgradeDomainDeltaUnhealthyNodes the maxPercentUpgradeDomainDeltaUnhealthyNodes value to set - * @return the ClusterUpgradeDeltaHealthPolicy object itself. - */ - public ClusterUpgradeDeltaHealthPolicy withMaxPercentUpgradeDomainDeltaUnhealthyNodes(int maxPercentUpgradeDomainDeltaUnhealthyNodes) { - this.maxPercentUpgradeDomainDeltaUnhealthyNodes = maxPercentUpgradeDomainDeltaUnhealthyNodes; - return this; - } - - /** - * Get the maxPercentDeltaUnhealthyApplications value. - * - * @return the maxPercentDeltaUnhealthyApplications value - */ - public int maxPercentDeltaUnhealthyApplications() { - return this.maxPercentDeltaUnhealthyApplications; - } - - /** - * Set the maxPercentDeltaUnhealthyApplications value. - * - * @param maxPercentDeltaUnhealthyApplications the maxPercentDeltaUnhealthyApplications value to set - * @return the ClusterUpgradeDeltaHealthPolicy object itself. - */ - public ClusterUpgradeDeltaHealthPolicy withMaxPercentDeltaUnhealthyApplications(int maxPercentDeltaUnhealthyApplications) { - this.maxPercentDeltaUnhealthyApplications = maxPercentDeltaUnhealthyApplications; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterUpgradePolicy.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterUpgradePolicy.java deleted file mode 100644 index f888484a937..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterUpgradePolicy.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Cluster upgrade policy. - */ -public class ClusterUpgradePolicy { - /** - * Use the user defined upgrade policy or not. - */ - @JsonProperty(value = "overrideUserUpgradePolicy") - private Boolean overrideUserUpgradePolicy; - - /** - * Force node to restart or not. - */ - @JsonProperty(value = "forceRestart") - private Boolean forceRestart; - - /** - * Timeout for replica set upgrade to complete,it represents .Net TimeSpan. - */ - @JsonProperty(value = "upgradeReplicaSetCheckTimeout", required = true) - private String upgradeReplicaSetCheckTimeout; - - /** - * The length of time to wait after completing an upgrade domain before - * performing health checks, it represents .Net TimeSpan. - */ - @JsonProperty(value = "healthCheckWaitDuration", required = true) - private String healthCheckWaitDuration; - - /** - * The length of time that health checks must pass continuously,it - * represents .Net TimeSpan. - */ - @JsonProperty(value = "healthCheckStableDuration", required = true) - private String healthCheckStableDuration; - - /** - * The length of time that health checks can fail continuously,it - * represents .Net TimeSpan. - */ - @JsonProperty(value = "healthCheckRetryTimeout", required = true) - private String healthCheckRetryTimeout; - - /** - * The upgrade timeout,it represents .Net TimeSpan. - */ - @JsonProperty(value = "upgradeTimeout", required = true) - private String upgradeTimeout; - - /** - * The timeout for any upgrade domain,it represents .Net TimeSpan. - */ - @JsonProperty(value = "upgradeDomainTimeout", required = true) - private String upgradeDomainTimeout; - - /** - * Cluster health Policy. - */ - @JsonProperty(value = "healthPolicy", required = true) - private ClusterHealthPolicy healthPolicy; - - /** - * Delta health policy. - */ - @JsonProperty(value = "deltaHealthPolicy") - private ClusterUpgradeDeltaHealthPolicy deltaHealthPolicy; - - /** - * Get the overrideUserUpgradePolicy value. - * - * @return the overrideUserUpgradePolicy value - */ - public Boolean overrideUserUpgradePolicy() { - return this.overrideUserUpgradePolicy; - } - - /** - * Set the overrideUserUpgradePolicy value. - * - * @param overrideUserUpgradePolicy the overrideUserUpgradePolicy value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withOverrideUserUpgradePolicy(Boolean overrideUserUpgradePolicy) { - this.overrideUserUpgradePolicy = overrideUserUpgradePolicy; - return this; - } - - /** - * Get the forceRestart value. - * - * @return the forceRestart value - */ - public Boolean forceRestart() { - return this.forceRestart; - } - - /** - * Set the forceRestart value. - * - * @param forceRestart the forceRestart value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withForceRestart(Boolean forceRestart) { - this.forceRestart = forceRestart; - return this; - } - - /** - * Get the upgradeReplicaSetCheckTimeout value. - * - * @return the upgradeReplicaSetCheckTimeout value - */ - public String upgradeReplicaSetCheckTimeout() { - return this.upgradeReplicaSetCheckTimeout; - } - - /** - * Set the upgradeReplicaSetCheckTimeout value. - * - * @param upgradeReplicaSetCheckTimeout the upgradeReplicaSetCheckTimeout value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withUpgradeReplicaSetCheckTimeout(String upgradeReplicaSetCheckTimeout) { - this.upgradeReplicaSetCheckTimeout = upgradeReplicaSetCheckTimeout; - return this; - } - - /** - * Get the healthCheckWaitDuration value. - * - * @return the healthCheckWaitDuration value - */ - public String healthCheckWaitDuration() { - return this.healthCheckWaitDuration; - } - - /** - * Set the healthCheckWaitDuration value. - * - * @param healthCheckWaitDuration the healthCheckWaitDuration value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withHealthCheckWaitDuration(String healthCheckWaitDuration) { - this.healthCheckWaitDuration = healthCheckWaitDuration; - return this; - } - - /** - * Get the healthCheckStableDuration value. - * - * @return the healthCheckStableDuration value - */ - public String healthCheckStableDuration() { - return this.healthCheckStableDuration; - } - - /** - * Set the healthCheckStableDuration value. - * - * @param healthCheckStableDuration the healthCheckStableDuration value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withHealthCheckStableDuration(String healthCheckStableDuration) { - this.healthCheckStableDuration = healthCheckStableDuration; - return this; - } - - /** - * Get the healthCheckRetryTimeout value. - * - * @return the healthCheckRetryTimeout value - */ - public String healthCheckRetryTimeout() { - return this.healthCheckRetryTimeout; - } - - /** - * Set the healthCheckRetryTimeout value. - * - * @param healthCheckRetryTimeout the healthCheckRetryTimeout value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withHealthCheckRetryTimeout(String healthCheckRetryTimeout) { - this.healthCheckRetryTimeout = healthCheckRetryTimeout; - return this; - } - - /** - * Get the upgradeTimeout value. - * - * @return the upgradeTimeout value - */ - public String upgradeTimeout() { - return this.upgradeTimeout; - } - - /** - * Set the upgradeTimeout value. - * - * @param upgradeTimeout the upgradeTimeout value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withUpgradeTimeout(String upgradeTimeout) { - this.upgradeTimeout = upgradeTimeout; - return this; - } - - /** - * Get the upgradeDomainTimeout value. - * - * @return the upgradeDomainTimeout value - */ - public String upgradeDomainTimeout() { - return this.upgradeDomainTimeout; - } - - /** - * Set the upgradeDomainTimeout value. - * - * @param upgradeDomainTimeout the upgradeDomainTimeout value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withUpgradeDomainTimeout(String upgradeDomainTimeout) { - this.upgradeDomainTimeout = upgradeDomainTimeout; - return this; - } - - /** - * Get the healthPolicy value. - * - * @return the healthPolicy value - */ - public ClusterHealthPolicy healthPolicy() { - return this.healthPolicy; - } - - /** - * Set the healthPolicy value. - * - * @param healthPolicy the healthPolicy value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withHealthPolicy(ClusterHealthPolicy healthPolicy) { - this.healthPolicy = healthPolicy; - return this; - } - - /** - * Get the deltaHealthPolicy value. - * - * @return the deltaHealthPolicy value - */ - public ClusterUpgradeDeltaHealthPolicy deltaHealthPolicy() { - return this.deltaHealthPolicy; - } - - /** - * Set the deltaHealthPolicy value. - * - * @param deltaHealthPolicy the deltaHealthPolicy value to set - * @return the ClusterUpgradePolicy object itself. - */ - public ClusterUpgradePolicy withDeltaHealthPolicy(ClusterUpgradeDeltaHealthPolicy deltaHealthPolicy) { - this.deltaHealthPolicy = deltaHealthPolicy; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterVersionDetails.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterVersionDetails.java deleted file mode 100644 index ac36c4b33b4..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ClusterVersionDetails.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The detail of the ServiceFabric runtime version result. - */ -public class ClusterVersionDetails { - /** - * The ServiceFabric runtime version of the cluster. - */ - @JsonProperty(value = "codeVersion") - private String codeVersion; - - /** - * The date of expiry of support of the version. - */ - @JsonProperty(value = "supportExpiryUtc") - private String supportExpiryUtc; - - /** - * Cluster operating system. Possible values include: 'Windows', 'Linux'. - */ - @JsonProperty(value = "environment") - private String environment; - - /** - * Get the codeVersion value. - * - * @return the codeVersion value - */ - public String codeVersion() { - return this.codeVersion; - } - - /** - * Set the codeVersion value. - * - * @param codeVersion the codeVersion value to set - * @return the ClusterVersionDetails object itself. - */ - public ClusterVersionDetails withCodeVersion(String codeVersion) { - this.codeVersion = codeVersion; - return this; - } - - /** - * Get the supportExpiryUtc value. - * - * @return the supportExpiryUtc value - */ - public String supportExpiryUtc() { - return this.supportExpiryUtc; - } - - /** - * Set the supportExpiryUtc value. - * - * @param supportExpiryUtc the supportExpiryUtc value to set - * @return the ClusterVersionDetails object itself. - */ - public ClusterVersionDetails withSupportExpiryUtc(String supportExpiryUtc) { - this.supportExpiryUtc = supportExpiryUtc; - return this; - } - - /** - * Get the environment value. - * - * @return the environment value - */ - public String environment() { - return this.environment; - } - - /** - * Set the environment value. - * - * @param environment the environment value to set - * @return the ClusterVersionDetails object itself. - */ - public ClusterVersionDetails withEnvironment(String environment) { - this.environment = environment; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/DiagnosticsStorageAccountConfig.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/DiagnosticsStorageAccountConfig.java deleted file mode 100644 index 98f7d898429..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/DiagnosticsStorageAccountConfig.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Diagnostics storage account config. - */ -public class DiagnosticsStorageAccountConfig { - /** - * Diagnostics storage account name. - */ - @JsonProperty(value = "storageAccountName", required = true) - private String storageAccountName; - - /** - * Protected Diagnostics storage key name. - */ - @JsonProperty(value = "protectedAccountKeyName", required = true) - private String protectedAccountKeyName; - - /** - * Diagnostics storage account blob endpoint. - */ - @JsonProperty(value = "blobEndpoint", required = true) - private String blobEndpoint; - - /** - * Diagnostics storage account queue endpoint. - */ - @JsonProperty(value = "queueEndpoint", required = true) - private String queueEndpoint; - - /** - * Diagnostics storage account table endpoint. - */ - @JsonProperty(value = "tableEndpoint", required = true) - private String tableEndpoint; - - /** - * Get the storageAccountName value. - * - * @return the storageAccountName value - */ - public String storageAccountName() { - return this.storageAccountName; - } - - /** - * Set the storageAccountName value. - * - * @param storageAccountName the storageAccountName value to set - * @return the DiagnosticsStorageAccountConfig object itself. - */ - public DiagnosticsStorageAccountConfig withStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - return this; - } - - /** - * Get the protectedAccountKeyName value. - * - * @return the protectedAccountKeyName value - */ - public String protectedAccountKeyName() { - return this.protectedAccountKeyName; - } - - /** - * Set the protectedAccountKeyName value. - * - * @param protectedAccountKeyName the protectedAccountKeyName value to set - * @return the DiagnosticsStorageAccountConfig object itself. - */ - public DiagnosticsStorageAccountConfig withProtectedAccountKeyName(String protectedAccountKeyName) { - this.protectedAccountKeyName = protectedAccountKeyName; - return this; - } - - /** - * Get the blobEndpoint value. - * - * @return the blobEndpoint value - */ - public String blobEndpoint() { - return this.blobEndpoint; - } - - /** - * Set the blobEndpoint value. - * - * @param blobEndpoint the blobEndpoint value to set - * @return the DiagnosticsStorageAccountConfig object itself. - */ - public DiagnosticsStorageAccountConfig withBlobEndpoint(String blobEndpoint) { - this.blobEndpoint = blobEndpoint; - return this; - } - - /** - * Get the queueEndpoint value. - * - * @return the queueEndpoint value - */ - public String queueEndpoint() { - return this.queueEndpoint; - } - - /** - * Set the queueEndpoint value. - * - * @param queueEndpoint the queueEndpoint value to set - * @return the DiagnosticsStorageAccountConfig object itself. - */ - public DiagnosticsStorageAccountConfig withQueueEndpoint(String queueEndpoint) { - this.queueEndpoint = queueEndpoint; - return this; - } - - /** - * Get the tableEndpoint value. - * - * @return the tableEndpoint value - */ - public String tableEndpoint() { - return this.tableEndpoint; - } - - /** - * Set the tableEndpoint value. - * - * @param tableEndpoint the tableEndpoint value to set - * @return the DiagnosticsStorageAccountConfig object itself. - */ - public DiagnosticsStorageAccountConfig withTableEndpoint(String tableEndpoint) { - this.tableEndpoint = tableEndpoint; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/EndpointRangeDescription.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/EndpointRangeDescription.java deleted file mode 100644 index 22e981e82e6..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/EndpointRangeDescription.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Port range details. - */ -public class EndpointRangeDescription { - /** - * Starting port of a range of ports. - */ - @JsonProperty(value = "startPort", required = true) - private int startPort; - - /** - * End port of a range of ports. - */ - @JsonProperty(value = "endPort", required = true) - private int endPort; - - /** - * Get the startPort value. - * - * @return the startPort value - */ - public int startPort() { - return this.startPort; - } - - /** - * Set the startPort value. - * - * @param startPort the startPort value to set - * @return the EndpointRangeDescription object itself. - */ - public EndpointRangeDescription withStartPort(int startPort) { - this.startPort = startPort; - return this; - } - - /** - * Get the endPort value. - * - * @return the endPort value - */ - public int endPort() { - return this.endPort; - } - - /** - * Set the endPort value. - * - * @param endPort the endPort value to set - * @return the EndpointRangeDescription object itself. - */ - public EndpointRangeDescription withEndPort(int endPort) { - this.endPort = endPort; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModel.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModel.java deleted file mode 100644 index 4fa8155880a..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModel.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The structure of the error. - */ -public class ErrorModel { - /** - * The error detail. - */ - @JsonProperty(value = "error") - private ErrorModelError error; - - /** - * Get the error value. - * - * @return the error value - */ - public ErrorModelError error() { - return this.error; - } - - /** - * Set the error value. - * - * @param error the error value to set - * @return the ErrorModel object itself. - */ - public ErrorModel withError(ErrorModelError error) { - this.error = error; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModelError.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModelError.java deleted file mode 100644 index fcc4d7ed4d3..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModelError.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The error detail. - */ -public class ErrorModelError { - /** - * The error code. - */ - @JsonProperty(value = "code") - private String code; - - /** - * The error message. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Set the code value. - * - * @param code the code value to set - * @return the ErrorModelError object itself. - */ - public ErrorModelError withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the ErrorModelError object itself. - */ - public ErrorModelError withMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModelException.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModelException.java deleted file mode 100644 index 748f2519264..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ErrorModelException.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.microsoft.rest.RestException; -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Exception thrown for an invalid response with ErrorModel information. - */ -public class ErrorModelException extends RestException { - /** - * Initializes a new instance of the ErrorModelException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - */ - public ErrorModelException(final String message, final Response response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorModelException class. - * - * @param message the exception message or the response content if a message is not available - * @param response the HTTP response - * @param body the deserialized response body - */ - public ErrorModelException(final String message, final Response response, final ErrorModel body) { - super(message, response, body); - } - - @Override - public ErrorModel body() { - return (ErrorModel) super.body(); - } -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/NodeTypeDescription.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/NodeTypeDescription.java deleted file mode 100644 index bc3e0137320..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/NodeTypeDescription.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes a node type in the cluster, each node type represents sub set of - * nodes in the cluster. - */ -public class NodeTypeDescription { - /** - * Name of the node type. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * The placement tags applied to nodes in the node type, which can be used - * to indicate where certain services (workload) should run. - */ - @JsonProperty(value = "placementProperties") - private Map placementProperties; - - /** - * The capacity tags applied to the nodes in the node type, the cluster - * resource manager uses these tags to understand how much of a resource a - * node has. - */ - @JsonProperty(value = "capacities") - private Map capacities; - - /** - * The TCP cluster management endpoint port. - */ - @JsonProperty(value = "clientConnectionEndpointPort", required = true) - private int clientConnectionEndpointPort; - - /** - * The HTTP cluster management endpoint port. - */ - @JsonProperty(value = "httpGatewayEndpointPort", required = true) - private int httpGatewayEndpointPort; - - /** - * Nodetype durability Level. Possible values include: 'Bronze', 'Silver', - * 'Gold'. - */ - @JsonProperty(value = "durabilityLevel") - private String durabilityLevel; - - /** - * Ports used by applications. - */ - @JsonProperty(value = "applicationPorts") - private EndpointRangeDescription applicationPorts; - - /** - * System assgined application ports. - */ - @JsonProperty(value = "ephemeralPorts") - private EndpointRangeDescription ephemeralPorts; - - /** - * Mark this as the primary node type. - */ - @JsonProperty(value = "isPrimary", required = true) - private boolean isPrimary; - - /** - * The number of node instances in the node type. - */ - @JsonProperty(value = "vmInstanceCount", required = true) - private int vmInstanceCount; - - /** - * Endpoint used by reverse proxy. - */ - @JsonProperty(value = "reverseProxyEndpointPort") - private Integer reverseProxyEndpointPort; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withName(String name) { - this.name = name; - return this; - } - - /** - * Get the placementProperties value. - * - * @return the placementProperties value - */ - public Map placementProperties() { - return this.placementProperties; - } - - /** - * Set the placementProperties value. - * - * @param placementProperties the placementProperties value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withPlacementProperties(Map placementProperties) { - this.placementProperties = placementProperties; - return this; - } - - /** - * Get the capacities value. - * - * @return the capacities value - */ - public Map capacities() { - return this.capacities; - } - - /** - * Set the capacities value. - * - * @param capacities the capacities value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withCapacities(Map capacities) { - this.capacities = capacities; - return this; - } - - /** - * Get the clientConnectionEndpointPort value. - * - * @return the clientConnectionEndpointPort value - */ - public int clientConnectionEndpointPort() { - return this.clientConnectionEndpointPort; - } - - /** - * Set the clientConnectionEndpointPort value. - * - * @param clientConnectionEndpointPort the clientConnectionEndpointPort value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withClientConnectionEndpointPort(int clientConnectionEndpointPort) { - this.clientConnectionEndpointPort = clientConnectionEndpointPort; - return this; - } - - /** - * Get the httpGatewayEndpointPort value. - * - * @return the httpGatewayEndpointPort value - */ - public int httpGatewayEndpointPort() { - return this.httpGatewayEndpointPort; - } - - /** - * Set the httpGatewayEndpointPort value. - * - * @param httpGatewayEndpointPort the httpGatewayEndpointPort value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withHttpGatewayEndpointPort(int httpGatewayEndpointPort) { - this.httpGatewayEndpointPort = httpGatewayEndpointPort; - return this; - } - - /** - * Get the durabilityLevel value. - * - * @return the durabilityLevel value - */ - public String durabilityLevel() { - return this.durabilityLevel; - } - - /** - * Set the durabilityLevel value. - * - * @param durabilityLevel the durabilityLevel value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withDurabilityLevel(String durabilityLevel) { - this.durabilityLevel = durabilityLevel; - return this; - } - - /** - * Get the applicationPorts value. - * - * @return the applicationPorts value - */ - public EndpointRangeDescription applicationPorts() { - return this.applicationPorts; - } - - /** - * Set the applicationPorts value. - * - * @param applicationPorts the applicationPorts value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withApplicationPorts(EndpointRangeDescription applicationPorts) { - this.applicationPorts = applicationPorts; - return this; - } - - /** - * Get the ephemeralPorts value. - * - * @return the ephemeralPorts value - */ - public EndpointRangeDescription ephemeralPorts() { - return this.ephemeralPorts; - } - - /** - * Set the ephemeralPorts value. - * - * @param ephemeralPorts the ephemeralPorts value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withEphemeralPorts(EndpointRangeDescription ephemeralPorts) { - this.ephemeralPorts = ephemeralPorts; - return this; - } - - /** - * Get the isPrimary value. - * - * @return the isPrimary value - */ - public boolean isPrimary() { - return this.isPrimary; - } - - /** - * Set the isPrimary value. - * - * @param isPrimary the isPrimary value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withIsPrimary(boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * Get the vmInstanceCount value. - * - * @return the vmInstanceCount value - */ - public int vmInstanceCount() { - return this.vmInstanceCount; - } - - /** - * Set the vmInstanceCount value. - * - * @param vmInstanceCount the vmInstanceCount value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withVmInstanceCount(int vmInstanceCount) { - this.vmInstanceCount = vmInstanceCount; - return this; - } - - /** - * Get the reverseProxyEndpointPort value. - * - * @return the reverseProxyEndpointPort value - */ - public Integer reverseProxyEndpointPort() { - return this.reverseProxyEndpointPort; - } - - /** - * Set the reverseProxyEndpointPort value. - * - * @param reverseProxyEndpointPort the reverseProxyEndpointPort value to set - * @return the NodeTypeDescription object itself. - */ - public NodeTypeDescription withReverseProxyEndpointPort(Integer reverseProxyEndpointPort) { - this.reverseProxyEndpointPort = reverseProxyEndpointPort; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ProvisioningState.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ProvisioningState.java deleted file mode 100644 index b5a7380d358..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/ProvisioningState.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ProvisioningState. - */ -public final class ProvisioningState { - /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = new ProvisioningState("Updating"); - - /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = new ProvisioningState("Succeeded"); - - /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = new ProvisioningState("Failed"); - - /** Static value Canceled for ProvisioningState. */ - public static final ProvisioningState CANCELED = new ProvisioningState("Canceled"); - - private String value; - - /** - * Creates a custom value for ProvisioningState. - * @param value the custom value - */ - public ProvisioningState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ProvisioningState)) { - return false; - } - if (obj == this) { - return true; - } - ProvisioningState rhs = (ProvisioningState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/SettingsParameterDescription.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/SettingsParameterDescription.java deleted file mode 100644 index 26f09a80c2f..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/SettingsParameterDescription.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * ServiceFabric settings under sections. - */ -public class SettingsParameterDescription { - /** - * The name of settings property. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * The value of the property. - */ - @JsonProperty(value = "value", required = true) - private String value; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the SettingsParameterDescription object itself. - */ - public SettingsParameterDescription withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value value. - * - * @return the value value - */ - public String value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the SettingsParameterDescription object itself. - */ - public SettingsParameterDescription withValue(String value) { - this.value = value; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/SettingsSectionDescription.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/SettingsSectionDescription.java deleted file mode 100644 index 80a90e82c42..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/SettingsSectionDescription.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * ServiceFabric section settings. - */ -public class SettingsSectionDescription { - /** - * The name of settings section. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Collection of settings in the section, each setting is a tuple - * consisting of setting name and value. - */ - @JsonProperty(value = "parameters", required = true) - private List parameters; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the SettingsSectionDescription object itself. - */ - public SettingsSectionDescription withName(String name) { - this.name = name; - return this; - } - - /** - * Get the parameters value. - * - * @return the parameters value - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters value. - * - * @param parameters the parameters value to set - * @return the SettingsSectionDescription object itself. - */ - public SettingsSectionDescription withParameters(List parameters) { - this.parameters = parameters; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterCodeVersionsResultInner.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterCodeVersionsResultInner.java deleted file mode 100644 index bb56b249b4b..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterCodeVersionsResultInner.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * The result of the ServiceFabric runtime versions. - */ -@JsonFlatten -public class ClusterCodeVersionsResultInner { - /** - * The identification of the result. - */ - @JsonProperty(value = "id") - private String id; - - /** - * The name of the result. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The result resource type. - */ - @JsonProperty(value = "type") - private String type; - - /** - * The ServiceFabric runtime version of the cluster. - */ - @JsonProperty(value = "properties.codeVersion") - private String codeVersion; - - /** - * The date of expiry of support of the version. - */ - @JsonProperty(value = "properties.supportExpiryUtc") - private String supportExpiryUtc; - - /** - * Cluster operating system. Possible values include: 'Windows', 'Linux'. - */ - @JsonProperty(value = "properties.environment") - private String environment; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the ClusterCodeVersionsResultInner object itself. - */ - public ClusterCodeVersionsResultInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ClusterCodeVersionsResultInner object itself. - */ - public ClusterCodeVersionsResultInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ClusterCodeVersionsResultInner object itself. - */ - public ClusterCodeVersionsResultInner withType(String type) { - this.type = type; - return this; - } - - /** - * Get the codeVersion value. - * - * @return the codeVersion value - */ - public String codeVersion() { - return this.codeVersion; - } - - /** - * Set the codeVersion value. - * - * @param codeVersion the codeVersion value to set - * @return the ClusterCodeVersionsResultInner object itself. - */ - public ClusterCodeVersionsResultInner withCodeVersion(String codeVersion) { - this.codeVersion = codeVersion; - return this; - } - - /** - * Get the supportExpiryUtc value. - * - * @return the supportExpiryUtc value - */ - public String supportExpiryUtc() { - return this.supportExpiryUtc; - } - - /** - * Set the supportExpiryUtc value. - * - * @param supportExpiryUtc the supportExpiryUtc value to set - * @return the ClusterCodeVersionsResultInner object itself. - */ - public ClusterCodeVersionsResultInner withSupportExpiryUtc(String supportExpiryUtc) { - this.supportExpiryUtc = supportExpiryUtc; - return this; - } - - /** - * Get the environment value. - * - * @return the environment value - */ - public String environment() { - return this.environment; - } - - /** - * Set the environment value. - * - * @param environment the environment value to set - * @return the ClusterCodeVersionsResultInner object itself. - */ - public ClusterCodeVersionsResultInner withEnvironment(String environment) { - this.environment = environment; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterInner.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterInner.java deleted file mode 100644 index 528b8874dc5..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterInner.java +++ /dev/null @@ -1,484 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import java.util.List; -import com.microsoft.azure.management.servicefabric.ClusterVersionDetails; -import com.microsoft.azure.management.servicefabric.CertificateDescription; -import com.microsoft.azure.management.servicefabric.ClientCertificateThumbprint; -import com.microsoft.azure.management.servicefabric.ClientCertificateCommonName; -import com.microsoft.azure.management.servicefabric.SettingsSectionDescription; -import com.microsoft.azure.management.servicefabric.NodeTypeDescription; -import com.microsoft.azure.management.servicefabric.AzureActiveDirectory; -import com.microsoft.azure.management.servicefabric.ProvisioningState; -import com.microsoft.azure.management.servicefabric.DiagnosticsStorageAccountConfig; -import com.microsoft.azure.management.servicefabric.ClusterUpgradePolicy; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * The cluster resource. - */ -@JsonFlatten -public class ClusterInner extends Resource { - /** - * The available cluster code version which the cluster can upgrade to, - * note that you must choose upgradeMode to manual to upgrade to. - */ - @JsonProperty(value = "properties.availableClusterVersions", access = JsonProperty.Access.WRITE_ONLY) - private List availableClusterVersions; - - /** - * The unique identifier for the cluster resource. - */ - @JsonProperty(value = "properties.clusterId", access = JsonProperty.Access.WRITE_ONLY) - private String clusterId; - - /** - * The state for the cluster. Possible values include: 'WaitingForNodes', - * 'Deploying', 'BaselineUpgrade', 'UpdatingUserConfiguration', - * 'UpdatingUserCertificate', 'UpdatingInfrastructure', - * 'EnforcingClusterVersion', 'UpgradeServiceUnreachable', 'AutoScale', - * 'Ready'. - */ - @JsonProperty(value = "properties.clusterState", access = JsonProperty.Access.WRITE_ONLY) - private String clusterState; - - /** - * The endpoint for the cluster connecting to servicefabric resource - * provider. - */ - @JsonProperty(value = "properties.clusterEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String clusterEndpoint; - - /** - * The ServiceFabric code version running in your cluster. - */ - @JsonProperty(value = "properties.clusterCodeVersion") - private String clusterCodeVersion; - - /** - * This primay certificate will be used as cluster node to node security, - * SSL certificate for cluster management endpoint and default admin - * client. - */ - @JsonProperty(value = "properties.certificate") - private CertificateDescription certificate; - - /** - * Cluster reliability level indicates replica set size of system service. - * Possible values include: 'Bronze', 'Silver', 'Gold', 'Platinum'. - */ - @JsonProperty(value = "properties.reliabilityLevel") - private String reliabilityLevel; - - /** - * Cluster upgrade mode indicates if fabric upgrade is initiated - * automatically by the system or not. Possible values include: - * 'Automatic', 'Manual'. - */ - @JsonProperty(value = "properties.upgradeMode") - private String upgradeMode; - - /** - * The client thumbprint details ,it is used for client access for cluster - * operation. - */ - @JsonProperty(value = "properties.clientCertificateThumbprints") - private List clientCertificateThumbprints; - - /** - * List of client certificates to whitelist based on common names. - */ - @JsonProperty(value = "properties.clientCertificateCommonNames") - private List clientCertificateCommonNames; - - /** - * List of custom fabric settings to configure the cluster. - */ - @JsonProperty(value = "properties.fabricSettings") - private List fabricSettings; - - /** - * The server certificate used by reverse proxy. - */ - @JsonProperty(value = "properties.reverseProxyCertificate") - private CertificateDescription reverseProxyCertificate; - - /** - * The http management endpoint of the cluster. - */ - @JsonProperty(value = "properties.managementEndpoint", required = true) - private String managementEndpoint; - - /** - * The list of nodetypes that make up the cluster. - */ - @JsonProperty(value = "properties.nodeTypes", required = true) - private List nodeTypes; - - /** - * The settings to enable AAD authentication on the cluster. - */ - @JsonProperty(value = "properties.azureActiveDirectory") - private AzureActiveDirectory azureActiveDirectory; - - /** - * The provisioning state of the cluster resource. Possible values include: - * 'Updating', 'Succeeded', 'Failed', 'Canceled'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /** - * The name of VM image VMSS has been configured with. Generic names such - * as Windows or Linux can be used. - */ - @JsonProperty(value = "properties.vmImage") - private String vmImage; - - /** - * The storage diagnostics account configuration details. - */ - @JsonProperty(value = "properties.diagnosticsStorageAccountConfig") - private DiagnosticsStorageAccountConfig diagnosticsStorageAccountConfig; - - /** - * The policy to use when upgrading the cluster. - */ - @JsonProperty(value = "properties.upgradeDescription") - private ClusterUpgradePolicy upgradeDescription; - - /** - * Get the availableClusterVersions value. - * - * @return the availableClusterVersions value - */ - public List availableClusterVersions() { - return this.availableClusterVersions; - } - - /** - * Get the clusterId value. - * - * @return the clusterId value - */ - public String clusterId() { - return this.clusterId; - } - - /** - * Get the clusterState value. - * - * @return the clusterState value - */ - public String clusterState() { - return this.clusterState; - } - - /** - * Get the clusterEndpoint value. - * - * @return the clusterEndpoint value - */ - public String clusterEndpoint() { - return this.clusterEndpoint; - } - - /** - * Get the clusterCodeVersion value. - * - * @return the clusterCodeVersion value - */ - public String clusterCodeVersion() { - return this.clusterCodeVersion; - } - - /** - * Set the clusterCodeVersion value. - * - * @param clusterCodeVersion the clusterCodeVersion value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withClusterCodeVersion(String clusterCodeVersion) { - this.clusterCodeVersion = clusterCodeVersion; - return this; - } - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public CertificateDescription certificate() { - return this.certificate; - } - - /** - * Set the certificate value. - * - * @param certificate the certificate value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withCertificate(CertificateDescription certificate) { - this.certificate = certificate; - return this; - } - - /** - * Get the reliabilityLevel value. - * - * @return the reliabilityLevel value - */ - public String reliabilityLevel() { - return this.reliabilityLevel; - } - - /** - * Set the reliabilityLevel value. - * - * @param reliabilityLevel the reliabilityLevel value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withReliabilityLevel(String reliabilityLevel) { - this.reliabilityLevel = reliabilityLevel; - return this; - } - - /** - * Get the upgradeMode value. - * - * @return the upgradeMode value - */ - public String upgradeMode() { - return this.upgradeMode; - } - - /** - * Set the upgradeMode value. - * - * @param upgradeMode the upgradeMode value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withUpgradeMode(String upgradeMode) { - this.upgradeMode = upgradeMode; - return this; - } - - /** - * Get the clientCertificateThumbprints value. - * - * @return the clientCertificateThumbprints value - */ - public List clientCertificateThumbprints() { - return this.clientCertificateThumbprints; - } - - /** - * Set the clientCertificateThumbprints value. - * - * @param clientCertificateThumbprints the clientCertificateThumbprints value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withClientCertificateThumbprints(List clientCertificateThumbprints) { - this.clientCertificateThumbprints = clientCertificateThumbprints; - return this; - } - - /** - * Get the clientCertificateCommonNames value. - * - * @return the clientCertificateCommonNames value - */ - public List clientCertificateCommonNames() { - return this.clientCertificateCommonNames; - } - - /** - * Set the clientCertificateCommonNames value. - * - * @param clientCertificateCommonNames the clientCertificateCommonNames value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withClientCertificateCommonNames(List clientCertificateCommonNames) { - this.clientCertificateCommonNames = clientCertificateCommonNames; - return this; - } - - /** - * Get the fabricSettings value. - * - * @return the fabricSettings value - */ - public List fabricSettings() { - return this.fabricSettings; - } - - /** - * Set the fabricSettings value. - * - * @param fabricSettings the fabricSettings value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withFabricSettings(List fabricSettings) { - this.fabricSettings = fabricSettings; - return this; - } - - /** - * Get the reverseProxyCertificate value. - * - * @return the reverseProxyCertificate value - */ - public CertificateDescription reverseProxyCertificate() { - return this.reverseProxyCertificate; - } - - /** - * Set the reverseProxyCertificate value. - * - * @param reverseProxyCertificate the reverseProxyCertificate value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withReverseProxyCertificate(CertificateDescription reverseProxyCertificate) { - this.reverseProxyCertificate = reverseProxyCertificate; - return this; - } - - /** - * Get the managementEndpoint value. - * - * @return the managementEndpoint value - */ - public String managementEndpoint() { - return this.managementEndpoint; - } - - /** - * Set the managementEndpoint value. - * - * @param managementEndpoint the managementEndpoint value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withManagementEndpoint(String managementEndpoint) { - this.managementEndpoint = managementEndpoint; - return this; - } - - /** - * Get the nodeTypes value. - * - * @return the nodeTypes value - */ - public List nodeTypes() { - return this.nodeTypes; - } - - /** - * Set the nodeTypes value. - * - * @param nodeTypes the nodeTypes value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withNodeTypes(List nodeTypes) { - this.nodeTypes = nodeTypes; - return this; - } - - /** - * Get the azureActiveDirectory value. - * - * @return the azureActiveDirectory value - */ - public AzureActiveDirectory azureActiveDirectory() { - return this.azureActiveDirectory; - } - - /** - * Set the azureActiveDirectory value. - * - * @param azureActiveDirectory the azureActiveDirectory value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withAzureActiveDirectory(AzureActiveDirectory azureActiveDirectory) { - this.azureActiveDirectory = azureActiveDirectory; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the vmImage value. - * - * @return the vmImage value - */ - public String vmImage() { - return this.vmImage; - } - - /** - * Set the vmImage value. - * - * @param vmImage the vmImage value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withVmImage(String vmImage) { - this.vmImage = vmImage; - return this; - } - - /** - * Get the diagnosticsStorageAccountConfig value. - * - * @return the diagnosticsStorageAccountConfig value - */ - public DiagnosticsStorageAccountConfig diagnosticsStorageAccountConfig() { - return this.diagnosticsStorageAccountConfig; - } - - /** - * Set the diagnosticsStorageAccountConfig value. - * - * @param diagnosticsStorageAccountConfig the diagnosticsStorageAccountConfig value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withDiagnosticsStorageAccountConfig(DiagnosticsStorageAccountConfig diagnosticsStorageAccountConfig) { - this.diagnosticsStorageAccountConfig = diagnosticsStorageAccountConfig; - return this; - } - - /** - * Get the upgradeDescription value. - * - * @return the upgradeDescription value - */ - public ClusterUpgradePolicy upgradeDescription() { - return this.upgradeDescription; - } - - /** - * Set the upgradeDescription value. - * - * @param upgradeDescription the upgradeDescription value to set - * @return the ClusterInner object itself. - */ - public ClusterInner withUpgradeDescription(ClusterUpgradePolicy upgradeDescription) { - this.upgradeDescription = upgradeDescription; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterUpdateParametersInner.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterUpdateParametersInner.java deleted file mode 100644 index eeccda9dd31..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterUpdateParametersInner.java +++ /dev/null @@ -1,325 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import com.microsoft.azure.management.servicefabric.CertificateDescription; -import java.util.List; -import com.microsoft.azure.management.servicefabric.ClientCertificateThumbprint; -import com.microsoft.azure.management.servicefabric.ClientCertificateCommonName; -import com.microsoft.azure.management.servicefabric.SettingsSectionDescription; -import com.microsoft.azure.management.servicefabric.NodeTypeDescription; -import com.microsoft.azure.management.servicefabric.ClusterUpgradePolicy; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Cluster update request. - */ -@JsonFlatten -public class ClusterUpdateParametersInner { - /** - * This level is used to set the number of replicas of the system services. - * Possible values include: 'Bronze', 'Silver', 'Gold'. - */ - @JsonProperty(value = "properties.reliabilityLevel") - private String reliabilityLevel; - - /** - * Cluster upgrade mode indicates if fabric upgrade is initiated - * automatically by the system or not. Possible values include: - * 'Automatic', 'Manual'. - */ - @JsonProperty(value = "properties.upgradeMode") - private String upgradeMode; - - /** - * The ServiceFabric code version, if set it, please make sure you have set - * upgradeMode to Manual, otherwise ,it will fail, if you are using PUT new - * cluster, you can get the version by using ClusterVersions_List, if you - * are updating existing cluster, you can get the availableClusterVersions - * from Clusters_Get. - */ - @JsonProperty(value = "properties.clusterCodeVersion") - private String clusterCodeVersion; - - /** - * This primay certificate will be used as cluster node to node security, - * SSL certificate for cluster management endpoint and default admin - * client, the certificate should exist in the virtual machine scale sets - * or Azure key vault, before you add it. It will override original value. - */ - @JsonProperty(value = "properties.certificate") - private CertificateDescription certificate; - - /** - * The client thumbprint details, it is used for client access for cluster - * operation, it will override existing collection. - */ - @JsonProperty(value = "properties.clientCertificateThumbprints") - private List clientCertificateThumbprints; - - /** - * List of client certificates to whitelist based on common names. - */ - @JsonProperty(value = "properties.clientCertificateCommonNames") - private List clientCertificateCommonNames; - - /** - * List of custom fabric settings to configure the cluster, Note, it will - * overwrite existing collection. - */ - @JsonProperty(value = "properties.fabricSettings") - private List fabricSettings; - - /** - * Certificate for the reverse proxy. - */ - @JsonProperty(value = "properties.reverseProxyCertificate") - private CertificateDescription reverseProxyCertificate; - - /** - * The list of nodetypes that make up the cluster, it will override. - */ - @JsonProperty(value = "properties.nodeTypes") - private List nodeTypes; - - /** - * The policy to use when upgrading the cluster. - */ - @JsonProperty(value = "properties.upgradeDescription") - private ClusterUpgradePolicy upgradeDescription; - - /** - * Cluster update parameters. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the reliabilityLevel value. - * - * @return the reliabilityLevel value - */ - public String reliabilityLevel() { - return this.reliabilityLevel; - } - - /** - * Set the reliabilityLevel value. - * - * @param reliabilityLevel the reliabilityLevel value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withReliabilityLevel(String reliabilityLevel) { - this.reliabilityLevel = reliabilityLevel; - return this; - } - - /** - * Get the upgradeMode value. - * - * @return the upgradeMode value - */ - public String upgradeMode() { - return this.upgradeMode; - } - - /** - * Set the upgradeMode value. - * - * @param upgradeMode the upgradeMode value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withUpgradeMode(String upgradeMode) { - this.upgradeMode = upgradeMode; - return this; - } - - /** - * Get the clusterCodeVersion value. - * - * @return the clusterCodeVersion value - */ - public String clusterCodeVersion() { - return this.clusterCodeVersion; - } - - /** - * Set the clusterCodeVersion value. - * - * @param clusterCodeVersion the clusterCodeVersion value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withClusterCodeVersion(String clusterCodeVersion) { - this.clusterCodeVersion = clusterCodeVersion; - return this; - } - - /** - * Get the certificate value. - * - * @return the certificate value - */ - public CertificateDescription certificate() { - return this.certificate; - } - - /** - * Set the certificate value. - * - * @param certificate the certificate value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withCertificate(CertificateDescription certificate) { - this.certificate = certificate; - return this; - } - - /** - * Get the clientCertificateThumbprints value. - * - * @return the clientCertificateThumbprints value - */ - public List clientCertificateThumbprints() { - return this.clientCertificateThumbprints; - } - - /** - * Set the clientCertificateThumbprints value. - * - * @param clientCertificateThumbprints the clientCertificateThumbprints value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withClientCertificateThumbprints(List clientCertificateThumbprints) { - this.clientCertificateThumbprints = clientCertificateThumbprints; - return this; - } - - /** - * Get the clientCertificateCommonNames value. - * - * @return the clientCertificateCommonNames value - */ - public List clientCertificateCommonNames() { - return this.clientCertificateCommonNames; - } - - /** - * Set the clientCertificateCommonNames value. - * - * @param clientCertificateCommonNames the clientCertificateCommonNames value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withClientCertificateCommonNames(List clientCertificateCommonNames) { - this.clientCertificateCommonNames = clientCertificateCommonNames; - return this; - } - - /** - * Get the fabricSettings value. - * - * @return the fabricSettings value - */ - public List fabricSettings() { - return this.fabricSettings; - } - - /** - * Set the fabricSettings value. - * - * @param fabricSettings the fabricSettings value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withFabricSettings(List fabricSettings) { - this.fabricSettings = fabricSettings; - return this; - } - - /** - * Get the reverseProxyCertificate value. - * - * @return the reverseProxyCertificate value - */ - public CertificateDescription reverseProxyCertificate() { - return this.reverseProxyCertificate; - } - - /** - * Set the reverseProxyCertificate value. - * - * @param reverseProxyCertificate the reverseProxyCertificate value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withReverseProxyCertificate(CertificateDescription reverseProxyCertificate) { - this.reverseProxyCertificate = reverseProxyCertificate; - return this; - } - - /** - * Get the nodeTypes value. - * - * @return the nodeTypes value - */ - public List nodeTypes() { - return this.nodeTypes; - } - - /** - * Set the nodeTypes value. - * - * @param nodeTypes the nodeTypes value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withNodeTypes(List nodeTypes) { - this.nodeTypes = nodeTypes; - return this; - } - - /** - * Get the upgradeDescription value. - * - * @return the upgradeDescription value - */ - public ClusterUpgradePolicy upgradeDescription() { - return this.upgradeDescription; - } - - /** - * Set the upgradeDescription value. - * - * @param upgradeDescription the upgradeDescription value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withUpgradeDescription(ClusterUpgradePolicy upgradeDescription) { - this.upgradeDescription = upgradeDescription; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the ClusterUpdateParametersInner object itself. - */ - public ClusterUpdateParametersInner withTags(Map tags) { - this.tags = tags; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterVersionsInner.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterVersionsInner.java deleted file mode 100644 index 8edff88e52b..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClusterVersionsInner.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ClusterVersions. - */ -public class ClusterVersionsInner { - /** The Retrofit service to perform REST calls. */ - private ClusterVersionsService service; - /** The service client containing this operation class. */ - private ServiceFabricManagementClientImpl client; - - /** - * Initializes an instance of ClusterVersionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ClusterVersionsInner(Retrofit retrofit, ServiceFabricManagementClientImpl client) { - this.service = retrofit.create(ClusterVersionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ClusterVersions to be - * used by Retrofit to perform actually REST calls. - */ - interface ClusterVersionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.ClusterVersions list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions") - Observable> list(@Path("location") String location, @Path("environment") String environment, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.ClusterVersions listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List cluster code versions by location. - * - * @param location The location for the cluster code versions, this is different from cluster location - * @param environment Cluster operating system, the default means all. Possible values include: 'Default', 'Windows', 'Linux' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ClusterCodeVersionsResultInner> object if successful. - */ - public PagedList list(final String location, final String environment) { - ServiceResponse> response = listSinglePageAsync(location, environment).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List cluster code versions by location. - * - * @param location The location for the cluster code versions, this is different from cluster location - * @param environment Cluster operating system, the default means all. Possible values include: 'Default', 'Windows', 'Linux' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String location, final String environment, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(location, environment), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List cluster code versions by location. - * - * @param location The location for the cluster code versions, this is different from cluster location - * @param environment Cluster operating system, the default means all. Possible values include: 'Default', 'Windows', 'Linux' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterCodeVersionsResultInner> object - */ - public Observable> listAsync(final String location, final String environment) { - return listWithServiceResponseAsync(location, environment) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List cluster code versions by location. - * - * @param location The location for the cluster code versions, this is different from cluster location - * @param environment Cluster operating system, the default means all. Possible values include: 'Default', 'Windows', 'Linux' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterCodeVersionsResultInner> object - */ - public Observable>> listWithServiceResponseAsync(final String location, final String environment) { - return listSinglePageAsync(location, environment) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List cluster code versions by location. - * - ServiceResponse> * @param location The location for the cluster code versions, this is different from cluster location - ServiceResponse> * @param environment Cluster operating system, the default means all. Possible values include: 'Default', 'Windows', 'Linux' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ClusterCodeVersionsResultInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String location, final String environment) { - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (environment == null) { - throw new IllegalArgumentException("Parameter environment is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(location, environment, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List cluster code versions by location. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ClusterCodeVersionsResultInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List cluster code versions by location. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List cluster code versions by location. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterCodeVersionsResultInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List cluster code versions by location. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterCodeVersionsResultInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List cluster code versions by location. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ClusterCodeVersionsResultInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClustersInner.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClustersInner.java deleted file mode 100644 index b315a2d333a..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ClustersInner.java +++ /dev/null @@ -1,1071 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.servicefabric.ErrorModelException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Clusters. - */ -public class ClustersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private ClustersService service; - /** The service client containing this operation class. */ - private ServiceFabricManagementClientImpl client; - - /** - * Initializes an instance of ClustersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ClustersInner(Retrofit retrofit, ServiceFabricManagementClientImpl client) { - this.service = retrofit.create(ClustersService.class); - this.client = client; - } - - /** - * The interface defining all the services for Clusters to be - * used by Retrofit to perform actually REST calls. - */ - interface ClustersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body ClusterUpdateParametersInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters beginUpdate" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}") - Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body ClusterUpdateParametersInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}") - Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters beginCreate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}") - Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/clusters") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Clusters listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Update cluster configuration. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters The parameters which contains the property value and property name which used to update the cluster configuration - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorModelException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ClusterInner object if successful. - */ - public ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdateParametersInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body(); - } - - /** - * Update cluster configuration. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters The parameters which contains the property value and property name which used to update the cluster configuration - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String clusterName, ClusterUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); - } - - /** - * Update cluster configuration. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters The parameters which contains the property value and property name which used to update the cluster configuration - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateAsync(String resourceGroupName, String clusterName, ClusterUpdateParametersInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { - @Override - public ClusterInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update cluster configuration. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters The parameters which contains the property value and property name which used to update the cluster configuration - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (clusterName == null) { - throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.update(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Update cluster configuration. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters The parameters which contains the property value and property name which used to update the cluster configuration - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorModelException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ClusterInner object if successful. - */ - public ClusterInner beginUpdate(String resourceGroupName, String clusterName, ClusterUpdateParametersInner parameters) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); - } - - /** - * Update cluster configuration. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters The parameters which contains the property value and property name which used to update the cluster configuration - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String clusterName, ClusterUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); - } - - /** - * Update cluster configuration. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters The parameters which contains the property value and property name which used to update the cluster configuration - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ClusterInner object - */ - public Observable beginUpdateAsync(String resourceGroupName, String clusterName, ClusterUpdateParametersInner parameters) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { - @Override - public ClusterInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update cluster configuration. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters The parameters which contains the property value and property name which used to update the cluster configuration - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ClusterInner object - */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterUpdateParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (clusterName == null) { - throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginUpdate(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateDelegate(Response response) throws ErrorModelException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(ErrorModelException.class) - .build(response); - } - - /** - * Get cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorModelException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ClusterInner object if successful. - */ - public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); - } - - /** - * Get cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); - } - - /** - * Get cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ClusterInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String clusterName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, ClusterInner>() { - @Override - public ClusterInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ClusterInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String clusterName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (clusterName == null) { - throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorModelException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorModelException.class) - .build(response); - } - - /** - * Create cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters Put Request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorModelException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ClusterInner object if successful. - */ - public ClusterInner create(String resourceGroupName, String clusterName, ClusterInner parameters) { - return createWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body(); - } - - /** - * Create cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters Put Request - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); - } - - /** - * Create cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters Put Request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { - return createWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { - @Override - public ClusterInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters Put Request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (clusterName == null) { - throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.create(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters Put Request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorModelException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ClusterInner object if successful. - */ - public ClusterInner beginCreate(String resourceGroupName, String clusterName, ClusterInner parameters) { - return beginCreateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); - } - - /** - * Create cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters Put Request - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); - } - - /** - * Create cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters Put Request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ClusterInner object - */ - public Observable beginCreateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { - return beginCreateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { - @Override - public ClusterInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param parameters Put Request - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ClusterInner object - */ - public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (clusterName == null) { - throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreate(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateDelegate(Response response) throws ErrorModelException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(ErrorModelException.class) - .build(response); - } - - /** - * Delete cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorModelException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String clusterName) { - deleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); - } - - /** - * Delete cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); - } - - /** - * Delete cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String clusterName) { - return deleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Delete cluster resource. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param clusterName The name of the cluster resource - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (clusterName == null) { - throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.delete(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws ErrorModelException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(ErrorModelException.class) - .build(response); - } - - /** - * List cluster resource by resource group. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ClusterInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List cluster resource by resource group. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List cluster resource by resource group. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List cluster resource by resource group. - * - * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List cluster resource by resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group to which the resource belongs or get created - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List cluster resource. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ClusterInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List cluster resource. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List cluster resource. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List cluster resource. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List cluster resource. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List cluster resource by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ClusterInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List cluster resource by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List cluster resource by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List cluster resource by resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List cluster resource by resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List cluster resource. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<ClusterInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List cluster resource. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List cluster resource. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List cluster resource. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ClusterInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List cluster resource. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/OperationResultInner.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/OperationResultInner.java deleted file mode 100644 index 7dced4689cb..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/OperationResultInner.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import com.microsoft.azure.management.servicefabric.AvailableOperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Available operation list result. - */ -public class OperationResultInner { - /** - * Result name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Dispaly of the result. - */ - @JsonProperty(value = "display") - private AvailableOperationDisplay display; - - /** - * Origin result. - */ - @JsonProperty(value = "origin") - private String origin; - - /** - * The URL to use for getting the next set of results. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the OperationResultInner object itself. - */ - public OperationResultInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display value. - * - * @return the display value - */ - public AvailableOperationDisplay display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the OperationResultInner object itself. - */ - public OperationResultInner withDisplay(AvailableOperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin value. - * - * @return the origin value - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin value. - * - * @param origin the origin value to set - * @return the OperationResultInner object itself. - */ - public OperationResultInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink value. - * - * @param nextLink the nextLink value to set - * @return the OperationResultInner object itself. - */ - public OperationResultInner withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/OperationsInner.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/OperationsInner.java deleted file mode 100644 index 43577dcca07..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/OperationsInner.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.servicefabric.ErrorModelException; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private ServiceFabricManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, ServiceFabricManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Operations list" }) - @GET("providers/Microsoft.ServiceFabric/operations") - Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicefabric.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorModelException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationResultInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationResultInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationResultInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationResultInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws ErrorModelException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorModelException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorModelException.class) - .build(response); - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorModelException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationResultInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationResultInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationResultInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available ServiceFabric REST API operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationResultInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws ErrorModelException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorModelException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(ErrorModelException.class) - .build(response); - } - -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/PageImpl.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/PageImpl.java deleted file mode 100644 index 212053fb5f0..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ServiceFabricManagementClientImpl.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ServiceFabricManagementClientImpl.java deleted file mode 100644 index e9ff9452b8a..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ServiceFabricManagementClientImpl.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the ServiceFabricManagementClientImpl class. - */ -public class ServiceFabricManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** The customer subscription identifier. */ - private String subscriptionId; - - /** - * Gets The customer subscription identifier. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets The customer subscription identifier. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public ServiceFabricManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** The version of the ServiceFabric resouce provider api. */ - private String apiVersion; - - /** - * Gets The version of the ServiceFabric resouce provider api. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public ServiceFabricManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public ServiceFabricManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public ServiceFabricManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The ClustersInner object to access its operations. - */ - private ClustersInner clusters; - - /** - * Gets the ClustersInner object to access its operations. - * @return the ClustersInner object. - */ - public ClustersInner clusters() { - return this.clusters; - } - - /** - * The ClusterVersionsInner object to access its operations. - */ - private ClusterVersionsInner clusterVersions; - - /** - * Gets the ClusterVersionsInner object to access its operations. - * @return the ClusterVersionsInner object. - */ - public ClusterVersionsInner clusterVersions() { - return this.clusterVersions; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * Initializes an instance of ServiceFabricManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public ServiceFabricManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of ServiceFabricManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public ServiceFabricManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of ServiceFabricManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public ServiceFabricManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2016-09-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.clusters = new ClustersInner(restClient().retrofit(), this); - this.clusterVersions = new ClusterVersionsInner(restClient().retrofit(), this); - this.operations = new OperationsInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "ServiceFabricManagementClient", "2016-09-01"); - } -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ServiceFabricManager.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ServiceFabricManager.java deleted file mode 100644 index 86142dc4c0b..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/ServiceFabricManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.servicefabric.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure ServiceFabric resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class ServiceFabricManager extends Manager { - /** - * Get a Configurable instance that can be used to create ServiceFabricManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new ServiceFabricManager.ConfigurableImpl(); - } - /** - * Creates an instance of ServiceFabricManager that exposes ServiceFabric resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the ServiceFabricManager - */ - public static ServiceFabricManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new ServiceFabricManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of ServiceFabricManager that exposes ServiceFabric resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the ServiceFabricManager - */ - public static ServiceFabricManager authenticate(RestClient restClient, String subscriptionId) { - return new ServiceFabricManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of ServiceFabricManager that exposes ServiceFabric management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing ServiceFabric management API entry points that work across subscriptions - */ - ServiceFabricManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public ServiceFabricManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return ServiceFabricManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private ServiceFabricManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new ServiceFabricManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/package-info.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/package-info.java deleted file mode 100644 index 6e32883f35a..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/implementation/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for ServiceFabricManagementClient. - */ -package com.microsoft.azure.management.servicefabric.implementation; diff --git a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/package-info.java b/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/package-info.java deleted file mode 100644 index 9100366d84b..00000000000 --- a/azure-mgmt-servicefabric/src/main/java/com/microsoft/azure/management/servicefabric/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for ServiceFabricManagementClient. - */ -package com.microsoft.azure.management.servicefabric; diff --git a/azure-mgmt-streamanalytics/pom.xml b/azure-mgmt-streamanalytics/pom.xml deleted file mode 100755 index 6f34d24b20c..00000000000 --- a/azure-mgmt-streamanalytics/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - com.microsoft.azure - azure-parent - 1.13.1-SNAPSHOT - ../pom.xml - - azure-mgmt-streamanalytics - 1.12.2-beta-SNAPSHOT - jar - Microsoft Azure SDK for StreamAnalytics Management - This package contains Microsoft StreamAnalytics Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-mgmt-resources - 1.13.1-SNAPSHOT - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AvroSerialization.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AvroSerialization.java deleted file mode 100755 index a724cfd88f2..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AvroSerialization.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Describes how data from an input is serialized or how data is serialized - * when written to an output in Avro format. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Avro") -public class AvroSerialization extends Serialization { - /** - * The properties that are associated with the Avro serialization type. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * Get the properties value. - * - * @return the properties value - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the AvroSerialization object itself. - */ - public AvroSerialization withProperties(Object properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceFunctionBinding.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceFunctionBinding.java deleted file mode 100755 index ef1edfaa325..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceFunctionBinding.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * The binding to an Azure Machine Learning web service. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.MachineLearning/WebService") -@JsonFlatten -public class AzureMachineLearningWebServiceFunctionBinding extends FunctionBinding { - /** - * The Request-Response execute endpoint of the Azure Machine Learning web - * service. Find out more here: - * https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs. - */ - @JsonProperty(value = "properties.endpoint") - private String endpoint; - - /** - * The API key used to authenticate with Request-Response endpoint. - */ - @JsonProperty(value = "properties.apiKey") - private String apiKey; - - /** - * The inputs for the Azure Machine Learning web service endpoint. - */ - @JsonProperty(value = "properties.inputs") - private AzureMachineLearningWebServiceInputs inputs; - - /** - * A list of outputs from the Azure Machine Learning web service endpoint - * execution. - */ - @JsonProperty(value = "properties.outputs") - private List outputs; - - /** - * Number between 1 and 10000 describing maximum number of rows for every - * Azure ML RRS execute request. Default is 1000. - */ - @JsonProperty(value = "properties.batchSize") - private Integer batchSize; - - /** - * Get the endpoint value. - * - * @return the endpoint value - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint value. - * - * @param endpoint the endpoint value to set - * @return the AzureMachineLearningWebServiceFunctionBinding object itself. - */ - public AzureMachineLearningWebServiceFunctionBinding withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the apiKey value. - * - * @return the apiKey value - */ - public String apiKey() { - return this.apiKey; - } - - /** - * Set the apiKey value. - * - * @param apiKey the apiKey value to set - * @return the AzureMachineLearningWebServiceFunctionBinding object itself. - */ - public AzureMachineLearningWebServiceFunctionBinding withApiKey(String apiKey) { - this.apiKey = apiKey; - return this; - } - - /** - * Get the inputs value. - * - * @return the inputs value - */ - public AzureMachineLearningWebServiceInputs inputs() { - return this.inputs; - } - - /** - * Set the inputs value. - * - * @param inputs the inputs value to set - * @return the AzureMachineLearningWebServiceFunctionBinding object itself. - */ - public AzureMachineLearningWebServiceFunctionBinding withInputs(AzureMachineLearningWebServiceInputs inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the outputs value. - * - * @return the outputs value - */ - public List outputs() { - return this.outputs; - } - - /** - * Set the outputs value. - * - * @param outputs the outputs value to set - * @return the AzureMachineLearningWebServiceFunctionBinding object itself. - */ - public AzureMachineLearningWebServiceFunctionBinding withOutputs(List outputs) { - this.outputs = outputs; - return this; - } - - /** - * Get the batchSize value. - * - * @return the batchSize value - */ - public Integer batchSize() { - return this.batchSize; - } - - /** - * Set the batchSize value. - * - * @param batchSize the batchSize value to set - * @return the AzureMachineLearningWebServiceFunctionBinding object itself. - */ - public AzureMachineLearningWebServiceFunctionBinding withBatchSize(Integer batchSize) { - this.batchSize = batchSize; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.java deleted file mode 100755 index edcbca35a25..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.streamanalytics.implementation.FunctionRetrieveDefaultDefinitionParametersInner; - -/** - * The parameters needed to retrieve the default function definition for an - * Azure Machine Learning web service function. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "bindingType") -@JsonTypeName("Microsoft.MachineLearning/WebService") -@JsonFlatten -public class AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters extends FunctionRetrieveDefaultDefinitionParametersInner { - /** - * The Request-Response execute endpoint of the Azure Machine Learning web - * service. Find out more here: - * https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs. - */ - @JsonProperty(value = "bindingRetrievalProperties.executeEndpoint") - private String executeEndpoint; - - /** - * The function type. Possible values include: 'Scalar'. - */ - @JsonProperty(value = "bindingRetrievalProperties.udfType") - private UdfType udfType; - - /** - * Get the executeEndpoint value. - * - * @return the executeEndpoint value - */ - public String executeEndpoint() { - return this.executeEndpoint; - } - - /** - * Set the executeEndpoint value. - * - * @param executeEndpoint the executeEndpoint value to set - * @return the AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters object itself. - */ - public AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters withExecuteEndpoint(String executeEndpoint) { - this.executeEndpoint = executeEndpoint; - return this; - } - - /** - * Get the udfType value. - * - * @return the udfType value - */ - public UdfType udfType() { - return this.udfType; - } - - /** - * Set the udfType value. - * - * @param udfType the udfType value to set - * @return the AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters object itself. - */ - public AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters withUdfType(UdfType udfType) { - this.udfType = udfType; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceInputColumn.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceInputColumn.java deleted file mode 100755 index 89d0bb6b5c5..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceInputColumn.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes an input column for the Azure Machine Learning web service - * endpoint. - */ -public class AzureMachineLearningWebServiceInputColumn { - /** - * The name of the input column. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The (Azure Machine Learning supported) data type of the input column. A - * list of valid Azure Machine Learning data types are described at - * https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx . - */ - @JsonProperty(value = "dataType") - private String dataType; - - /** - * The zero based index of the function parameter this input maps to. - */ - @JsonProperty(value = "mapTo") - private Integer mapTo; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the AzureMachineLearningWebServiceInputColumn object itself. - */ - public AzureMachineLearningWebServiceInputColumn withName(String name) { - this.name = name; - return this; - } - - /** - * Get the dataType value. - * - * @return the dataType value - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType value. - * - * @param dataType the dataType value to set - * @return the AzureMachineLearningWebServiceInputColumn object itself. - */ - public AzureMachineLearningWebServiceInputColumn withDataType(String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Get the mapTo value. - * - * @return the mapTo value - */ - public Integer mapTo() { - return this.mapTo; - } - - /** - * Set the mapTo value. - * - * @param mapTo the mapTo value to set - * @return the AzureMachineLearningWebServiceInputColumn object itself. - */ - public AzureMachineLearningWebServiceInputColumn withMapTo(Integer mapTo) { - this.mapTo = mapTo; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceInputs.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceInputs.java deleted file mode 100755 index 47fa675287f..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceInputs.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The inputs for the Azure Machine Learning web service endpoint. - */ -public class AzureMachineLearningWebServiceInputs { - /** - * The name of the input. This is the name provided while authoring the - * endpoint. - */ - @JsonProperty(value = "name") - private String name; - - /** - * A list of input columns for the Azure Machine Learning web service - * endpoint. - */ - @JsonProperty(value = "columnNames") - private List columnNames; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the AzureMachineLearningWebServiceInputs object itself. - */ - public AzureMachineLearningWebServiceInputs withName(String name) { - this.name = name; - return this; - } - - /** - * Get the columnNames value. - * - * @return the columnNames value - */ - public List columnNames() { - return this.columnNames; - } - - /** - * Set the columnNames value. - * - * @param columnNames the columnNames value to set - * @return the AzureMachineLearningWebServiceInputs object itself. - */ - public AzureMachineLearningWebServiceInputs withColumnNames(List columnNames) { - this.columnNames = columnNames; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceOutputColumn.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceOutputColumn.java deleted file mode 100755 index b02747f78a8..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureMachineLearningWebServiceOutputColumn.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes an output column for the Azure Machine Learning web service - * endpoint. - */ -public class AzureMachineLearningWebServiceOutputColumn { - /** - * The name of the output column. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The (Azure Machine Learning supported) data type of the output column. A - * list of valid Azure Machine Learning data types are described at - * https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx . - */ - @JsonProperty(value = "dataType") - private String dataType; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the AzureMachineLearningWebServiceOutputColumn object itself. - */ - public AzureMachineLearningWebServiceOutputColumn withName(String name) { - this.name = name; - return this; - } - - /** - * Get the dataType value. - * - * @return the dataType value - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType value. - * - * @param dataType the dataType value to set - * @return the AzureMachineLearningWebServiceOutputColumn object itself. - */ - public AzureMachineLearningWebServiceOutputColumn withDataType(String dataType) { - this.dataType = dataType; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureSqlDatabaseDataSourceProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureSqlDatabaseDataSourceProperties.java deleted file mode 100755 index 02673d91e8e..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureSqlDatabaseDataSourceProperties.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties that are associated with an Azure SQL database data source. - */ -public class AzureSqlDatabaseDataSourceProperties { - /** - * The name of the SQL server containing the Azure SQL database. Required - * on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "server") - private String server; - - /** - * The name of the Azure SQL database. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "database") - private String database; - - /** - * The user name that will be used to connect to the Azure SQL database. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "user") - private String user; - - /** - * The password that will be used to connect to the Azure SQL database. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "password") - private String password; - - /** - * The name of the table in the Azure SQL database. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "table") - private String table; - - /** - * Get the server value. - * - * @return the server value - */ - public String server() { - return this.server; - } - - /** - * Set the server value. - * - * @param server the server value to set - * @return the AzureSqlDatabaseDataSourceProperties object itself. - */ - public AzureSqlDatabaseDataSourceProperties withServer(String server) { - this.server = server; - return this; - } - - /** - * Get the database value. - * - * @return the database value - */ - public String database() { - return this.database; - } - - /** - * Set the database value. - * - * @param database the database value to set - * @return the AzureSqlDatabaseDataSourceProperties object itself. - */ - public AzureSqlDatabaseDataSourceProperties withDatabase(String database) { - this.database = database; - return this; - } - - /** - * Get the user value. - * - * @return the user value - */ - public String user() { - return this.user; - } - - /** - * Set the user value. - * - * @param user the user value to set - * @return the AzureSqlDatabaseDataSourceProperties object itself. - */ - public AzureSqlDatabaseDataSourceProperties withUser(String user) { - this.user = user; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the AzureSqlDatabaseDataSourceProperties object itself. - */ - public AzureSqlDatabaseDataSourceProperties withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the table value. - * - * @return the table value - */ - public String table() { - return this.table; - } - - /** - * Set the table value. - * - * @param table the table value to set - * @return the AzureSqlDatabaseDataSourceProperties object itself. - */ - public AzureSqlDatabaseDataSourceProperties withTable(String table) { - this.table = table; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureSqlDatabaseOutputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureSqlDatabaseOutputDataSource.java deleted file mode 100755 index b8c7db184b0..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureSqlDatabaseOutputDataSource.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes an Azure SQL database output data source. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.Sql/Server/Database") -@JsonFlatten -public class AzureSqlDatabaseOutputDataSource extends OutputDataSource { - /** - * The name of the SQL server containing the Azure SQL database. Required - * on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.server") - private String server; - - /** - * The name of the Azure SQL database. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.database") - private String database; - - /** - * The user name that will be used to connect to the Azure SQL database. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.user") - private String user; - - /** - * The password that will be used to connect to the Azure SQL database. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.password") - private String password; - - /** - * The name of the table in the Azure SQL database. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.table") - private String table; - - /** - * Get the server value. - * - * @return the server value - */ - public String server() { - return this.server; - } - - /** - * Set the server value. - * - * @param server the server value to set - * @return the AzureSqlDatabaseOutputDataSource object itself. - */ - public AzureSqlDatabaseOutputDataSource withServer(String server) { - this.server = server; - return this; - } - - /** - * Get the database value. - * - * @return the database value - */ - public String database() { - return this.database; - } - - /** - * Set the database value. - * - * @param database the database value to set - * @return the AzureSqlDatabaseOutputDataSource object itself. - */ - public AzureSqlDatabaseOutputDataSource withDatabase(String database) { - this.database = database; - return this; - } - - /** - * Get the user value. - * - * @return the user value - */ - public String user() { - return this.user; - } - - /** - * Set the user value. - * - * @param user the user value to set - * @return the AzureSqlDatabaseOutputDataSource object itself. - */ - public AzureSqlDatabaseOutputDataSource withUser(String user) { - this.user = user; - return this; - } - - /** - * Get the password value. - * - * @return the password value - */ - public String password() { - return this.password; - } - - /** - * Set the password value. - * - * @param password the password value to set - * @return the AzureSqlDatabaseOutputDataSource object itself. - */ - public AzureSqlDatabaseOutputDataSource withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the table value. - * - * @return the table value - */ - public String table() { - return this.table; - } - - /** - * Set the table value. - * - * @param table the table value to set - * @return the AzureSqlDatabaseOutputDataSource object itself. - */ - public AzureSqlDatabaseOutputDataSource withTable(String table) { - this.table = table; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureTableOutputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureTableOutputDataSource.java deleted file mode 100755 index c2df7eb0a6b..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/AzureTableOutputDataSource.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes an Azure Table data source. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.Storage/Table") -@JsonFlatten -public class AzureTableOutputDataSource extends OutputDataSource { - /** - * The name of the Azure Storage account. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.accountName") - private String accountName; - - /** - * The account key for the Azure Storage account. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.accountKey") - private String accountKey; - - /** - * The name of the Azure Table. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.table") - private String table; - - /** - * This element indicates the name of a column from the SELECT statement in - * the query that will be used as the partition key for the Azure Table. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.partitionKey") - private String partitionKey; - - /** - * This element indicates the name of a column from the SELECT statement in - * the query that will be used as the row key for the Azure Table. Required - * on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.rowKey") - private String rowKey; - - /** - * If specified, each item in the array is the name of a column to remove - * (if present) from output event entities. - */ - @JsonProperty(value = "properties.columnsToRemove") - private List columnsToRemove; - - /** - * The number of rows to write to the Azure Table at a time. - */ - @JsonProperty(value = "properties.batchSize") - private Integer batchSize; - - /** - * Get the accountName value. - * - * @return the accountName value - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName value. - * - * @param accountName the accountName value to set - * @return the AzureTableOutputDataSource object itself. - */ - public AzureTableOutputDataSource withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the accountKey value. - * - * @return the accountKey value - */ - public String accountKey() { - return this.accountKey; - } - - /** - * Set the accountKey value. - * - * @param accountKey the accountKey value to set - * @return the AzureTableOutputDataSource object itself. - */ - public AzureTableOutputDataSource withAccountKey(String accountKey) { - this.accountKey = accountKey; - return this; - } - - /** - * Get the table value. - * - * @return the table value - */ - public String table() { - return this.table; - } - - /** - * Set the table value. - * - * @param table the table value to set - * @return the AzureTableOutputDataSource object itself. - */ - public AzureTableOutputDataSource withTable(String table) { - this.table = table; - return this; - } - - /** - * Get the partitionKey value. - * - * @return the partitionKey value - */ - public String partitionKey() { - return this.partitionKey; - } - - /** - * Set the partitionKey value. - * - * @param partitionKey the partitionKey value to set - * @return the AzureTableOutputDataSource object itself. - */ - public AzureTableOutputDataSource withPartitionKey(String partitionKey) { - this.partitionKey = partitionKey; - return this; - } - - /** - * Get the rowKey value. - * - * @return the rowKey value - */ - public String rowKey() { - return this.rowKey; - } - - /** - * Set the rowKey value. - * - * @param rowKey the rowKey value to set - * @return the AzureTableOutputDataSource object itself. - */ - public AzureTableOutputDataSource withRowKey(String rowKey) { - this.rowKey = rowKey; - return this; - } - - /** - * Get the columnsToRemove value. - * - * @return the columnsToRemove value - */ - public List columnsToRemove() { - return this.columnsToRemove; - } - - /** - * Set the columnsToRemove value. - * - * @param columnsToRemove the columnsToRemove value to set - * @return the AzureTableOutputDataSource object itself. - */ - public AzureTableOutputDataSource withColumnsToRemove(List columnsToRemove) { - this.columnsToRemove = columnsToRemove; - return this; - } - - /** - * Get the batchSize value. - * - * @return the batchSize value - */ - public Integer batchSize() { - return this.batchSize; - } - - /** - * Set the batchSize value. - * - * @param batchSize the batchSize value to set - * @return the AzureTableOutputDataSource object itself. - */ - public AzureTableOutputDataSource withBatchSize(Integer batchSize) { - this.batchSize = batchSize; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobDataSourceProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobDataSourceProperties.java deleted file mode 100755 index bffaa9e7d77..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobDataSourceProperties.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties that are associated with a blob data source. - */ -public class BlobDataSourceProperties { - /** - * A list of one or more Azure Storage accounts. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "storageAccounts") - private List storageAccounts; - - /** - * The name of a container within the associated Storage account. This - * container contains either the blob(s) to be read from or written to. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "container") - private String container; - - /** - * The blob path pattern. Not a regular expression. It represents a pattern - * against which blob names will be matched to determine whether or not - * they should be included as input or output to the job. See - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - * or - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output - * for a more detailed explanation and example. - */ - @JsonProperty(value = "pathPattern") - private String pathPattern; - - /** - * The date format. Wherever {date} appears in pathPattern, the value of - * this property is used as the date format instead. - */ - @JsonProperty(value = "dateFormat") - private String dateFormat; - - /** - * The time format. Wherever {time} appears in pathPattern, the value of - * this property is used as the time format instead. - */ - @JsonProperty(value = "timeFormat") - private String timeFormat; - - /** - * Get the storageAccounts value. - * - * @return the storageAccounts value - */ - public List storageAccounts() { - return this.storageAccounts; - } - - /** - * Set the storageAccounts value. - * - * @param storageAccounts the storageAccounts value to set - * @return the BlobDataSourceProperties object itself. - */ - public BlobDataSourceProperties withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; - return this; - } - - /** - * Get the container value. - * - * @return the container value - */ - public String container() { - return this.container; - } - - /** - * Set the container value. - * - * @param container the container value to set - * @return the BlobDataSourceProperties object itself. - */ - public BlobDataSourceProperties withContainer(String container) { - this.container = container; - return this; - } - - /** - * Get the pathPattern value. - * - * @return the pathPattern value - */ - public String pathPattern() { - return this.pathPattern; - } - - /** - * Set the pathPattern value. - * - * @param pathPattern the pathPattern value to set - * @return the BlobDataSourceProperties object itself. - */ - public BlobDataSourceProperties withPathPattern(String pathPattern) { - this.pathPattern = pathPattern; - return this; - } - - /** - * Get the dateFormat value. - * - * @return the dateFormat value - */ - public String dateFormat() { - return this.dateFormat; - } - - /** - * Set the dateFormat value. - * - * @param dateFormat the dateFormat value to set - * @return the BlobDataSourceProperties object itself. - */ - public BlobDataSourceProperties withDateFormat(String dateFormat) { - this.dateFormat = dateFormat; - return this; - } - - /** - * Get the timeFormat value. - * - * @return the timeFormat value - */ - public String timeFormat() { - return this.timeFormat; - } - - /** - * Set the timeFormat value. - * - * @param timeFormat the timeFormat value to set - * @return the BlobDataSourceProperties object itself. - */ - public BlobDataSourceProperties withTimeFormat(String timeFormat) { - this.timeFormat = timeFormat; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobOutputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobOutputDataSource.java deleted file mode 100755 index 5cff49ffa88..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobOutputDataSource.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes a blob output data source. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.Storage/Blob") -@JsonFlatten -public class BlobOutputDataSource extends OutputDataSource { - /** - * A list of one or more Azure Storage accounts. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.storageAccounts") - private List storageAccounts; - - /** - * The name of a container within the associated Storage account. This - * container contains either the blob(s) to be read from or written to. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.container") - private String container; - - /** - * The blob path pattern. Not a regular expression. It represents a pattern - * against which blob names will be matched to determine whether or not - * they should be included as input or output to the job. See - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - * or - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output - * for a more detailed explanation and example. - */ - @JsonProperty(value = "properties.pathPattern") - private String pathPattern; - - /** - * The date format. Wherever {date} appears in pathPattern, the value of - * this property is used as the date format instead. - */ - @JsonProperty(value = "properties.dateFormat") - private String dateFormat; - - /** - * The time format. Wherever {time} appears in pathPattern, the value of - * this property is used as the time format instead. - */ - @JsonProperty(value = "properties.timeFormat") - private String timeFormat; - - /** - * Get the storageAccounts value. - * - * @return the storageAccounts value - */ - public List storageAccounts() { - return this.storageAccounts; - } - - /** - * Set the storageAccounts value. - * - * @param storageAccounts the storageAccounts value to set - * @return the BlobOutputDataSource object itself. - */ - public BlobOutputDataSource withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; - return this; - } - - /** - * Get the container value. - * - * @return the container value - */ - public String container() { - return this.container; - } - - /** - * Set the container value. - * - * @param container the container value to set - * @return the BlobOutputDataSource object itself. - */ - public BlobOutputDataSource withContainer(String container) { - this.container = container; - return this; - } - - /** - * Get the pathPattern value. - * - * @return the pathPattern value - */ - public String pathPattern() { - return this.pathPattern; - } - - /** - * Set the pathPattern value. - * - * @param pathPattern the pathPattern value to set - * @return the BlobOutputDataSource object itself. - */ - public BlobOutputDataSource withPathPattern(String pathPattern) { - this.pathPattern = pathPattern; - return this; - } - - /** - * Get the dateFormat value. - * - * @return the dateFormat value - */ - public String dateFormat() { - return this.dateFormat; - } - - /** - * Set the dateFormat value. - * - * @param dateFormat the dateFormat value to set - * @return the BlobOutputDataSource object itself. - */ - public BlobOutputDataSource withDateFormat(String dateFormat) { - this.dateFormat = dateFormat; - return this; - } - - /** - * Get the timeFormat value. - * - * @return the timeFormat value - */ - public String timeFormat() { - return this.timeFormat; - } - - /** - * Set the timeFormat value. - * - * @param timeFormat the timeFormat value to set - * @return the BlobOutputDataSource object itself. - */ - public BlobOutputDataSource withTimeFormat(String timeFormat) { - this.timeFormat = timeFormat; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobReferenceInputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobReferenceInputDataSource.java deleted file mode 100755 index c47952a669f..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobReferenceInputDataSource.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes a blob input data source that contains reference data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.Storage/Blob") -@JsonFlatten -public class BlobReferenceInputDataSource extends ReferenceInputDataSource { - /** - * A list of one or more Azure Storage accounts. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.storageAccounts") - private List storageAccounts; - - /** - * The name of a container within the associated Storage account. This - * container contains either the blob(s) to be read from or written to. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.container") - private String container; - - /** - * The blob path pattern. Not a regular expression. It represents a pattern - * against which blob names will be matched to determine whether or not - * they should be included as input or output to the job. See - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - * or - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output - * for a more detailed explanation and example. - */ - @JsonProperty(value = "properties.pathPattern") - private String pathPattern; - - /** - * The date format. Wherever {date} appears in pathPattern, the value of - * this property is used as the date format instead. - */ - @JsonProperty(value = "properties.dateFormat") - private String dateFormat; - - /** - * The time format. Wherever {time} appears in pathPattern, the value of - * this property is used as the time format instead. - */ - @JsonProperty(value = "properties.timeFormat") - private String timeFormat; - - /** - * Get the storageAccounts value. - * - * @return the storageAccounts value - */ - public List storageAccounts() { - return this.storageAccounts; - } - - /** - * Set the storageAccounts value. - * - * @param storageAccounts the storageAccounts value to set - * @return the BlobReferenceInputDataSource object itself. - */ - public BlobReferenceInputDataSource withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; - return this; - } - - /** - * Get the container value. - * - * @return the container value - */ - public String container() { - return this.container; - } - - /** - * Set the container value. - * - * @param container the container value to set - * @return the BlobReferenceInputDataSource object itself. - */ - public BlobReferenceInputDataSource withContainer(String container) { - this.container = container; - return this; - } - - /** - * Get the pathPattern value. - * - * @return the pathPattern value - */ - public String pathPattern() { - return this.pathPattern; - } - - /** - * Set the pathPattern value. - * - * @param pathPattern the pathPattern value to set - * @return the BlobReferenceInputDataSource object itself. - */ - public BlobReferenceInputDataSource withPathPattern(String pathPattern) { - this.pathPattern = pathPattern; - return this; - } - - /** - * Get the dateFormat value. - * - * @return the dateFormat value - */ - public String dateFormat() { - return this.dateFormat; - } - - /** - * Set the dateFormat value. - * - * @param dateFormat the dateFormat value to set - * @return the BlobReferenceInputDataSource object itself. - */ - public BlobReferenceInputDataSource withDateFormat(String dateFormat) { - this.dateFormat = dateFormat; - return this; - } - - /** - * Get the timeFormat value. - * - * @return the timeFormat value - */ - public String timeFormat() { - return this.timeFormat; - } - - /** - * Set the timeFormat value. - * - * @param timeFormat the timeFormat value to set - * @return the BlobReferenceInputDataSource object itself. - */ - public BlobReferenceInputDataSource withTimeFormat(String timeFormat) { - this.timeFormat = timeFormat; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobStreamInputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobStreamInputDataSource.java deleted file mode 100755 index 844c2a2c784..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/BlobStreamInputDataSource.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes a blob input data source that contains stream data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.Storage/Blob") -@JsonFlatten -public class BlobStreamInputDataSource extends StreamInputDataSource { - /** - * A list of one or more Azure Storage accounts. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.storageAccounts") - private List storageAccounts; - - /** - * The name of a container within the associated Storage account. This - * container contains either the blob(s) to be read from or written to. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.container") - private String container; - - /** - * The blob path pattern. Not a regular expression. It represents a pattern - * against which blob names will be matched to determine whether or not - * they should be included as input or output to the job. See - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - * or - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output - * for a more detailed explanation and example. - */ - @JsonProperty(value = "properties.pathPattern") - private String pathPattern; - - /** - * The date format. Wherever {date} appears in pathPattern, the value of - * this property is used as the date format instead. - */ - @JsonProperty(value = "properties.dateFormat") - private String dateFormat; - - /** - * The time format. Wherever {time} appears in pathPattern, the value of - * this property is used as the time format instead. - */ - @JsonProperty(value = "properties.timeFormat") - private String timeFormat; - - /** - * The partition count of the blob input data source. Range 1 - 256. - */ - @JsonProperty(value = "properties.sourcePartitionCount") - private Integer sourcePartitionCount; - - /** - * Get the storageAccounts value. - * - * @return the storageAccounts value - */ - public List storageAccounts() { - return this.storageAccounts; - } - - /** - * Set the storageAccounts value. - * - * @param storageAccounts the storageAccounts value to set - * @return the BlobStreamInputDataSource object itself. - */ - public BlobStreamInputDataSource withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; - return this; - } - - /** - * Get the container value. - * - * @return the container value - */ - public String container() { - return this.container; - } - - /** - * Set the container value. - * - * @param container the container value to set - * @return the BlobStreamInputDataSource object itself. - */ - public BlobStreamInputDataSource withContainer(String container) { - this.container = container; - return this; - } - - /** - * Get the pathPattern value. - * - * @return the pathPattern value - */ - public String pathPattern() { - return this.pathPattern; - } - - /** - * Set the pathPattern value. - * - * @param pathPattern the pathPattern value to set - * @return the BlobStreamInputDataSource object itself. - */ - public BlobStreamInputDataSource withPathPattern(String pathPattern) { - this.pathPattern = pathPattern; - return this; - } - - /** - * Get the dateFormat value. - * - * @return the dateFormat value - */ - public String dateFormat() { - return this.dateFormat; - } - - /** - * Set the dateFormat value. - * - * @param dateFormat the dateFormat value to set - * @return the BlobStreamInputDataSource object itself. - */ - public BlobStreamInputDataSource withDateFormat(String dateFormat) { - this.dateFormat = dateFormat; - return this; - } - - /** - * Get the timeFormat value. - * - * @return the timeFormat value - */ - public String timeFormat() { - return this.timeFormat; - } - - /** - * Set the timeFormat value. - * - * @param timeFormat the timeFormat value to set - * @return the BlobStreamInputDataSource object itself. - */ - public BlobStreamInputDataSource withTimeFormat(String timeFormat) { - this.timeFormat = timeFormat; - return this; - } - - /** - * Get the sourcePartitionCount value. - * - * @return the sourcePartitionCount value - */ - public Integer sourcePartitionCount() { - return this.sourcePartitionCount; - } - - /** - * Set the sourcePartitionCount value. - * - * @param sourcePartitionCount the sourcePartitionCount value to set - * @return the BlobStreamInputDataSource object itself. - */ - public BlobStreamInputDataSource withSourcePartitionCount(Integer sourcePartitionCount) { - this.sourcePartitionCount = sourcePartitionCount; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/CompatibilityLevel.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/CompatibilityLevel.java deleted file mode 100755 index c9b5db28155..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/CompatibilityLevel.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for CompatibilityLevel. - */ -public final class CompatibilityLevel { - /** Static value 1.0 for CompatibilityLevel. */ - public static final CompatibilityLevel ONE_FULL_STOP_ZERO = new CompatibilityLevel("1.0"); - - private String value; - - /** - * Creates a custom value for CompatibilityLevel. - * @param value the custom value - */ - public CompatibilityLevel(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof CompatibilityLevel)) { - return false; - } - if (obj == this) { - return true; - } - CompatibilityLevel rhs = (CompatibilityLevel) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/CsvSerialization.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/CsvSerialization.java deleted file mode 100755 index 24fac2dd717..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/CsvSerialization.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes how data from an input is serialized or how data is serialized - * when written to an output in CSV format. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Csv") -@JsonFlatten -public class CsvSerialization extends Serialization { - /** - * Specifies the delimiter that will be used to separate comma-separated - * value (CSV) records. See - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - * or - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output - * for a list of supported values. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.fieldDelimiter") - private String fieldDelimiter; - - /** - * Specifies the encoding of the incoming data in the case of input and the - * encoding of outgoing data in the case of output. Required on PUT - * (CreateOrReplace) requests. Possible values include: 'UTF8'. - */ - @JsonProperty(value = "properties.encoding") - private Encoding encoding; - - /** - * Get the fieldDelimiter value. - * - * @return the fieldDelimiter value - */ - public String fieldDelimiter() { - return this.fieldDelimiter; - } - - /** - * Set the fieldDelimiter value. - * - * @param fieldDelimiter the fieldDelimiter value to set - * @return the CsvSerialization object itself. - */ - public CsvSerialization withFieldDelimiter(String fieldDelimiter) { - this.fieldDelimiter = fieldDelimiter; - return this; - } - - /** - * Get the encoding value. - * - * @return the encoding value - */ - public Encoding encoding() { - return this.encoding; - } - - /** - * Set the encoding value. - * - * @param encoding the encoding value to set - * @return the CsvSerialization object itself. - */ - public CsvSerialization withEncoding(Encoding encoding) { - this.encoding = encoding; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/DiagnosticCondition.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/DiagnosticCondition.java deleted file mode 100755 index 8c04b688c0f..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/DiagnosticCondition.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Condition applicable to the resource, or to the job overall, that warrant - * customer attention. - */ -public class DiagnosticCondition { - /** - * The UTC timestamp of when the condition started. Customers should be - * able to find a corresponding event in the ops log around this time. - */ - @JsonProperty(value = "since", access = JsonProperty.Access.WRITE_ONLY) - private String since; - - /** - * The opaque diagnostic code. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * The human-readable message describing the condition in detail. Localized - * in the Accept-Language of the client request. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * Get the since value. - * - * @return the since value - */ - public String since() { - return this.since; - } - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Diagnostics.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Diagnostics.java deleted file mode 100755 index 071876514bb..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Diagnostics.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes conditions applicable to the Input, Output, or the job overall, - * that warrant customer attention. - */ -public class Diagnostics { - /** - * A collection of zero or more conditions applicable to the resource, or - * to the job overall, that warrant customer attention. - */ - @JsonProperty(value = "conditions", access = JsonProperty.Access.WRITE_ONLY) - private List conditions; - - /** - * Get the conditions value. - * - * @return the conditions value - */ - public List conditions() { - return this.conditions; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/DocumentDbOutputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/DocumentDbOutputDataSource.java deleted file mode 100755 index 6a0e036bf3c..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/DocumentDbOutputDataSource.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes a DocumentDB data source. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.Storage/DocumentDB") -@JsonFlatten -public class DocumentDbOutputDataSource extends OutputDataSource { - /** - * The DocumentDB account name or ID. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.accountId") - private String accountId; - - /** - * The account key for the DocumentDB account. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.accountKey") - private String accountKey; - - /** - * The name of the DocumentDB database. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.database") - private String database; - - /** - * The collection name pattern for the collections to be used. The - * collection name format can be constructed using the optional {partition} - * token, where partitions start from 0. See the DocumentDB section of - * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output - * for more information. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.collectionNamePattern") - private String collectionNamePattern; - - /** - * The name of the field in output events used to specify the key for - * partitioning output across collections. If 'collectionNamePattern' - * contains the {partition} token, this property is required to be - * specified. - */ - @JsonProperty(value = "properties.partitionKey") - private String partitionKey; - - /** - * The name of the field in output events used to specify the primary key - * which insert or update operations are based on. - */ - @JsonProperty(value = "properties.documentId") - private String documentId; - - /** - * Get the accountId value. - * - * @return the accountId value - */ - public String accountId() { - return this.accountId; - } - - /** - * Set the accountId value. - * - * @param accountId the accountId value to set - * @return the DocumentDbOutputDataSource object itself. - */ - public DocumentDbOutputDataSource withAccountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * Get the accountKey value. - * - * @return the accountKey value - */ - public String accountKey() { - return this.accountKey; - } - - /** - * Set the accountKey value. - * - * @param accountKey the accountKey value to set - * @return the DocumentDbOutputDataSource object itself. - */ - public DocumentDbOutputDataSource withAccountKey(String accountKey) { - this.accountKey = accountKey; - return this; - } - - /** - * Get the database value. - * - * @return the database value - */ - public String database() { - return this.database; - } - - /** - * Set the database value. - * - * @param database the database value to set - * @return the DocumentDbOutputDataSource object itself. - */ - public DocumentDbOutputDataSource withDatabase(String database) { - this.database = database; - return this; - } - - /** - * Get the collectionNamePattern value. - * - * @return the collectionNamePattern value - */ - public String collectionNamePattern() { - return this.collectionNamePattern; - } - - /** - * Set the collectionNamePattern value. - * - * @param collectionNamePattern the collectionNamePattern value to set - * @return the DocumentDbOutputDataSource object itself. - */ - public DocumentDbOutputDataSource withCollectionNamePattern(String collectionNamePattern) { - this.collectionNamePattern = collectionNamePattern; - return this; - } - - /** - * Get the partitionKey value. - * - * @return the partitionKey value - */ - public String partitionKey() { - return this.partitionKey; - } - - /** - * Set the partitionKey value. - * - * @param partitionKey the partitionKey value to set - * @return the DocumentDbOutputDataSource object itself. - */ - public DocumentDbOutputDataSource withPartitionKey(String partitionKey) { - this.partitionKey = partitionKey; - return this; - } - - /** - * Get the documentId value. - * - * @return the documentId value - */ - public String documentId() { - return this.documentId; - } - - /** - * Set the documentId value. - * - * @param documentId the documentId value to set - * @return the DocumentDbOutputDataSource object itself. - */ - public DocumentDbOutputDataSource withDocumentId(String documentId) { - this.documentId = documentId; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Encoding.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Encoding.java deleted file mode 100755 index 6f6d6417b7c..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Encoding.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for Encoding. - */ -public final class Encoding { - /** Static value UTF8 for Encoding. */ - public static final Encoding UTF8 = new Encoding("UTF8"); - - private String value; - - /** - * Creates a custom value for Encoding. - * @param value the custom value - */ - public Encoding(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof Encoding)) { - return false; - } - if (obj == this) { - return true; - } - Encoding rhs = (Encoding) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ErrorResponse.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ErrorResponse.java deleted file mode 100755 index 812e8c69ea6..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ErrorResponse.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes the error that occurred. - */ -public class ErrorResponse { - /** - * Error code associated with the error that occurred. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /** - * Describes the error in detail. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * Get the code value. - * - * @return the code value - */ - public String code() { - return this.code; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubDataSourceProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubDataSourceProperties.java deleted file mode 100755 index 8c92adf5c91..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubDataSourceProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The common properties that are associated with Event Hub data sources. - */ -public class EventHubDataSourceProperties extends ServiceBusDataSourceProperties { - /** - * The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "eventHubName") - private String eventHubName; - - /** - * Get the eventHubName value. - * - * @return the eventHubName value - */ - public String eventHubName() { - return this.eventHubName; - } - - /** - * Set the eventHubName value. - * - * @param eventHubName the eventHubName value to set - * @return the EventHubDataSourceProperties object itself. - */ - public EventHubDataSourceProperties withEventHubName(String eventHubName) { - this.eventHubName = eventHubName; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubOutputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubOutputDataSource.java deleted file mode 100755 index 4ece511dbf3..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubOutputDataSource.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes an Event Hub output data source. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.ServiceBus/EventHub") -@JsonFlatten -public class EventHubOutputDataSource extends OutputDataSource { - /** - * The namespace that is associated with the desired Event Hub, Service Bus - * Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.serviceBusNamespace") - private String serviceBusNamespace; - - /** - * The shared access policy name for the Event Hub, Service Bus Queue, - * Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyName") - private String sharedAccessPolicyName; - - /** - * The shared access policy key for the specified shared access policy. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyKey") - private String sharedAccessPolicyKey; - - /** - * The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.eventHubName") - private String eventHubName; - - /** - * The key/column that is used to determine to which partition to send - * event data. - */ - @JsonProperty(value = "properties.partitionKey") - private String partitionKey; - - /** - * Get the serviceBusNamespace value. - * - * @return the serviceBusNamespace value - */ - public String serviceBusNamespace() { - return this.serviceBusNamespace; - } - - /** - * Set the serviceBusNamespace value. - * - * @param serviceBusNamespace the serviceBusNamespace value to set - * @return the EventHubOutputDataSource object itself. - */ - public EventHubOutputDataSource withServiceBusNamespace(String serviceBusNamespace) { - this.serviceBusNamespace = serviceBusNamespace; - return this; - } - - /** - * Get the sharedAccessPolicyName value. - * - * @return the sharedAccessPolicyName value - */ - public String sharedAccessPolicyName() { - return this.sharedAccessPolicyName; - } - - /** - * Set the sharedAccessPolicyName value. - * - * @param sharedAccessPolicyName the sharedAccessPolicyName value to set - * @return the EventHubOutputDataSource object itself. - */ - public EventHubOutputDataSource withSharedAccessPolicyName(String sharedAccessPolicyName) { - this.sharedAccessPolicyName = sharedAccessPolicyName; - return this; - } - - /** - * Get the sharedAccessPolicyKey value. - * - * @return the sharedAccessPolicyKey value - */ - public String sharedAccessPolicyKey() { - return this.sharedAccessPolicyKey; - } - - /** - * Set the sharedAccessPolicyKey value. - * - * @param sharedAccessPolicyKey the sharedAccessPolicyKey value to set - * @return the EventHubOutputDataSource object itself. - */ - public EventHubOutputDataSource withSharedAccessPolicyKey(String sharedAccessPolicyKey) { - this.sharedAccessPolicyKey = sharedAccessPolicyKey; - return this; - } - - /** - * Get the eventHubName value. - * - * @return the eventHubName value - */ - public String eventHubName() { - return this.eventHubName; - } - - /** - * Set the eventHubName value. - * - * @param eventHubName the eventHubName value to set - * @return the EventHubOutputDataSource object itself. - */ - public EventHubOutputDataSource withEventHubName(String eventHubName) { - this.eventHubName = eventHubName; - return this; - } - - /** - * Get the partitionKey value. - * - * @return the partitionKey value - */ - public String partitionKey() { - return this.partitionKey; - } - - /** - * Set the partitionKey value. - * - * @param partitionKey the partitionKey value to set - * @return the EventHubOutputDataSource object itself. - */ - public EventHubOutputDataSource withPartitionKey(String partitionKey) { - this.partitionKey = partitionKey; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubStreamInputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubStreamInputDataSource.java deleted file mode 100755 index c6ff6837697..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventHubStreamInputDataSource.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes an Event Hub input data source that contains stream data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.ServiceBus/EventHub") -@JsonFlatten -public class EventHubStreamInputDataSource extends StreamInputDataSource { - /** - * The namespace that is associated with the desired Event Hub, Service Bus - * Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.serviceBusNamespace") - private String serviceBusNamespace; - - /** - * The shared access policy name for the Event Hub, Service Bus Queue, - * Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyName") - private String sharedAccessPolicyName; - - /** - * The shared access policy key for the specified shared access policy. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyKey") - private String sharedAccessPolicyKey; - - /** - * The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.eventHubName") - private String eventHubName; - - /** - * The name of an Event Hub Consumer Group that should be used to read - * events from the Event Hub. Specifying distinct consumer group names for - * multiple inputs allows each of those inputs to receive the same events - * from the Event Hub. If not specified, the input uses the Event Hub’s - * default consumer group. - */ - @JsonProperty(value = "properties.consumerGroupName") - private String consumerGroupName; - - /** - * Get the serviceBusNamespace value. - * - * @return the serviceBusNamespace value - */ - public String serviceBusNamespace() { - return this.serviceBusNamespace; - } - - /** - * Set the serviceBusNamespace value. - * - * @param serviceBusNamespace the serviceBusNamespace value to set - * @return the EventHubStreamInputDataSource object itself. - */ - public EventHubStreamInputDataSource withServiceBusNamespace(String serviceBusNamespace) { - this.serviceBusNamespace = serviceBusNamespace; - return this; - } - - /** - * Get the sharedAccessPolicyName value. - * - * @return the sharedAccessPolicyName value - */ - public String sharedAccessPolicyName() { - return this.sharedAccessPolicyName; - } - - /** - * Set the sharedAccessPolicyName value. - * - * @param sharedAccessPolicyName the sharedAccessPolicyName value to set - * @return the EventHubStreamInputDataSource object itself. - */ - public EventHubStreamInputDataSource withSharedAccessPolicyName(String sharedAccessPolicyName) { - this.sharedAccessPolicyName = sharedAccessPolicyName; - return this; - } - - /** - * Get the sharedAccessPolicyKey value. - * - * @return the sharedAccessPolicyKey value - */ - public String sharedAccessPolicyKey() { - return this.sharedAccessPolicyKey; - } - - /** - * Set the sharedAccessPolicyKey value. - * - * @param sharedAccessPolicyKey the sharedAccessPolicyKey value to set - * @return the EventHubStreamInputDataSource object itself. - */ - public EventHubStreamInputDataSource withSharedAccessPolicyKey(String sharedAccessPolicyKey) { - this.sharedAccessPolicyKey = sharedAccessPolicyKey; - return this; - } - - /** - * Get the eventHubName value. - * - * @return the eventHubName value - */ - public String eventHubName() { - return this.eventHubName; - } - - /** - * Set the eventHubName value. - * - * @param eventHubName the eventHubName value to set - * @return the EventHubStreamInputDataSource object itself. - */ - public EventHubStreamInputDataSource withEventHubName(String eventHubName) { - this.eventHubName = eventHubName; - return this; - } - - /** - * Get the consumerGroupName value. - * - * @return the consumerGroupName value - */ - public String consumerGroupName() { - return this.consumerGroupName; - } - - /** - * Set the consumerGroupName value. - * - * @param consumerGroupName the consumerGroupName value to set - * @return the EventHubStreamInputDataSource object itself. - */ - public EventHubStreamInputDataSource withConsumerGroupName(String consumerGroupName) { - this.consumerGroupName = consumerGroupName; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventsOutOfOrderPolicy.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventsOutOfOrderPolicy.java deleted file mode 100755 index 6827bacfcca..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/EventsOutOfOrderPolicy.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for EventsOutOfOrderPolicy. - */ -public final class EventsOutOfOrderPolicy { - /** Static value Adjust for EventsOutOfOrderPolicy. */ - public static final EventsOutOfOrderPolicy ADJUST = new EventsOutOfOrderPolicy("Adjust"); - - /** Static value Drop for EventsOutOfOrderPolicy. */ - public static final EventsOutOfOrderPolicy DROP = new EventsOutOfOrderPolicy("Drop"); - - private String value; - - /** - * Creates a custom value for EventsOutOfOrderPolicy. - * @param value the custom value - */ - public EventsOutOfOrderPolicy(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof EventsOutOfOrderPolicy)) { - return false; - } - if (obj == this) { - return true; - } - EventsOutOfOrderPolicy rhs = (EventsOutOfOrderPolicy) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionBinding.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionBinding.java deleted file mode 100755 index 9fc76729013..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionBinding.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * The physical binding of the function. For example, in the Azure Machine - * Learning web service’s case, this describes the endpoint. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("FunctionBinding") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Microsoft.MachineLearning/WebService", value = AzureMachineLearningWebServiceFunctionBinding.class), - @JsonSubTypes.Type(name = "Microsoft.StreamAnalytics/JavascriptUdf", value = JavaScriptFunctionBinding.class) -}) -public class FunctionBinding { -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionInput.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionInput.java deleted file mode 100755 index 9d0abaf00f2..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionInput.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes one input parameter of a function. - */ -public class FunctionInput { - /** - * The (Azure Stream Analytics supported) data type of the function input - * parameter. A list of valid Azure Stream Analytics data types are - * described at - * https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx. - */ - @JsonProperty(value = "dataType") - private String dataType; - - /** - * A flag indicating if the parameter is a configuration parameter. True if - * this input parameter is expected to be a constant. Default is false. - */ - @JsonProperty(value = "isConfigurationParameter") - private Boolean isConfigurationParameter; - - /** - * Get the dataType value. - * - * @return the dataType value - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType value. - * - * @param dataType the dataType value to set - * @return the FunctionInput object itself. - */ - public FunctionInput withDataType(String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Get the isConfigurationParameter value. - * - * @return the isConfigurationParameter value - */ - public Boolean isConfigurationParameter() { - return this.isConfigurationParameter; - } - - /** - * Set the isConfigurationParameter value. - * - * @param isConfigurationParameter the isConfigurationParameter value to set - * @return the FunctionInput object itself. - */ - public FunctionInput withIsConfigurationParameter(Boolean isConfigurationParameter) { - this.isConfigurationParameter = isConfigurationParameter; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionOutput.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionOutput.java deleted file mode 100755 index 7080e7ef604..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionOutput.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes the output of a function. - */ -public class FunctionOutput { - /** - * The (Azure Stream Analytics supported) data type of the function output. - * A list of valid Azure Stream Analytics data types are described at - * https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx. - */ - @JsonProperty(value = "dataType") - private String dataType; - - /** - * Get the dataType value. - * - * @return the dataType value - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType value. - * - * @param dataType the dataType value to set - * @return the FunctionOutput object itself. - */ - public FunctionOutput withDataType(String dataType) { - this.dataType = dataType; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionProperties.java deleted file mode 100755 index 6fa3c4fc4ef..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/FunctionProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * The properties that are associated with a function. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("FunctionProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Scalar", value = ScalarFunctionProperties.class) -}) -public class FunctionProperties { - /** - * The current entity tag for the function. This is an opaque string. You - * can use it to detect whether the resource has changed between requests. - * You can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/InputProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/InputProperties.java deleted file mode 100755 index 0cbfca9bb5c..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/InputProperties.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * The properties that are associated with an input. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("InputProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Stream", value = StreamInputProperties.class), - @JsonSubTypes.Type(name = "Reference", value = ReferenceInputProperties.class) -}) -public class InputProperties { - /** - * Describes how data from an input is serialized or how data is serialized - * when written to an output. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "serialization") - private Serialization serialization; - - /** - * Describes conditions applicable to the Input, Output, or the job - * overall, that warrant customer attention. - */ - @JsonProperty(value = "diagnostics", access = JsonProperty.Access.WRITE_ONLY) - private Diagnostics diagnostics; - - /** - * The current entity tag for the input. This is an opaque string. You can - * use it to detect whether the resource has changed between requests. You - * can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the serialization value. - * - * @return the serialization value - */ - public Serialization serialization() { - return this.serialization; - } - - /** - * Set the serialization value. - * - * @param serialization the serialization value to set - * @return the InputProperties object itself. - */ - public InputProperties withSerialization(Serialization serialization) { - this.serialization = serialization; - return this; - } - - /** - * Get the diagnostics value. - * - * @return the diagnostics value - */ - public Diagnostics diagnostics() { - return this.diagnostics; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/IoTHubStreamInputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/IoTHubStreamInputDataSource.java deleted file mode 100755 index 0733766f05c..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/IoTHubStreamInputDataSource.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes an IoT Hub input data source that contains stream data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.Devices/IotHubs") -@JsonFlatten -public class IoTHubStreamInputDataSource extends StreamInputDataSource { - /** - * The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.iotHubNamespace") - private String iotHubNamespace; - - /** - * The shared access policy name for the IoT Hub. This policy must contain - * at least the Service connect permission. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyName") - private String sharedAccessPolicyName; - - /** - * The shared access policy key for the specified shared access policy. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyKey") - private String sharedAccessPolicyKey; - - /** - * The name of an IoT Hub Consumer Group that should be used to read events - * from the IoT Hub. If not specified, the input uses the Iot Hub’s default - * consumer group. - */ - @JsonProperty(value = "properties.consumerGroupName") - private String consumerGroupName; - - /** - * The IoT Hub endpoint to connect to (ie. messages/events, - * messages/operationsMonitoringEvents, etc.). - */ - @JsonProperty(value = "properties.endpoint") - private String endpoint; - - /** - * Get the iotHubNamespace value. - * - * @return the iotHubNamespace value - */ - public String iotHubNamespace() { - return this.iotHubNamespace; - } - - /** - * Set the iotHubNamespace value. - * - * @param iotHubNamespace the iotHubNamespace value to set - * @return the IoTHubStreamInputDataSource object itself. - */ - public IoTHubStreamInputDataSource withIotHubNamespace(String iotHubNamespace) { - this.iotHubNamespace = iotHubNamespace; - return this; - } - - /** - * Get the sharedAccessPolicyName value. - * - * @return the sharedAccessPolicyName value - */ - public String sharedAccessPolicyName() { - return this.sharedAccessPolicyName; - } - - /** - * Set the sharedAccessPolicyName value. - * - * @param sharedAccessPolicyName the sharedAccessPolicyName value to set - * @return the IoTHubStreamInputDataSource object itself. - */ - public IoTHubStreamInputDataSource withSharedAccessPolicyName(String sharedAccessPolicyName) { - this.sharedAccessPolicyName = sharedAccessPolicyName; - return this; - } - - /** - * Get the sharedAccessPolicyKey value. - * - * @return the sharedAccessPolicyKey value - */ - public String sharedAccessPolicyKey() { - return this.sharedAccessPolicyKey; - } - - /** - * Set the sharedAccessPolicyKey value. - * - * @param sharedAccessPolicyKey the sharedAccessPolicyKey value to set - * @return the IoTHubStreamInputDataSource object itself. - */ - public IoTHubStreamInputDataSource withSharedAccessPolicyKey(String sharedAccessPolicyKey) { - this.sharedAccessPolicyKey = sharedAccessPolicyKey; - return this; - } - - /** - * Get the consumerGroupName value. - * - * @return the consumerGroupName value - */ - public String consumerGroupName() { - return this.consumerGroupName; - } - - /** - * Set the consumerGroupName value. - * - * @param consumerGroupName the consumerGroupName value to set - * @return the IoTHubStreamInputDataSource object itself. - */ - public IoTHubStreamInputDataSource withConsumerGroupName(String consumerGroupName) { - this.consumerGroupName = consumerGroupName; - return this; - } - - /** - * Get the endpoint value. - * - * @return the endpoint value - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint value. - * - * @param endpoint the endpoint value to set - * @return the IoTHubStreamInputDataSource object itself. - */ - public IoTHubStreamInputDataSource withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JavaScriptFunctionBinding.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JavaScriptFunctionBinding.java deleted file mode 100755 index e5ee7127fa3..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JavaScriptFunctionBinding.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * The binding to a JavaScript function. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.StreamAnalytics/JavascriptUdf") -@JsonFlatten -public class JavaScriptFunctionBinding extends FunctionBinding { - /** - * The JavaScript code containing a single function definition. For - * example: 'function (x, y) { return x + y; }'. - */ - @JsonProperty(value = "properties.script") - private String script; - - /** - * Get the script value. - * - * @return the script value - */ - public String script() { - return this.script; - } - - /** - * Set the script value. - * - * @param script the script value to set - * @return the JavaScriptFunctionBinding object itself. - */ - public JavaScriptFunctionBinding withScript(String script) { - this.script = script; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JavaScriptFunctionRetrieveDefaultDefinitionParameters.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JavaScriptFunctionRetrieveDefaultDefinitionParameters.java deleted file mode 100755 index 811739289db..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JavaScriptFunctionRetrieveDefaultDefinitionParameters.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.management.streamanalytics.implementation.FunctionRetrieveDefaultDefinitionParametersInner; - -/** - * The parameters needed to retrieve the default function definition for a - * JavaScript function. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "bindingType") -@JsonTypeName("Microsoft.StreamAnalytics/JavascriptUdf") -@JsonFlatten -public class JavaScriptFunctionRetrieveDefaultDefinitionParameters extends FunctionRetrieveDefaultDefinitionParametersInner { - /** - * The JavaScript code containing a single function definition. For - * example: 'function (x, y) { return x + y; }'. - */ - @JsonProperty(value = "bindingRetrievalProperties.script") - private String script; - - /** - * The function type. Possible values include: 'Scalar'. - */ - @JsonProperty(value = "bindingRetrievalProperties.udfType") - private UdfType udfType; - - /** - * Get the script value. - * - * @return the script value - */ - public String script() { - return this.script; - } - - /** - * Set the script value. - * - * @param script the script value to set - * @return the JavaScriptFunctionRetrieveDefaultDefinitionParameters object itself. - */ - public JavaScriptFunctionRetrieveDefaultDefinitionParameters withScript(String script) { - this.script = script; - return this; - } - - /** - * Get the udfType value. - * - * @return the udfType value - */ - public UdfType udfType() { - return this.udfType; - } - - /** - * Set the udfType value. - * - * @param udfType the udfType value to set - * @return the JavaScriptFunctionRetrieveDefaultDefinitionParameters object itself. - */ - public JavaScriptFunctionRetrieveDefaultDefinitionParameters withUdfType(UdfType udfType) { - this.udfType = udfType; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JsonOutputSerializationFormat.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JsonOutputSerializationFormat.java deleted file mode 100755 index be6b26b8591..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JsonOutputSerializationFormat.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for JsonOutputSerializationFormat. - */ -public final class JsonOutputSerializationFormat { - /** Static value LineSeparated for JsonOutputSerializationFormat. */ - public static final JsonOutputSerializationFormat LINE_SEPARATED = new JsonOutputSerializationFormat("LineSeparated"); - - /** Static value Array for JsonOutputSerializationFormat. */ - public static final JsonOutputSerializationFormat ARRAY = new JsonOutputSerializationFormat("Array"); - - private String value; - - /** - * Creates a custom value for JsonOutputSerializationFormat. - * @param value the custom value - */ - public JsonOutputSerializationFormat(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof JsonOutputSerializationFormat)) { - return false; - } - if (obj == this) { - return true; - } - JsonOutputSerializationFormat rhs = (JsonOutputSerializationFormat) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JsonSerialization.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JsonSerialization.java deleted file mode 100755 index c90060eda97..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/JsonSerialization.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes how data from an input is serialized or how data is serialized - * when written to an output in JSON format. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Json") -@JsonFlatten -public class JsonSerialization extends Serialization { - /** - * Specifies the encoding of the incoming data in the case of input and the - * encoding of outgoing data in the case of output. Required on PUT - * (CreateOrReplace) requests. Possible values include: 'UTF8'. - */ - @JsonProperty(value = "properties.encoding") - private Encoding encoding; - - /** - * This property only applies to JSON serialization of outputs only. It is - * not applicable to inputs. This property specifies the format of the JSON - * the output will be written in. The currently supported values are - * 'lineSeparated' indicating the output will be formatted by having each - * JSON object separated by a new line and 'array' indicating the output - * will be formatted as an array of JSON objects. Default value is - * 'lineSeparated' if left null. Possible values include: 'LineSeparated', - * 'Array'. - */ - @JsonProperty(value = "properties.format") - private JsonOutputSerializationFormat format; - - /** - * Get the encoding value. - * - * @return the encoding value - */ - public Encoding encoding() { - return this.encoding; - } - - /** - * Set the encoding value. - * - * @param encoding the encoding value to set - * @return the JsonSerialization object itself. - */ - public JsonSerialization withEncoding(Encoding encoding) { - this.encoding = encoding; - return this; - } - - /** - * Get the format value. - * - * @return the format value - */ - public JsonOutputSerializationFormat format() { - return this.format; - } - - /** - * Set the format value. - * - * @param format the format value to set - * @return the JsonSerialization object itself. - */ - public JsonSerialization withFormat(JsonOutputSerializationFormat format) { - this.format = format; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OperationDisplay.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OperationDisplay.java deleted file mode 100755 index 96e895c8d66..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OperationDisplay.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Contains the localized display information for this particular operation / - * action. - */ -public class OperationDisplay { - /** - * The localized friendly form of the resource provider name. - */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) - private String provider; - - /** - * The localized friendly form of the resource type related to this - * action/operation. - */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) - private String resource; - - /** - * The localized friendly name for the operation. - */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /** - * The localized friendly description for the operation. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputDataSource.java deleted file mode 100755 index b7fc13a981e..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputDataSource.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * Describes the data source that output will be written to. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("OutputDataSource") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Microsoft.Storage/Blob", value = BlobOutputDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.Storage/Table", value = AzureTableOutputDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.ServiceBus/EventHub", value = EventHubOutputDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.Sql/Server/Database", value = AzureSqlDatabaseOutputDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.Storage/DocumentDB", value = DocumentDbOutputDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.ServiceBus/Queue", value = ServiceBusQueueOutputDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.ServiceBus/Topic", value = ServiceBusTopicOutputDataSource.class) -}) -public class OutputDataSource { -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputErrorPolicy.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputErrorPolicy.java deleted file mode 100755 index 4a2cb74d977..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputErrorPolicy.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for OutputErrorPolicy. - */ -public final class OutputErrorPolicy { - /** Static value Stop for OutputErrorPolicy. */ - public static final OutputErrorPolicy STOP = new OutputErrorPolicy("Stop"); - - /** Static value Drop for OutputErrorPolicy. */ - public static final OutputErrorPolicy DROP = new OutputErrorPolicy("Drop"); - - private String value; - - /** - * Creates a custom value for OutputErrorPolicy. - * @param value the custom value - */ - public OutputErrorPolicy(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof OutputErrorPolicy)) { - return false; - } - if (obj == this) { - return true; - } - OutputErrorPolicy rhs = (OutputErrorPolicy) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputStartMode.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputStartMode.java deleted file mode 100755 index d4699f8b712..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/OutputStartMode.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for OutputStartMode. - */ -public final class OutputStartMode { - /** Static value JobStartTime for OutputStartMode. */ - public static final OutputStartMode JOB_START_TIME = new OutputStartMode("JobStartTime"); - - /** Static value CustomTime for OutputStartMode. */ - public static final OutputStartMode CUSTOM_TIME = new OutputStartMode("CustomTime"); - - /** Static value LastOutputEventTime for OutputStartMode. */ - public static final OutputStartMode LAST_OUTPUT_EVENT_TIME = new OutputStartMode("LastOutputEventTime"); - - private String value; - - /** - * Creates a custom value for OutputStartMode. - * @param value the custom value - */ - public OutputStartMode(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof OutputStartMode)) { - return false; - } - if (obj == this) { - return true; - } - OutputStartMode rhs = (OutputStartMode) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ReferenceInputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ReferenceInputDataSource.java deleted file mode 100755 index 63f5051a946..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ReferenceInputDataSource.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * Describes an input data source that contains reference data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("ReferenceInputDataSource") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Microsoft.Storage/Blob", value = BlobReferenceInputDataSource.class) -}) -public class ReferenceInputDataSource { -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ReferenceInputProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ReferenceInputProperties.java deleted file mode 100755 index a013f0f16cb..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ReferenceInputProperties.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * The properties that are associated with an input containing reference data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Reference") -public class ReferenceInputProperties extends InputProperties { - /** - * Describes an input data source that contains reference data. Required on - * PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "datasource") - private ReferenceInputDataSource datasource; - - /** - * Get the datasource value. - * - * @return the datasource value - */ - public ReferenceInputDataSource datasource() { - return this.datasource; - } - - /** - * Set the datasource value. - * - * @param datasource the datasource value to set - * @return the ReferenceInputProperties object itself. - */ - public ReferenceInputProperties withDatasource(ReferenceInputDataSource datasource) { - this.datasource = datasource; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ScalarFunctionProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ScalarFunctionProperties.java deleted file mode 100755 index 3cd31d5511e..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ScalarFunctionProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * The properties that are associated with a scalar function. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Scalar") -@JsonFlatten -public class ScalarFunctionProperties extends FunctionProperties { - /** - * A list of inputs describing the parameters of the function. - */ - @JsonProperty(value = "properties.inputs") - private List inputs; - - /** - * The output of the function. - */ - @JsonProperty(value = "properties.output") - private FunctionOutput output; - - /** - * The physical binding of the function. For example, in the Azure Machine - * Learning web service’s case, this describes the endpoint. - */ - @JsonProperty(value = "properties.binding") - private FunctionBinding binding; - - /** - * Get the inputs value. - * - * @return the inputs value - */ - public List inputs() { - return this.inputs; - } - - /** - * Set the inputs value. - * - * @param inputs the inputs value to set - * @return the ScalarFunctionProperties object itself. - */ - public ScalarFunctionProperties withInputs(List inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the output value. - * - * @return the output value - */ - public FunctionOutput output() { - return this.output; - } - - /** - * Set the output value. - * - * @param output the output value to set - * @return the ScalarFunctionProperties object itself. - */ - public ScalarFunctionProperties withOutput(FunctionOutput output) { - this.output = output; - return this; - } - - /** - * Get the binding value. - * - * @return the binding value - */ - public FunctionBinding binding() { - return this.binding; - } - - /** - * Set the binding value. - * - * @param binding the binding value to set - * @return the ScalarFunctionProperties object itself. - */ - public ScalarFunctionProperties withBinding(FunctionBinding binding) { - this.binding = binding; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Serialization.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Serialization.java deleted file mode 100755 index 7e4aef19b45..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Serialization.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * Describes how data from an input is serialized or how data is serialized - * when written to an output. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Serialization") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Csv", value = CsvSerialization.class), - @JsonSubTypes.Type(name = "Json", value = JsonSerialization.class), - @JsonSubTypes.Type(name = "Avro", value = AvroSerialization.class) -}) -public class Serialization { -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusDataSourceProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusDataSourceProperties.java deleted file mode 100755 index 2450028042b..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusDataSourceProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The common properties that are associated with Service Bus data sources - * (Queues, Topics, Event Hubs, etc.). - */ -public class ServiceBusDataSourceProperties { - /** - * The namespace that is associated with the desired Event Hub, Service Bus - * Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "serviceBusNamespace") - private String serviceBusNamespace; - - /** - * The shared access policy name for the Event Hub, Service Bus Queue, - * Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "sharedAccessPolicyName") - private String sharedAccessPolicyName; - - /** - * The shared access policy key for the specified shared access policy. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "sharedAccessPolicyKey") - private String sharedAccessPolicyKey; - - /** - * Get the serviceBusNamespace value. - * - * @return the serviceBusNamespace value - */ - public String serviceBusNamespace() { - return this.serviceBusNamespace; - } - - /** - * Set the serviceBusNamespace value. - * - * @param serviceBusNamespace the serviceBusNamespace value to set - * @return the ServiceBusDataSourceProperties object itself. - */ - public ServiceBusDataSourceProperties withServiceBusNamespace(String serviceBusNamespace) { - this.serviceBusNamespace = serviceBusNamespace; - return this; - } - - /** - * Get the sharedAccessPolicyName value. - * - * @return the sharedAccessPolicyName value - */ - public String sharedAccessPolicyName() { - return this.sharedAccessPolicyName; - } - - /** - * Set the sharedAccessPolicyName value. - * - * @param sharedAccessPolicyName the sharedAccessPolicyName value to set - * @return the ServiceBusDataSourceProperties object itself. - */ - public ServiceBusDataSourceProperties withSharedAccessPolicyName(String sharedAccessPolicyName) { - this.sharedAccessPolicyName = sharedAccessPolicyName; - return this; - } - - /** - * Get the sharedAccessPolicyKey value. - * - * @return the sharedAccessPolicyKey value - */ - public String sharedAccessPolicyKey() { - return this.sharedAccessPolicyKey; - } - - /** - * Set the sharedAccessPolicyKey value. - * - * @param sharedAccessPolicyKey the sharedAccessPolicyKey value to set - * @return the ServiceBusDataSourceProperties object itself. - */ - public ServiceBusDataSourceProperties withSharedAccessPolicyKey(String sharedAccessPolicyKey) { - this.sharedAccessPolicyKey = sharedAccessPolicyKey; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusQueueOutputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusQueueOutputDataSource.java deleted file mode 100755 index 5291231d13b..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusQueueOutputDataSource.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes a Service Bus Queue data source. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.ServiceBus/Queue") -@JsonFlatten -public class ServiceBusQueueOutputDataSource extends OutputDataSource { - /** - * The namespace that is associated with the desired Event Hub, Service Bus - * Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.serviceBusNamespace") - private String serviceBusNamespace; - - /** - * The shared access policy name for the Event Hub, Service Bus Queue, - * Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyName") - private String sharedAccessPolicyName; - - /** - * The shared access policy key for the specified shared access policy. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyKey") - private String sharedAccessPolicyKey; - - /** - * The name of the Service Bus Queue. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.queueName") - private String queueName; - - /** - * A string array of the names of output columns to be attached to Service - * Bus messages as custom properties. - */ - @JsonProperty(value = "properties.propertyColumns") - private List propertyColumns; - - /** - * Get the serviceBusNamespace value. - * - * @return the serviceBusNamespace value - */ - public String serviceBusNamespace() { - return this.serviceBusNamespace; - } - - /** - * Set the serviceBusNamespace value. - * - * @param serviceBusNamespace the serviceBusNamespace value to set - * @return the ServiceBusQueueOutputDataSource object itself. - */ - public ServiceBusQueueOutputDataSource withServiceBusNamespace(String serviceBusNamespace) { - this.serviceBusNamespace = serviceBusNamespace; - return this; - } - - /** - * Get the sharedAccessPolicyName value. - * - * @return the sharedAccessPolicyName value - */ - public String sharedAccessPolicyName() { - return this.sharedAccessPolicyName; - } - - /** - * Set the sharedAccessPolicyName value. - * - * @param sharedAccessPolicyName the sharedAccessPolicyName value to set - * @return the ServiceBusQueueOutputDataSource object itself. - */ - public ServiceBusQueueOutputDataSource withSharedAccessPolicyName(String sharedAccessPolicyName) { - this.sharedAccessPolicyName = sharedAccessPolicyName; - return this; - } - - /** - * Get the sharedAccessPolicyKey value. - * - * @return the sharedAccessPolicyKey value - */ - public String sharedAccessPolicyKey() { - return this.sharedAccessPolicyKey; - } - - /** - * Set the sharedAccessPolicyKey value. - * - * @param sharedAccessPolicyKey the sharedAccessPolicyKey value to set - * @return the ServiceBusQueueOutputDataSource object itself. - */ - public ServiceBusQueueOutputDataSource withSharedAccessPolicyKey(String sharedAccessPolicyKey) { - this.sharedAccessPolicyKey = sharedAccessPolicyKey; - return this; - } - - /** - * Get the queueName value. - * - * @return the queueName value - */ - public String queueName() { - return this.queueName; - } - - /** - * Set the queueName value. - * - * @param queueName the queueName value to set - * @return the ServiceBusQueueOutputDataSource object itself. - */ - public ServiceBusQueueOutputDataSource withQueueName(String queueName) { - this.queueName = queueName; - return this; - } - - /** - * Get the propertyColumns value. - * - * @return the propertyColumns value - */ - public List propertyColumns() { - return this.propertyColumns; - } - - /** - * Set the propertyColumns value. - * - * @param propertyColumns the propertyColumns value to set - * @return the ServiceBusQueueOutputDataSource object itself. - */ - public ServiceBusQueueOutputDataSource withPropertyColumns(List propertyColumns) { - this.propertyColumns = propertyColumns; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusTopicOutputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusTopicOutputDataSource.java deleted file mode 100755 index 489e97cdc61..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/ServiceBusTopicOutputDataSource.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Describes a Service Bus Topic data source. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Microsoft.ServiceBus/Topic") -@JsonFlatten -public class ServiceBusTopicOutputDataSource extends OutputDataSource { - /** - * The namespace that is associated with the desired Event Hub, Service Bus - * Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.serviceBusNamespace") - private String serviceBusNamespace; - - /** - * The shared access policy name for the Event Hub, Service Bus Queue, - * Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyName") - private String sharedAccessPolicyName; - - /** - * The shared access policy key for the specified shared access policy. - * Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sharedAccessPolicyKey") - private String sharedAccessPolicyKey; - - /** - * The name of the Service Bus Topic. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "properties.topicName") - private String topicName; - - /** - * A string array of the names of output columns to be attached to Service - * Bus messages as custom properties. - */ - @JsonProperty(value = "properties.propertyColumns") - private List propertyColumns; - - /** - * Get the serviceBusNamespace value. - * - * @return the serviceBusNamespace value - */ - public String serviceBusNamespace() { - return this.serviceBusNamespace; - } - - /** - * Set the serviceBusNamespace value. - * - * @param serviceBusNamespace the serviceBusNamespace value to set - * @return the ServiceBusTopicOutputDataSource object itself. - */ - public ServiceBusTopicOutputDataSource withServiceBusNamespace(String serviceBusNamespace) { - this.serviceBusNamespace = serviceBusNamespace; - return this; - } - - /** - * Get the sharedAccessPolicyName value. - * - * @return the sharedAccessPolicyName value - */ - public String sharedAccessPolicyName() { - return this.sharedAccessPolicyName; - } - - /** - * Set the sharedAccessPolicyName value. - * - * @param sharedAccessPolicyName the sharedAccessPolicyName value to set - * @return the ServiceBusTopicOutputDataSource object itself. - */ - public ServiceBusTopicOutputDataSource withSharedAccessPolicyName(String sharedAccessPolicyName) { - this.sharedAccessPolicyName = sharedAccessPolicyName; - return this; - } - - /** - * Get the sharedAccessPolicyKey value. - * - * @return the sharedAccessPolicyKey value - */ - public String sharedAccessPolicyKey() { - return this.sharedAccessPolicyKey; - } - - /** - * Set the sharedAccessPolicyKey value. - * - * @param sharedAccessPolicyKey the sharedAccessPolicyKey value to set - * @return the ServiceBusTopicOutputDataSource object itself. - */ - public ServiceBusTopicOutputDataSource withSharedAccessPolicyKey(String sharedAccessPolicyKey) { - this.sharedAccessPolicyKey = sharedAccessPolicyKey; - return this; - } - - /** - * Get the topicName value. - * - * @return the topicName value - */ - public String topicName() { - return this.topicName; - } - - /** - * Set the topicName value. - * - * @param topicName the topicName value to set - * @return the ServiceBusTopicOutputDataSource object itself. - */ - public ServiceBusTopicOutputDataSource withTopicName(String topicName) { - this.topicName = topicName; - return this; - } - - /** - * Get the propertyColumns value. - * - * @return the propertyColumns value - */ - public List propertyColumns() { - return this.propertyColumns; - } - - /** - * Set the propertyColumns value. - * - * @param propertyColumns the propertyColumns value to set - * @return the ServiceBusTopicOutputDataSource object itself. - */ - public ServiceBusTopicOutputDataSource withPropertyColumns(List propertyColumns) { - this.propertyColumns = propertyColumns; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Sku.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Sku.java deleted file mode 100755 index f51e58ee573..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/Sku.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties that are associated with a SKU. - */ -public class Sku { - /** - * The name of the SKU. Required on PUT (CreateOrReplace) requests. - * Possible values include: 'Standard'. - */ - @JsonProperty(value = "name") - private SkuName name; - - /** - * Get the name value. - * - * @return the name value - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/SkuName.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/SkuName.java deleted file mode 100755 index 33148d423cf..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/SkuName.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for SkuName. - */ -public final class SkuName { - /** Static value Standard for SkuName. */ - public static final SkuName STANDARD = new SkuName("Standard"); - - private String value; - - /** - * Creates a custom value for SkuName. - * @param value the custom value - */ - public SkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SkuName)) { - return false; - } - if (obj == this) { - return true; - } - SkuName rhs = (SkuName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StorageAccount.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StorageAccount.java deleted file mode 100755 index 600c134dd5e..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StorageAccount.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The properties that are associated with an Azure Storage account. - */ -public class StorageAccount { - /** - * The name of the Azure Storage account. Required on PUT (CreateOrReplace) - * requests. - */ - @JsonProperty(value = "accountName") - private String accountName; - - /** - * The account key for the Azure Storage account. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "accountKey") - private String accountKey; - - /** - * Get the accountName value. - * - * @return the accountName value - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName value. - * - * @param accountName the accountName value to set - * @return the StorageAccount object itself. - */ - public StorageAccount withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the accountKey value. - * - * @return the accountKey value - */ - public String accountKey() { - return this.accountKey; - } - - /** - * Set the accountKey value. - * - * @param accountKey the accountKey value to set - * @return the StorageAccount object itself. - */ - public StorageAccount withAccountKey(String accountKey) { - this.accountKey = accountKey; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StreamInputDataSource.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StreamInputDataSource.java deleted file mode 100755 index 1b3104102ca..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StreamInputDataSource.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -/** - * Describes an input data source that contains stream data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("StreamInputDataSource") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Microsoft.Storage/Blob", value = BlobStreamInputDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.ServiceBus/EventHub", value = EventHubStreamInputDataSource.class), - @JsonSubTypes.Type(name = "Microsoft.Devices/IotHubs", value = IoTHubStreamInputDataSource.class) -}) -public class StreamInputDataSource { -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StreamInputProperties.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StreamInputProperties.java deleted file mode 100755 index 1a41e4ac819..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/StreamInputProperties.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * The properties that are associated with an input containing stream data. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("Stream") -public class StreamInputProperties extends InputProperties { - /** - * Describes an input data source that contains stream data. Required on - * PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "datasource") - private StreamInputDataSource datasource; - - /** - * Get the datasource value. - * - * @return the datasource value - */ - public StreamInputDataSource datasource() { - return this.datasource; - } - - /** - * Set the datasource value. - * - * @param datasource the datasource value to set - * @return the StreamInputProperties object itself. - */ - public StreamInputProperties withDatasource(StreamInputDataSource datasource) { - this.datasource = datasource; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/UdfType.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/UdfType.java deleted file mode 100755 index d9ec7fd090a..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/UdfType.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for UdfType. - */ -public enum UdfType { - /** Enum value Scalar. */ - SCALAR("Scalar"); - - /** The actual serialized value for a UdfType instance. */ - private String value; - - UdfType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a UdfType instance. - * - * @param value the serialized value to parse. - * @return the parsed UdfType object, or null if unable to parse. - */ - @JsonCreator - public static UdfType fromString(String value) { - UdfType[] items = UdfType.values(); - for (UdfType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionInner.java deleted file mode 100755 index ca0e45b3941..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.management.streamanalytics.FunctionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.SubResource; - -/** - * A function object, containing all information associated with the named - * function. All functions are contained under a streaming job. - */ -public class FunctionInner extends SubResource { - /** - * The properties that are associated with a function. - */ - @JsonProperty(value = "properties") - private FunctionProperties properties; - - /** - * Get the properties value. - * - * @return the properties value - */ - public FunctionProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the FunctionInner object itself. - */ - public FunctionInner withProperties(FunctionProperties properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionRetrieveDefaultDefinitionParametersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionRetrieveDefaultDefinitionParametersInner.java deleted file mode 100755 index 947b4f22b31..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionRetrieveDefaultDefinitionParametersInner.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.microsoft.azure.management.streamanalytics.AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters; -import com.microsoft.azure.management.streamanalytics.JavaScriptFunctionRetrieveDefaultDefinitionParameters; - -/** - * Parameters used to specify the type of function to retrieve the default - * definition for. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "bindingType") -@JsonTypeName("FunctionRetrieveDefaultDefinitionParameters") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Microsoft.MachineLearning/WebService", value = AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.class), - @JsonSubTypes.Type(name = "Microsoft.StreamAnalytics/JavascriptUdf", value = JavaScriptFunctionRetrieveDefaultDefinitionParameters.class) -}) -public class FunctionRetrieveDefaultDefinitionParametersInner { -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsCreateOrReplaceHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsCreateOrReplaceHeadersInner.java deleted file mode 100755 index bc2d99f751c..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsCreateOrReplaceHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for CreateOrReplace operation. - */ -public class FunctionsCreateOrReplaceHeadersInner { - /** - * The current entity tag for the function. This is an opaque string. You - * can use it to detect whether the resource has changed between requests. - * You can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the FunctionsCreateOrReplaceHeadersInner object itself. - */ - public FunctionsCreateOrReplaceHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsGetHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsGetHeadersInner.java deleted file mode 100755 index 8dfa8346da8..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsGetHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class FunctionsGetHeadersInner { - /** - * The current entity tag for the function. This is an opaque string. You - * can use it to detect whether the resource has changed between requests. - * You can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the FunctionsGetHeadersInner object itself. - */ - public FunctionsGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsInner.java deleted file mode 100755 index c4c80173237..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsInner.java +++ /dev/null @@ -1,1553 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Functions. - */ -public class FunctionsInner { - /** The Retrofit service to perform REST calls. */ - private FunctionsService service; - /** The service client containing this operation class. */ - private StreamAnalyticsManagementClientImpl client; - - /** - * Initializes an instance of FunctionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public FunctionsInner(Retrofit retrofit, StreamAnalyticsManagementClientImpl client) { - this.service = retrofit.create(FunctionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Functions to be - * used by Retrofit to perform actually REST calls. - */ - interface FunctionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions createOrReplace" }) - @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}") - Observable> createOrReplace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("functionName") String functionName, @Body FunctionInner function, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions update" }) - @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("functionName") String functionName, @Body FunctionInner function, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("functionName") String functionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions get" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("functionName") String functionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions listByStreamingJob" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions") - Observable> listByStreamingJob(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("$select") String select, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions test" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test") - Observable> test(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("functionName") String functionName, @Body FunctionInner function, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions beginTest" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test") - Observable> beginTest(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("functionName") String functionName, @Body FunctionInner function, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions retrieveDefaultDefinition" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition") - Observable> retrieveDefaultDefinition(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("functionName") String functionName, @Body FunctionRetrieveDefaultDefinitionParametersInner functionRetrieveDefaultDefinitionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Functions listByStreamingJobNext" }) - @GET - Observable> listByStreamingJobNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a function or replaces an already existing function under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function The definition of the function that will be used to create a new function or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FunctionInner object if successful. - */ - public FunctionInner createOrReplace(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, functionName, function).toBlocking().single().body(); - } - - /** - * Creates a function or replaces an already existing function under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function The definition of the function that will be used to create a new function or replace the existing one under the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, functionName, function), serviceCallback); - } - - /** - * Creates a function or replaces an already existing function under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function The definition of the function that will be used to create a new function or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, functionName, function).map(new Func1, FunctionInner>() { - @Override - public FunctionInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates a function or replaces an already existing function under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function The definition of the function that will be used to create a new function or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - if (function == null) { - throw new IllegalArgumentException("Parameter function is required and cannot be null."); - } - Validator.validate(function); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - final String ifNoneMatch = null; - return service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, functionName, function, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates a function or replaces an already existing function under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function The definition of the function that will be used to create a new function or replace the existing one under the streaming job. - * @param ifMatch The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FunctionInner object if successful. - */ - public FunctionInner createOrReplace(String resourceGroupName, String jobName, String functionName, FunctionInner function, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, functionName, function, ifMatch, ifNoneMatch).toBlocking().single().body(); - } - - /** - * Creates a function or replaces an already existing function under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function The definition of the function that will be used to create a new function or replace the existing one under the streaming job. - * @param ifMatch The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, functionName, function, ifMatch, ifNoneMatch), serviceCallback); - } - - /** - * Creates a function or replaces an already existing function under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function The definition of the function that will be used to create a new function or replace the existing one under the streaming job. - * @param ifMatch The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, functionName, function, ifMatch, ifNoneMatch).map(new Func1, FunctionInner>() { - @Override - public FunctionInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates a function or replaces an already existing function under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function The definition of the function that will be used to create a new function or replace the existing one under the streaming job. - * @param ifMatch The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, String ifMatch, String ifNoneMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - if (function == null) { - throw new IllegalArgumentException("Parameter function is required and cannot be null."); - } - Validator.validate(function); - final String apiVersion = "2016-03-01"; - return service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, functionName, function, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders createOrReplaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, FunctionsCreateOrReplaceHeadersInner.class); - } - - /** - * Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function A function object. The properties specified here will overwrite the corresponding properties in the existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FunctionInner object if successful. - */ - public FunctionInner update(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, functionName, function).toBlocking().single().body(); - } - - /** - * Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function A function object. The properties specified here will overwrite the corresponding properties in the existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, functionName, function), serviceCallback); - } - - /** - * Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function A function object. The properties specified here will overwrite the corresponding properties in the existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, functionName, function).map(new Func1, FunctionInner>() { - @Override - public FunctionInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function A function object. The properties specified here will overwrite the corresponding properties in the existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - if (function == null) { - throw new IllegalArgumentException("Parameter function is required and cannot be null."); - } - Validator.validate(function); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, functionName, function, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function A function object. The properties specified here will overwrite the corresponding properties in the existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FunctionInner object if successful. - */ - public FunctionInner update(String resourceGroupName, String jobName, String functionName, FunctionInner function, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, functionName, function, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function A function object. The properties specified here will overwrite the corresponding properties in the existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, functionName, function, ifMatch), serviceCallback); - } - - /** - * Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function A function object. The properties specified here will overwrite the corresponding properties in the existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, functionName, function, ifMatch).map(new Func1, FunctionInner>() { - @Override - public FunctionInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function A function object. The properties specified here will overwrite the corresponding properties in the existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, String ifMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - if (function == null) { - throw new IllegalArgumentException("Parameter function is required and cannot be null."); - } - Validator.validate(function); - final String apiVersion = "2016-03-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, functionName, function, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, FunctionsUpdateHeadersInner.class); - } - - /** - * Deletes a function from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String jobName, String functionName) { - deleteWithServiceResponseAsync(resourceGroupName, jobName, functionName).toBlocking().single().body(); - } - - /** - * Deletes a function from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String jobName, String functionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, jobName, functionName), serviceCallback); - } - - /** - * Deletes a function from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String jobName, String functionName) { - return deleteWithServiceResponseAsync(resourceGroupName, jobName, functionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a function from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.delete(this.client.subscriptionId(), resourceGroupName, jobName, functionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets details about the specified function. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FunctionInner object if successful. - */ - public FunctionInner get(String resourceGroupName, String jobName, String functionName) { - return getWithServiceResponseAsync(resourceGroupName, jobName, functionName).toBlocking().single().body(); - } - - /** - * Gets details about the specified function. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String jobName, String functionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, jobName, functionName), serviceCallback); - } - - /** - * Gets details about the specified function. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable getAsync(String resourceGroupName, String jobName, String functionName) { - return getWithServiceResponseAsync(resourceGroupName, jobName, functionName).map(new Func1, FunctionInner>() { - @Override - public FunctionInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets details about the specified function. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.get(this.client.subscriptionId(), resourceGroupName, jobName, functionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, FunctionsGetHeadersInner.class); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<FunctionInner> object if successful. - */ - public PagedList listByStreamingJob(final String resourceGroupName, final String jobName) { - ServiceResponse> response = listByStreamingJobSinglePageAsync(resourceGroupName, jobName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobSinglePageAsync(resourceGroupName, jobName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FunctionInner> object - */ - public Observable> listByStreamingJobAsync(final String resourceGroupName, final String jobName) { - return listByStreamingJobWithServiceResponseAsync(resourceGroupName, jobName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FunctionInner> object - */ - public Observable>> listByStreamingJobWithServiceResponseAsync(final String resourceGroupName, final String jobName) { - return listByStreamingJobSinglePageAsync(resourceGroupName, jobName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<FunctionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobSinglePageAsync(final String resourceGroupName, final String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final String select = null; - return service.listByStreamingJob(this.client.subscriptionId(), resourceGroupName, jobName, select, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<FunctionInner> object if successful. - */ - public PagedList listByStreamingJob(final String resourceGroupName, final String jobName, final String select) { - ServiceResponse> response = listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final String select, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FunctionInner> object - */ - public Observable> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final String select) { - return listByStreamingJobWithServiceResponseAsync(resourceGroupName, jobName, select) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FunctionInner> object - */ - public Observable>> listByStreamingJobWithServiceResponseAsync(final String resourceGroupName, final String jobName, final String select) { - return listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the functions under the specified streaming job. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - ServiceResponse> * @param jobName The name of the streaming job. - ServiceResponse> * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<FunctionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobSinglePageAsync(final String resourceGroupName, final String jobName, final String select) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.listByStreamingJob(this.client.subscriptionId(), resourceGroupName, jobName, select, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByStreamingJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner test(String resourceGroupName, String jobName, String functionName) { - return testWithServiceResponseAsync(resourceGroupName, jobName, functionName).toBlocking().last().body(); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture testAsync(String resourceGroupName, String jobName, String functionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(testWithServiceResponseAsync(resourceGroupName, jobName, functionName), serviceCallback); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable testAsync(String resourceGroupName, String jobName, String functionName) { - return testWithServiceResponseAsync(resourceGroupName, jobName, functionName).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> testWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final FunctionInner function = null; - Observable> observable = service.test(this.client.subscriptionId(), resourceGroupName, jobName, functionName, function, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function If the function specified does not already exist, this parameter must contain the full function definition intended to be tested. If the function specified already exists, this parameter can be left null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner test(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - return testWithServiceResponseAsync(resourceGroupName, jobName, functionName, function).toBlocking().last().body(); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function If the function specified does not already exist, this parameter must contain the full function definition intended to be tested. If the function specified already exists, this parameter can be left null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture testAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(testWithServiceResponseAsync(resourceGroupName, jobName, functionName, function), serviceCallback); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function If the function specified does not already exist, this parameter must contain the full function definition intended to be tested. If the function specified already exists, this parameter can be left null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable testAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - return testWithServiceResponseAsync(resourceGroupName, jobName, functionName, function).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function If the function specified does not already exist, this parameter must contain the full function definition intended to be tested. If the function specified already exists, this parameter can be left null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> testWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - Validator.validate(function); - final String apiVersion = "2016-03-01"; - Observable> observable = service.test(this.client.subscriptionId(), resourceGroupName, jobName, functionName, function, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner beginTest(String resourceGroupName, String jobName, String functionName) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, functionName).toBlocking().single().body(); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginTestAsync(String resourceGroupName, String jobName, String functionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginTestWithServiceResponseAsync(resourceGroupName, jobName, functionName), serviceCallback); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable beginTestAsync(String resourceGroupName, String jobName, String functionName) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, functionName).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable> beginTestWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final FunctionInner function = null; - return service.beginTest(this.client.subscriptionId(), resourceGroupName, jobName, functionName, function, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginTestDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function If the function specified does not already exist, this parameter must contain the full function definition intended to be tested. If the function specified already exists, this parameter can be left null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner beginTest(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, functionName, function).toBlocking().single().body(); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function If the function specified does not already exist, this parameter must contain the full function definition intended to be tested. If the function specified already exists, this parameter can be left null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginTestAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginTestWithServiceResponseAsync(resourceGroupName, jobName, functionName, function), serviceCallback); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function If the function specified does not already exist, this parameter must contain the full function definition intended to be tested. If the function specified already exists, this parameter can be left null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable beginTestAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, functionName, function).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param function If the function specified does not already exist, this parameter must contain the full function definition intended to be tested. If the function specified already exists, this parameter can be left null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable> beginTestWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName, FunctionInner function) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - Validator.validate(function); - final String apiVersion = "2016-03-01"; - return service.beginTest(this.client.subscriptionId(), resourceGroupName, jobName, functionName, function, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginTestDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginTestDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Retrieves the default definition of a function based on the parameters specified. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FunctionInner object if successful. - */ - public FunctionInner retrieveDefaultDefinition(String resourceGroupName, String jobName, String functionName) { - return retrieveDefaultDefinitionWithServiceResponseAsync(resourceGroupName, jobName, functionName).toBlocking().single().body(); - } - - /** - * Retrieves the default definition of a function based on the parameters specified. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture retrieveDefaultDefinitionAsync(String resourceGroupName, String jobName, String functionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(retrieveDefaultDefinitionWithServiceResponseAsync(resourceGroupName, jobName, functionName), serviceCallback); - } - - /** - * Retrieves the default definition of a function based on the parameters specified. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable retrieveDefaultDefinitionAsync(String resourceGroupName, String jobName, String functionName) { - return retrieveDefaultDefinitionWithServiceResponseAsync(resourceGroupName, jobName, functionName).map(new Func1, FunctionInner>() { - @Override - public FunctionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Retrieves the default definition of a function based on the parameters specified. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable> retrieveDefaultDefinitionWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final FunctionRetrieveDefaultDefinitionParametersInner functionRetrieveDefaultDefinitionParameters = null; - return service.retrieveDefaultDefinition(this.client.subscriptionId(), resourceGroupName, jobName, functionName, functionRetrieveDefaultDefinitionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = retrieveDefaultDefinitionDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Retrieves the default definition of a function based on the parameters specified. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param functionRetrieveDefaultDefinitionParameters Parameters used to specify the type of function to retrieve the default definition for. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the FunctionInner object if successful. - */ - public FunctionInner retrieveDefaultDefinition(String resourceGroupName, String jobName, String functionName, FunctionRetrieveDefaultDefinitionParametersInner functionRetrieveDefaultDefinitionParameters) { - return retrieveDefaultDefinitionWithServiceResponseAsync(resourceGroupName, jobName, functionName, functionRetrieveDefaultDefinitionParameters).toBlocking().single().body(); - } - - /** - * Retrieves the default definition of a function based on the parameters specified. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param functionRetrieveDefaultDefinitionParameters Parameters used to specify the type of function to retrieve the default definition for. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture retrieveDefaultDefinitionAsync(String resourceGroupName, String jobName, String functionName, FunctionRetrieveDefaultDefinitionParametersInner functionRetrieveDefaultDefinitionParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(retrieveDefaultDefinitionWithServiceResponseAsync(resourceGroupName, jobName, functionName, functionRetrieveDefaultDefinitionParameters), serviceCallback); - } - - /** - * Retrieves the default definition of a function based on the parameters specified. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param functionRetrieveDefaultDefinitionParameters Parameters used to specify the type of function to retrieve the default definition for. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable retrieveDefaultDefinitionAsync(String resourceGroupName, String jobName, String functionName, FunctionRetrieveDefaultDefinitionParametersInner functionRetrieveDefaultDefinitionParameters) { - return retrieveDefaultDefinitionWithServiceResponseAsync(resourceGroupName, jobName, functionName, functionRetrieveDefaultDefinitionParameters).map(new Func1, FunctionInner>() { - @Override - public FunctionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Retrieves the default definition of a function based on the parameters specified. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param functionName The name of the function. - * @param functionRetrieveDefaultDefinitionParameters Parameters used to specify the type of function to retrieve the default definition for. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FunctionInner object - */ - public Observable> retrieveDefaultDefinitionWithServiceResponseAsync(String resourceGroupName, String jobName, String functionName, FunctionRetrieveDefaultDefinitionParametersInner functionRetrieveDefaultDefinitionParameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (functionName == null) { - throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); - } - Validator.validate(functionRetrieveDefaultDefinitionParameters); - final String apiVersion = "2016-03-01"; - return service.retrieveDefaultDefinition(this.client.subscriptionId(), resourceGroupName, jobName, functionName, functionRetrieveDefaultDefinitionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = retrieveDefaultDefinitionDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse retrieveDefaultDefinitionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<FunctionInner> object if successful. - */ - public PagedList listByStreamingJobNext(final String nextPageLink) { - ServiceResponse> response = listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FunctionInner> object - */ - public Observable> listByStreamingJobNextAsync(final String nextPageLink) { - return listByStreamingJobNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the functions under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<FunctionInner> object - */ - public Observable>> listByStreamingJobNextWithServiceResponseAsync(final String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the functions under the specified streaming job. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<FunctionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByStreamingJobNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByStreamingJobNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsUpdateHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsUpdateHeadersInner.java deleted file mode 100755 index f4f31f6433c..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/FunctionsUpdateHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Update operation. - */ -public class FunctionsUpdateHeadersInner { - /** - * The current entity tag for the function. This is an opaque string. You - * can use it to detect whether the resource has changed between requests. - * You can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the FunctionsUpdateHeadersInner object itself. - */ - public FunctionsUpdateHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputInner.java deleted file mode 100755 index 7d04cf3f375..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputInner.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.management.streamanalytics.InputProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.SubResource; - -/** - * An input object, containing all information associated with the named input. - * All inputs are contained under a streaming job. - */ -public class InputInner extends SubResource { - /** - * The properties that are associated with an input. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties") - private InputProperties properties; - - /** - * Get the properties value. - * - * @return the properties value - */ - public InputProperties properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the InputInner object itself. - */ - public InputInner withProperties(InputProperties properties) { - this.properties = properties; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsCreateOrReplaceHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsCreateOrReplaceHeadersInner.java deleted file mode 100755 index b63227256fb..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsCreateOrReplaceHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for CreateOrReplace operation. - */ -public class InputsCreateOrReplaceHeadersInner { - /** - * The current entity tag for the input. This is an opaque string. You can - * use it to detect whether the resource has changed between requests. You - * can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the InputsCreateOrReplaceHeadersInner object itself. - */ - public InputsCreateOrReplaceHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsGetHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsGetHeadersInner.java deleted file mode 100755 index ae4aa2b568b..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsGetHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class InputsGetHeadersInner { - /** - * The current entity tag for the input. This is an opaque string. You can - * use it to detect whether the resource has changed between requests. You - * can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the InputsGetHeadersInner object itself. - */ - public InputsGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsInner.java deleted file mode 100755 index e790b546564..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsInner.java +++ /dev/null @@ -1,1368 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Inputs. - */ -public class InputsInner { - /** The Retrofit service to perform REST calls. */ - private InputsService service; - /** The service client containing this operation class. */ - private StreamAnalyticsManagementClientImpl client; - - /** - * Initializes an instance of InputsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public InputsInner(Retrofit retrofit, StreamAnalyticsManagementClientImpl client) { - this.service = retrofit.create(InputsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Inputs to be - * used by Retrofit to perform actually REST calls. - */ - interface InputsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Inputs createOrReplace" }) - @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}") - Observable> createOrReplace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("inputName") String inputName, @Body InputInner input, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Inputs update" }) - @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("inputName") String inputName, @Body InputInner input, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Inputs delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("inputName") String inputName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Inputs get" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("inputName") String inputName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Inputs listByStreamingJob" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs") - Observable> listByStreamingJob(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("$select") String select, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Inputs test" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test") - Observable> test(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("inputName") String inputName, @Body InputInner input, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Inputs beginTest" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test") - Observable> beginTest(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("inputName") String inputName, @Body InputInner input, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Inputs listByStreamingJobNext" }) - @GET - Observable> listByStreamingJobNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates an input or replaces an already existing input under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input The definition of the input that will be used to create a new input or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InputInner object if successful. - */ - public InputInner createOrReplace(String resourceGroupName, String jobName, String inputName, InputInner input) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, inputName, input).toBlocking().single().body(); - } - - /** - * Creates an input or replaces an already existing input under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input The definition of the input that will be used to create a new input or replace the existing one under the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, String inputName, InputInner input, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, inputName, input), serviceCallback); - } - - /** - * Creates an input or replaces an already existing input under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input The definition of the input that will be used to create a new input or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, String inputName, InputInner input) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, inputName, input).map(new Func1, InputInner>() { - @Override - public InputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates an input or replaces an already existing input under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input The definition of the input that will be used to create a new input or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName, InputInner input) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - if (input == null) { - throw new IllegalArgumentException("Parameter input is required and cannot be null."); - } - Validator.validate(input); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - final String ifNoneMatch = null; - return service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates an input or replaces an already existing input under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input The definition of the input that will be used to create a new input or replace the existing one under the streaming job. - * @param ifMatch The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InputInner object if successful. - */ - public InputInner createOrReplace(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, inputName, input, ifMatch, ifNoneMatch).toBlocking().single().body(); - } - - /** - * Creates an input or replaces an already existing input under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input The definition of the input that will be used to create a new input or replace the existing one under the streaming job. - * @param ifMatch The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, inputName, input, ifMatch, ifNoneMatch), serviceCallback); - } - - /** - * Creates an input or replaces an already existing input under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input The definition of the input that will be used to create a new input or replace the existing one under the streaming job. - * @param ifMatch The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, inputName, input, ifMatch, ifNoneMatch).map(new Func1, InputInner>() { - @Override - public InputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates an input or replaces an already existing input under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input The definition of the input that will be used to create a new input or replace the existing one under the streaming job. - * @param ifMatch The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch, String ifNoneMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - if (input == null) { - throw new IllegalArgumentException("Parameter input is required and cannot be null."); - } - Validator.validate(input); - final String apiVersion = "2016-03-01"; - return service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders createOrReplaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, InputsCreateOrReplaceHeadersInner.class); - } - - /** - * Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input An Input object. The properties specified here will overwrite the corresponding properties in the existing input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InputInner object if successful. - */ - public InputInner update(String resourceGroupName, String jobName, String inputName, InputInner input) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, inputName, input).toBlocking().single().body(); - } - - /** - * Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input An Input object. The properties specified here will overwrite the corresponding properties in the existing input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, String inputName, InputInner input, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, inputName, input), serviceCallback); - } - - /** - * Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input An Input object. The properties specified here will overwrite the corresponding properties in the existing input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, String inputName, InputInner input) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, inputName, input).map(new Func1, InputInner>() { - @Override - public InputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input An Input object. The properties specified here will overwrite the corresponding properties in the existing input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName, InputInner input) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - if (input == null) { - throw new IllegalArgumentException("Parameter input is required and cannot be null."); - } - Validator.validate(input); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input An Input object. The properties specified here will overwrite the corresponding properties in the existing input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InputInner object if successful. - */ - public InputInner update(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, inputName, input, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input An Input object. The properties specified here will overwrite the corresponding properties in the existing input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, inputName, input, ifMatch), serviceCallback); - } - - /** - * Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input An Input object. The properties specified here will overwrite the corresponding properties in the existing input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, inputName, input, ifMatch).map(new Func1, InputInner>() { - @Override - public InputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input An Input object. The properties specified here will overwrite the corresponding properties in the existing input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - if (input == null) { - throw new IllegalArgumentException("Parameter input is required and cannot be null."); - } - Validator.validate(input); - final String apiVersion = "2016-03-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, InputsUpdateHeadersInner.class); - } - - /** - * Deletes an input from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String jobName, String inputName) { - deleteWithServiceResponseAsync(resourceGroupName, jobName, inputName).toBlocking().single().body(); - } - - /** - * Deletes an input from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String jobName, String inputName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, jobName, inputName), serviceCallback); - } - - /** - * Deletes an input from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String jobName, String inputName) { - return deleteWithServiceResponseAsync(resourceGroupName, jobName, inputName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an input from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.delete(this.client.subscriptionId(), resourceGroupName, jobName, inputName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets details about the specified input. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the InputInner object if successful. - */ - public InputInner get(String resourceGroupName, String jobName, String inputName) { - return getWithServiceResponseAsync(resourceGroupName, jobName, inputName).toBlocking().single().body(); - } - - /** - * Gets details about the specified input. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String jobName, String inputName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, jobName, inputName), serviceCallback); - } - - /** - * Gets details about the specified input. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable getAsync(String resourceGroupName, String jobName, String inputName) { - return getWithServiceResponseAsync(resourceGroupName, jobName, inputName).map(new Func1, InputInner>() { - @Override - public InputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets details about the specified input. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the InputInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.get(this.client.subscriptionId(), resourceGroupName, jobName, inputName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, InputsGetHeadersInner.class); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InputInner> object if successful. - */ - public PagedList listByStreamingJob(final String resourceGroupName, final String jobName) { - ServiceResponse> response = listByStreamingJobSinglePageAsync(resourceGroupName, jobName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobSinglePageAsync(resourceGroupName, jobName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InputInner> object - */ - public Observable> listByStreamingJobAsync(final String resourceGroupName, final String jobName) { - return listByStreamingJobWithServiceResponseAsync(resourceGroupName, jobName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InputInner> object - */ - public Observable>> listByStreamingJobWithServiceResponseAsync(final String resourceGroupName, final String jobName) { - return listByStreamingJobSinglePageAsync(resourceGroupName, jobName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InputInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobSinglePageAsync(final String resourceGroupName, final String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final String select = null; - return service.listByStreamingJob(this.client.subscriptionId(), resourceGroupName, jobName, select, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InputInner> object if successful. - */ - public PagedList listByStreamingJob(final String resourceGroupName, final String jobName, final String select) { - ServiceResponse> response = listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final String select, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InputInner> object - */ - public Observable> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final String select) { - return listByStreamingJobWithServiceResponseAsync(resourceGroupName, jobName, select) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InputInner> object - */ - public Observable>> listByStreamingJobWithServiceResponseAsync(final String resourceGroupName, final String jobName, final String select) { - return listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - ServiceResponse> * @param jobName The name of the streaming job. - ServiceResponse> * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InputInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobSinglePageAsync(final String resourceGroupName, final String jobName, final String select) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.listByStreamingJob(this.client.subscriptionId(), resourceGroupName, jobName, select, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByStreamingJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner test(String resourceGroupName, String jobName, String inputName) { - return testWithServiceResponseAsync(resourceGroupName, jobName, inputName).toBlocking().last().body(); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture testAsync(String resourceGroupName, String jobName, String inputName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(testWithServiceResponseAsync(resourceGroupName, jobName, inputName), serviceCallback); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable testAsync(String resourceGroupName, String jobName, String inputName) { - return testWithServiceResponseAsync(resourceGroupName, jobName, inputName).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> testWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final InputInner input = null; - Observable> observable = service.test(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly like a PATCH operation) and the resulting input will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner test(String resourceGroupName, String jobName, String inputName, InputInner input) { - return testWithServiceResponseAsync(resourceGroupName, jobName, inputName, input).toBlocking().last().body(); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly like a PATCH operation) and the resulting input will be tested. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture testAsync(String resourceGroupName, String jobName, String inputName, InputInner input, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(testWithServiceResponseAsync(resourceGroupName, jobName, inputName, input), serviceCallback); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly like a PATCH operation) and the resulting input will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable testAsync(String resourceGroupName, String jobName, String inputName, InputInner input) { - return testWithServiceResponseAsync(resourceGroupName, jobName, inputName, input).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly like a PATCH operation) and the resulting input will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> testWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName, InputInner input) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - Validator.validate(input); - final String apiVersion = "2016-03-01"; - Observable> observable = service.test(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner beginTest(String resourceGroupName, String jobName, String inputName) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, inputName).toBlocking().single().body(); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginTestAsync(String resourceGroupName, String jobName, String inputName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginTestWithServiceResponseAsync(resourceGroupName, jobName, inputName), serviceCallback); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable beginTestAsync(String resourceGroupName, String jobName, String inputName) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, inputName).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable> beginTestWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final InputInner input = null; - return service.beginTest(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginTestDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly like a PATCH operation) and the resulting input will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner beginTest(String resourceGroupName, String jobName, String inputName, InputInner input) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, inputName, input).toBlocking().single().body(); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly like a PATCH operation) and the resulting input will be tested. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginTestAsync(String resourceGroupName, String jobName, String inputName, InputInner input, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginTestWithServiceResponseAsync(resourceGroupName, jobName, inputName, input), serviceCallback); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly like a PATCH operation) and the resulting input will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable beginTestAsync(String resourceGroupName, String jobName, String inputName, InputInner input) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, inputName, input).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param inputName The name of the input. - * @param input If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly like a PATCH operation) and the resulting input will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable> beginTestWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName, InputInner input) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (inputName == null) { - throw new IllegalArgumentException("Parameter inputName is required and cannot be null."); - } - Validator.validate(input); - final String apiVersion = "2016-03-01"; - return service.beginTest(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginTestDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginTestDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<InputInner> object if successful. - */ - public PagedList listByStreamingJobNext(final String nextPageLink) { - ServiceResponse> response = listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InputInner> object - */ - public Observable> listByStreamingJobNextAsync(final String nextPageLink) { - return listByStreamingJobNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<InputInner> object - */ - public Observable>> listByStreamingJobNextWithServiceResponseAsync(final String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the inputs under the specified streaming job. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<InputInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByStreamingJobNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByStreamingJobNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsUpdateHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsUpdateHeadersInner.java deleted file mode 100755 index b4677efa764..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/InputsUpdateHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Update operation. - */ -public class InputsUpdateHeadersInner { - /** - * The current entity tag for the input. This is an opaque string. You can - * use it to detect whether the resource has changed between requests. You - * can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the InputsUpdateHeadersInner object itself. - */ - public InputsUpdateHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OperationInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OperationInner.java deleted file mode 100755 index cc5a93bb7d7..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OperationInner.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.management.streamanalytics.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A Stream Analytics REST API operation. - */ -public class OperationInner { - /** - * The name of the operation being performed on this particular object. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Contains the localized display information for this particular operation - * / action. - */ - @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) - private OperationDisplay display; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplay display() { - return this.display; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OperationsInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OperationsInner.java deleted file mode 100755 index f96d2478b47..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OperationsInner.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private StreamAnalyticsManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, StreamAnalyticsManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Operations list" }) - @GET("providers/Microsoft.StreamAnalytics/operations") - Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - final String apiVersion = "2016-03-01"; - return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available Stream Analytics related operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available Stream Analytics related operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputInner.java deleted file mode 100755 index 826a8e112ef..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputInner.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.management.streamanalytics.OutputDataSource; -import com.microsoft.azure.management.streamanalytics.Serialization; -import com.microsoft.azure.management.streamanalytics.Diagnostics; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; - -/** - * An output object, containing all information associated with the named - * output. All outputs are contained under a streaming job. - */ -@JsonFlatten -public class OutputInner extends SubResource { - /** - * Describes the data source that output will be written to. Required on - * PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.datasource") - private OutputDataSource datasource; - - /** - * Describes how data from an input is serialized or how data is serialized - * when written to an output. Required on PUT (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.serialization") - private Serialization serialization; - - /** - * Describes conditions applicable to the Input, Output, or the job - * overall, that warrant customer attention. - */ - @JsonProperty(value = "properties.diagnostics", access = JsonProperty.Access.WRITE_ONLY) - private Diagnostics diagnostics; - - /** - * The current entity tag for the output. This is an opaque string. You can - * use it to detect whether the resource has changed between requests. You - * can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "properties.etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the datasource value. - * - * @return the datasource value - */ - public OutputDataSource datasource() { - return this.datasource; - } - - /** - * Set the datasource value. - * - * @param datasource the datasource value to set - * @return the OutputInner object itself. - */ - public OutputInner withDatasource(OutputDataSource datasource) { - this.datasource = datasource; - return this; - } - - /** - * Get the serialization value. - * - * @return the serialization value - */ - public Serialization serialization() { - return this.serialization; - } - - /** - * Set the serialization value. - * - * @param serialization the serialization value to set - * @return the OutputInner object itself. - */ - public OutputInner withSerialization(Serialization serialization) { - this.serialization = serialization; - return this; - } - - /** - * Get the diagnostics value. - * - * @return the diagnostics value - */ - public Diagnostics diagnostics() { - return this.diagnostics; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsCreateOrReplaceHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsCreateOrReplaceHeadersInner.java deleted file mode 100755 index 05c6650518e..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsCreateOrReplaceHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for CreateOrReplace operation. - */ -public class OutputsCreateOrReplaceHeadersInner { - /** - * The current entity tag for the output. This is an opaque string. You can - * use it to detect whether the resource has changed between requests. You - * can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the OutputsCreateOrReplaceHeadersInner object itself. - */ - public OutputsCreateOrReplaceHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsGetHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsGetHeadersInner.java deleted file mode 100755 index f806eac66f9..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsGetHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class OutputsGetHeadersInner { - /** - * The current entity tag for the output. This is an opaque string. You can - * use it to detect whether the resource has changed between requests. You - * can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the OutputsGetHeadersInner object itself. - */ - public OutputsGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsInner.java deleted file mode 100755 index 2dbd3953e29..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsInner.java +++ /dev/null @@ -1,1368 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Outputs. - */ -public class OutputsInner { - /** The Retrofit service to perform REST calls. */ - private OutputsService service; - /** The service client containing this operation class. */ - private StreamAnalyticsManagementClientImpl client; - - /** - * Initializes an instance of OutputsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OutputsInner(Retrofit retrofit, StreamAnalyticsManagementClientImpl client) { - this.service = retrofit.create(OutputsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Outputs to be - * used by Retrofit to perform actually REST calls. - */ - interface OutputsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Outputs createOrReplace" }) - @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}") - Observable> createOrReplace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("outputName") String outputName, @Body OutputInner output, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Outputs update" }) - @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("outputName") String outputName, @Body OutputInner output, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Outputs delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("outputName") String outputName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Outputs get" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("outputName") String outputName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Outputs listByStreamingJob" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs") - Observable> listByStreamingJob(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("$select") String select, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Outputs test" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test") - Observable> test(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("outputName") String outputName, @Body OutputInner output, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Outputs beginTest" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test") - Observable> beginTest(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("outputName") String outputName, @Body OutputInner output, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Outputs listByStreamingJobNext" }) - @GET - Observable> listByStreamingJobNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates an output or replaces an already existing output under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output The definition of the output that will be used to create a new output or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OutputInner object if successful. - */ - public OutputInner createOrReplace(String resourceGroupName, String jobName, String outputName, OutputInner output) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, outputName, output).toBlocking().single().body(); - } - - /** - * Creates an output or replaces an already existing output under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output The definition of the output that will be used to create a new output or replace the existing one under the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, outputName, output), serviceCallback); - } - - /** - * Creates an output or replaces an already existing output under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output The definition of the output that will be used to create a new output or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, String outputName, OutputInner output) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, outputName, output).map(new Func1, OutputInner>() { - @Override - public OutputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates an output or replaces an already existing output under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output The definition of the output that will be used to create a new output or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName, OutputInner output) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - if (output == null) { - throw new IllegalArgumentException("Parameter output is required and cannot be null."); - } - Validator.validate(output); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - final String ifNoneMatch = null; - return service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, outputName, output, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates an output or replaces an already existing output under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output The definition of the output that will be used to create a new output or replace the existing one under the streaming job. - * @param ifMatch The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OutputInner object if successful. - */ - public OutputInner createOrReplace(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, outputName, output, ifMatch, ifNoneMatch).toBlocking().single().body(); - } - - /** - * Creates an output or replaces an already existing output under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output The definition of the output that will be used to create a new output or replace the existing one under the streaming job. - * @param ifMatch The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, outputName, output, ifMatch, ifNoneMatch), serviceCallback); - } - - /** - * Creates an output or replaces an already existing output under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output The definition of the output that will be used to create a new output or replace the existing one under the streaming job. - * @param ifMatch The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, outputName, output, ifMatch, ifNoneMatch).map(new Func1, OutputInner>() { - @Override - public OutputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates an output or replaces an already existing output under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output The definition of the output that will be used to create a new output or replace the existing one under the streaming job. - * @param ifMatch The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch, String ifNoneMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - if (output == null) { - throw new IllegalArgumentException("Parameter output is required and cannot be null."); - } - Validator.validate(output); - final String apiVersion = "2016-03-01"; - return service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, outputName, output, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders createOrReplaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, OutputsCreateOrReplaceHeadersInner.class); - } - - /** - * Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OutputInner object if successful. - */ - public OutputInner update(String resourceGroupName, String jobName, String outputName, OutputInner output) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, outputName, output).toBlocking().single().body(); - } - - /** - * Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, outputName, output), serviceCallback); - } - - /** - * Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, String outputName, OutputInner output) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, outputName, output).map(new Func1, OutputInner>() { - @Override - public OutputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName, OutputInner output) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - if (output == null) { - throw new IllegalArgumentException("Parameter output is required and cannot be null."); - } - Validator.validate(output); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, outputName, output, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OutputInner object if successful. - */ - public OutputInner update(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, outputName, output, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, outputName, output, ifMatch), serviceCallback); - } - - /** - * Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, outputName, output, ifMatch).map(new Func1, OutputInner>() { - @Override - public OutputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - if (output == null) { - throw new IllegalArgumentException("Parameter output is required and cannot be null."); - } - Validator.validate(output); - final String apiVersion = "2016-03-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, outputName, output, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, OutputsUpdateHeadersInner.class); - } - - /** - * Deletes an output from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String jobName, String outputName) { - deleteWithServiceResponseAsync(resourceGroupName, jobName, outputName).toBlocking().single().body(); - } - - /** - * Deletes an output from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String jobName, String outputName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, jobName, outputName), serviceCallback); - } - - /** - * Deletes an output from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String jobName, String outputName) { - return deleteWithServiceResponseAsync(resourceGroupName, jobName, outputName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes an output from the streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.delete(this.client.subscriptionId(), resourceGroupName, jobName, outputName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets details about the specified output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OutputInner object if successful. - */ - public OutputInner get(String resourceGroupName, String jobName, String outputName) { - return getWithServiceResponseAsync(resourceGroupName, jobName, outputName).toBlocking().single().body(); - } - - /** - * Gets details about the specified output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String jobName, String outputName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, jobName, outputName), serviceCallback); - } - - /** - * Gets details about the specified output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable getAsync(String resourceGroupName, String jobName, String outputName) { - return getWithServiceResponseAsync(resourceGroupName, jobName, outputName).map(new Func1, OutputInner>() { - @Override - public OutputInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets details about the specified output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OutputInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.get(this.client.subscriptionId(), resourceGroupName, jobName, outputName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, OutputsGetHeadersInner.class); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OutputInner> object if successful. - */ - public PagedList listByStreamingJob(final String resourceGroupName, final String jobName) { - ServiceResponse> response = listByStreamingJobSinglePageAsync(resourceGroupName, jobName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobSinglePageAsync(resourceGroupName, jobName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OutputInner> object - */ - public Observable> listByStreamingJobAsync(final String resourceGroupName, final String jobName) { - return listByStreamingJobWithServiceResponseAsync(resourceGroupName, jobName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OutputInner> object - */ - public Observable>> listByStreamingJobWithServiceResponseAsync(final String resourceGroupName, final String jobName) { - return listByStreamingJobSinglePageAsync(resourceGroupName, jobName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OutputInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobSinglePageAsync(final String resourceGroupName, final String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final String select = null; - return service.listByStreamingJob(this.client.subscriptionId(), resourceGroupName, jobName, select, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OutputInner> object if successful. - */ - public PagedList listByStreamingJob(final String resourceGroupName, final String jobName, final String select) { - ServiceResponse> response = listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final String select, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OutputInner> object - */ - public Observable> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final String select) { - return listByStreamingJobWithServiceResponseAsync(resourceGroupName, jobName, select) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OutputInner> object - */ - public Observable>> listByStreamingJobWithServiceResponseAsync(final String resourceGroupName, final String jobName, final String select) { - return listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - ServiceResponse> * @param jobName The name of the streaming job. - ServiceResponse> * @param select The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OutputInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobSinglePageAsync(final String resourceGroupName, final String jobName, final String select) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.listByStreamingJob(this.client.subscriptionId(), resourceGroupName, jobName, select, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByStreamingJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner test(String resourceGroupName, String jobName, String outputName) { - return testWithServiceResponseAsync(resourceGroupName, jobName, outputName).toBlocking().last().body(); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture testAsync(String resourceGroupName, String jobName, String outputName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(testWithServiceResponseAsync(resourceGroupName, jobName, outputName), serviceCallback); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable testAsync(String resourceGroupName, String jobName, String outputName) { - return testWithServiceResponseAsync(resourceGroupName, jobName, outputName).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> testWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final OutputInner output = null; - Observable> observable = service.test(this.client.subscriptionId(), resourceGroupName, jobName, outputName, output, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner test(String resourceGroupName, String jobName, String outputName, OutputInner output) { - return testWithServiceResponseAsync(resourceGroupName, jobName, outputName, output).toBlocking().last().body(); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture testAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(testWithServiceResponseAsync(resourceGroupName, jobName, outputName, output), serviceCallback); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable testAsync(String resourceGroupName, String jobName, String outputName, OutputInner output) { - return testWithServiceResponseAsync(resourceGroupName, jobName, outputName, output).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> testWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName, OutputInner output) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - Validator.validate(output); - final String apiVersion = "2016-03-01"; - Observable> observable = service.test(this.client.subscriptionId(), resourceGroupName, jobName, outputName, output, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner beginTest(String resourceGroupName, String jobName, String outputName) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, outputName).toBlocking().single().body(); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginTestAsync(String resourceGroupName, String jobName, String outputName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginTestWithServiceResponseAsync(resourceGroupName, jobName, outputName), serviceCallback); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable beginTestAsync(String resourceGroupName, String jobName, String outputName) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, outputName).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable> beginTestWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final OutputInner output = null; - return service.beginTest(this.client.subscriptionId(), resourceGroupName, jobName, outputName, output, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginTestDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceTestStatusInner object if successful. - */ - public ResourceTestStatusInner beginTest(String resourceGroupName, String jobName, String outputName, OutputInner output) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, outputName, output).toBlocking().single().body(); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginTestAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginTestWithServiceResponseAsync(resourceGroupName, jobName, outputName, output), serviceCallback); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable beginTestAsync(String resourceGroupName, String jobName, String outputName, OutputInner output) { - return beginTestWithServiceResponseAsync(resourceGroupName, jobName, outputName, output).map(new Func1, ResourceTestStatusInner>() { - @Override - public ResourceTestStatusInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param outputName The name of the output. - * @param output If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceTestStatusInner object - */ - public Observable> beginTestWithServiceResponseAsync(String resourceGroupName, String jobName, String outputName, OutputInner output) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (outputName == null) { - throw new IllegalArgumentException("Parameter outputName is required and cannot be null."); - } - Validator.validate(output); - final String apiVersion = "2016-03-01"; - return service.beginTest(this.client.subscriptionId(), resourceGroupName, jobName, outputName, output, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginTestDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginTestDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OutputInner> object if successful. - */ - public PagedList listByStreamingJobNext(final String nextPageLink) { - ServiceResponse> response = listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByStreamingJobNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByStreamingJobNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OutputInner> object - */ - public Observable> listByStreamingJobNextAsync(final String nextPageLink) { - return listByStreamingJobNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OutputInner> object - */ - public Observable>> listByStreamingJobNextWithServiceResponseAsync(final String nextPageLink) { - return listByStreamingJobNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByStreamingJobNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the outputs under the specified streaming job. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OutputInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByStreamingJobNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByStreamingJobNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByStreamingJobNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByStreamingJobNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsUpdateHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsUpdateHeadersInner.java deleted file mode 100755 index 813fd3100c9..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/OutputsUpdateHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Update operation. - */ -public class OutputsUpdateHeadersInner { - /** - * The current entity tag for the output. This is an opaque string. You can - * use it to detect whether the resource has changed between requests. You - * can also use it in the If-Match or If-None-Match headers for write - * operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the OutputsUpdateHeadersInner object itself. - */ - public OutputsUpdateHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/PageImpl.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/PageImpl.java deleted file mode 100755 index e742628a1e9..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/PageImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/ResourceTestStatusInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/ResourceTestStatusInner.java deleted file mode 100755 index 3396d09365e..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/ResourceTestStatusInner.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.management.streamanalytics.ErrorResponse; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes the status of the test operation along with error information, if - * applicable. - */ -public class ResourceTestStatusInner { - /** - * The status of the test operation. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private String status; - - /** - * Describes the error that occurred. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ErrorResponse error; - - /** - * Get the status value. - * - * @return the status value - */ - public String status() { - return this.status; - } - - /** - * Get the error value. - * - * @return the error value - */ - public ErrorResponse error() { - return this.error; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StartStreamingJobParametersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StartStreamingJobParametersInner.java deleted file mode 100755 index 193b94431c3..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StartStreamingJobParametersInner.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.management.streamanalytics.OutputStartMode; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters supplied to the Start Streaming Job operation. - */ -public class StartStreamingJobParametersInner { - /** - * Value may be JobStartTime, CustomTime, or LastOutputEventTime to - * indicate whether the starting point of the output event stream should - * start whenever the job is started, start at a custom user time stamp - * specified via the outputStartTime property, or start from the last event - * output time. Possible values include: 'JobStartTime', 'CustomTime', - * 'LastOutputEventTime'. - */ - @JsonProperty(value = "outputStartMode") - private OutputStartMode outputStartMode; - - /** - * Value is either an ISO-8601 formatted time stamp that indicates the - * starting point of the output event stream, or null to indicate that the - * output event stream will start whenever the streaming job is started. - * This property must have a value if outputStartMode is set to CustomTime. - */ - @JsonProperty(value = "outputStartTime") - private DateTime outputStartTime; - - /** - * Get the outputStartMode value. - * - * @return the outputStartMode value - */ - public OutputStartMode outputStartMode() { - return this.outputStartMode; - } - - /** - * Set the outputStartMode value. - * - * @param outputStartMode the outputStartMode value to set - * @return the StartStreamingJobParametersInner object itself. - */ - public StartStreamingJobParametersInner withOutputStartMode(OutputStartMode outputStartMode) { - this.outputStartMode = outputStartMode; - return this; - } - - /** - * Get the outputStartTime value. - * - * @return the outputStartTime value - */ - public DateTime outputStartTime() { - return this.outputStartTime; - } - - /** - * Set the outputStartTime value. - * - * @param outputStartTime the outputStartTime value to set - * @return the StartStreamingJobParametersInner object itself. - */ - public StartStreamingJobParametersInner withOutputStartTime(DateTime outputStartTime) { - this.outputStartTime = outputStartTime; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamAnalyticsManagementClientImpl.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamAnalyticsManagementClientImpl.java deleted file mode 100755 index aa6ec5ef975..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamAnalyticsManagementClientImpl.java +++ /dev/null @@ -1,267 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the StreamAnalyticsManagementClientImpl class. - */ -public class StreamAnalyticsManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** GUID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ - private String subscriptionId; - - /** - * Gets GUID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets GUID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public StreamAnalyticsManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public StreamAnalyticsManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public StreamAnalyticsManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public StreamAnalyticsManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * The StreamingJobsInner object to access its operations. - */ - private StreamingJobsInner streamingJobs; - - /** - * Gets the StreamingJobsInner object to access its operations. - * @return the StreamingJobsInner object. - */ - public StreamingJobsInner streamingJobs() { - return this.streamingJobs; - } - - /** - * The InputsInner object to access its operations. - */ - private InputsInner inputs; - - /** - * Gets the InputsInner object to access its operations. - * @return the InputsInner object. - */ - public InputsInner inputs() { - return this.inputs; - } - - /** - * The OutputsInner object to access its operations. - */ - private OutputsInner outputs; - - /** - * Gets the OutputsInner object to access its operations. - * @return the OutputsInner object. - */ - public OutputsInner outputs() { - return this.outputs; - } - - /** - * The TransformationsInner object to access its operations. - */ - private TransformationsInner transformations; - - /** - * Gets the TransformationsInner object to access its operations. - * @return the TransformationsInner object. - */ - public TransformationsInner transformations() { - return this.transformations; - } - - /** - * The FunctionsInner object to access its operations. - */ - private FunctionsInner functions; - - /** - * Gets the FunctionsInner object to access its operations. - * @return the FunctionsInner object. - */ - public FunctionsInner functions() { - return this.functions; - } - - /** - * The SubscriptionsInner object to access its operations. - */ - private SubscriptionsInner subscriptions; - - /** - * Gets the SubscriptionsInner object to access its operations. - * @return the SubscriptionsInner object. - */ - public SubscriptionsInner subscriptions() { - return this.subscriptions; - } - - /** - * Initializes an instance of StreamAnalyticsManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public StreamAnalyticsManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of StreamAnalyticsManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public StreamAnalyticsManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of StreamAnalyticsManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public StreamAnalyticsManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.operations = new OperationsInner(restClient().retrofit(), this); - this.streamingJobs = new StreamingJobsInner(restClient().retrofit(), this); - this.inputs = new InputsInner(restClient().retrofit(), this); - this.outputs = new OutputsInner(restClient().retrofit(), this); - this.transformations = new TransformationsInner(restClient().retrofit(), this); - this.functions = new FunctionsInner(restClient().retrofit(), this); - this.subscriptions = new SubscriptionsInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s)", super.userAgent(), "StreamAnalyticsManagementClient"); - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamAnalyticsManager.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamAnalyticsManager.java deleted file mode 100755 index 04cd5262e3b..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamAnalyticsManager.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.AzureEnvironment; -import com.microsoft.azure.AzureResponseBuilder; -import com.microsoft.azure.credentials.AzureTokenCredentials; -import com.microsoft.azure.management.apigeneration.Beta; -import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; -import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor; -import com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor; -import com.microsoft.azure.serializer.AzureJacksonAdapter; -import com.microsoft.rest.RestClient; - -/** - * Entry point to Azure StreamAnalytics resource management. - */ -@Beta(SinceVersion.V1_2_0) -public final class StreamAnalyticsManager extends Manager { - /** - * Get a Configurable instance that can be used to create StreamAnalyticsManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new StreamAnalyticsManager.ConfigurableImpl(); - } - /** - * Creates an instance of StreamAnalyticsManager that exposes StreamAnalytics resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the StreamAnalyticsManager - */ - public static StreamAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new StreamAnalyticsManager(new RestClient.Builder() - .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) - .withCredentials(credentials) - .withSerializerAdapter(new AzureJacksonAdapter()) - .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) - .withInterceptor(new ProviderRegistrationInterceptor(credentials)) - .withInterceptor(new ResourceManagerThrottlingInterceptor()) - .build(), subscriptionId); - } - /** - * Creates an instance of StreamAnalyticsManager that exposes StreamAnalytics resource management API entry points. - * - * @param restClient the RestClient to be used for API calls. - * @param subscriptionId the subscription UUID - * @return the StreamAnalyticsManager - */ - public static StreamAnalyticsManager authenticate(RestClient restClient, String subscriptionId) { - return new StreamAnalyticsManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of StreamAnalyticsManager that exposes StreamAnalytics management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the interface exposing StreamAnalytics management API entry points that work across subscriptions - */ - StreamAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId); - } - /** - * The implementation for Configurable interface. - */ - private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { - public StreamAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return StreamAnalyticsManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private StreamAnalyticsManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new StreamAnalyticsManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobInner.java deleted file mode 100755 index a982b979cd8..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobInner.java +++ /dev/null @@ -1,500 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.management.streamanalytics.Sku; -import com.microsoft.azure.management.streamanalytics.OutputStartMode; -import org.joda.time.DateTime; -import com.microsoft.azure.management.streamanalytics.EventsOutOfOrderPolicy; -import com.microsoft.azure.management.streamanalytics.OutputErrorPolicy; -import com.microsoft.azure.management.streamanalytics.CompatibilityLevel; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A streamng job object, containing all information associated with the named - * streaming job. - */ -@JsonFlatten -public class StreamingJobInner extends Resource { - /** - * Describes the SKU of the streaming job. Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.sku") - private Sku sku; - - /** - * A GUID uniquely identifying the streaming job. This GUID is generated - * upon creation of the streaming job. - */ - @JsonProperty(value = "properties.jobId", access = JsonProperty.Access.WRITE_ONLY) - private String jobId; - - /** - * Describes the provisioning status of the streaming job. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * Describes the state of the streaming job. - */ - @JsonProperty(value = "properties.jobState", access = JsonProperty.Access.WRITE_ONLY) - private String jobState; - - /** - * This property should only be utilized when it is desired that the job be - * started immediately upon creation. Value may be JobStartTime, - * CustomTime, or LastOutputEventTime to indicate whether the starting - * point of the output event stream should start whenever the job is - * started, start at a custom user time stamp specified via the - * outputStartTime property, or start from the last event output time. - * Possible values include: 'JobStartTime', 'CustomTime', - * 'LastOutputEventTime'. - */ - @JsonProperty(value = "properties.outputStartMode") - private OutputStartMode outputStartMode; - - /** - * Value is either an ISO-8601 formatted time stamp that indicates the - * starting point of the output event stream, or null to indicate that the - * output event stream will start whenever the streaming job is started. - * This property must have a value if outputStartMode is set to CustomTime. - */ - @JsonProperty(value = "properties.outputStartTime") - private DateTime outputStartTime; - - /** - * Value is either an ISO-8601 formatted timestamp indicating the last - * output event time of the streaming job or null indicating that output - * has not yet been produced. In case of multiple outputs or multiple - * streams, this shows the latest value in that set. - */ - @JsonProperty(value = "properties.lastOutputEventTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastOutputEventTime; - - /** - * Indicates the policy to apply to events that arrive out of order in the - * input event stream. Possible values include: 'Adjust', 'Drop'. - */ - @JsonProperty(value = "properties.eventsOutOfOrderPolicy") - private EventsOutOfOrderPolicy eventsOutOfOrderPolicy; - - /** - * Indicates the policy to apply to events that arrive at the output and - * cannot be written to the external storage due to being malformed - * (missing column values, column values of wrong type or size). Possible - * values include: 'Stop', 'Drop'. - */ - @JsonProperty(value = "properties.outputErrorPolicy") - private OutputErrorPolicy outputErrorPolicy; - - /** - * The maximum tolerable delay in seconds where out-of-order events can be - * adjusted to be back in order. - */ - @JsonProperty(value = "properties.eventsOutOfOrderMaxDelayInSeconds") - private Integer eventsOutOfOrderMaxDelayInSeconds; - - /** - * The maximum tolerable delay in seconds where events arriving late could - * be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 - * is used to specify wait indefinitely. If the property is absent, it is - * interpreted to have a value of -1. - */ - @JsonProperty(value = "properties.eventsLateArrivalMaxDelayInSeconds") - private Integer eventsLateArrivalMaxDelayInSeconds; - - /** - * The data locale of the stream analytics job. Value should be the name of - * a supported .NET Culture from the set - * https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. - * Defaults to 'en-US' if none specified. - */ - @JsonProperty(value = "properties.dataLocale") - private String dataLocale; - - /** - * Controls certain runtime behaviors of the streaming job. Possible values - * include: '1.0'. - */ - @JsonProperty(value = "properties.compatibilityLevel") - private CompatibilityLevel compatibilityLevel; - - /** - * Value is an ISO-8601 formatted UTC timestamp indicating when the - * streaming job was created. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private DateTime createdDate; - - /** - * A list of one or more inputs to the streaming job. The name property for - * each input is required when specifying this property in a PUT request. - * This property cannot be modify via a PATCH operation. You must use the - * PATCH API available for the individual input. - */ - @JsonProperty(value = "properties.inputs") - private List inputs; - - /** - * Indicates the query and the number of streaming units to use for the - * streaming job. The name property of the transformation is required when - * specifying this property in a PUT request. This property cannot be - * modify via a PATCH operation. You must use the PATCH API available for - * the individual tranformation. - */ - @JsonProperty(value = "properties.transformation") - private TransformationInner transformation; - - /** - * A list of one or more outputs for the streaming job. The name property - * for each output is required when specifying this property in a PUT - * request. This property cannot be modify via a PATCH operation. You must - * use the PATCH API available for the individual output. - */ - @JsonProperty(value = "properties.outputs") - private List outputs; - - /** - * A list of one or more functions for the streaming job. The name property - * for each function is required when specifying this property in a PUT - * request. This property cannot be modify via a PATCH operation. You must - * use the PATCH API available for the individual transformation. - */ - @JsonProperty(value = "properties.functions") - private List functions; - - /** - * The current entity tag for the streaming job. This is an opaque string. - * You can use it to detect whether the resource has changed between - * requests. You can also use it in the If-Match or If-None-Match headers - * for write operations for optimistic concurrency. - */ - @JsonProperty(value = "properties.etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the jobId value. - * - * @return the jobId value - */ - public String jobId() { - return this.jobId; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the jobState value. - * - * @return the jobState value - */ - public String jobState() { - return this.jobState; - } - - /** - * Get the outputStartMode value. - * - * @return the outputStartMode value - */ - public OutputStartMode outputStartMode() { - return this.outputStartMode; - } - - /** - * Set the outputStartMode value. - * - * @param outputStartMode the outputStartMode value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withOutputStartMode(OutputStartMode outputStartMode) { - this.outputStartMode = outputStartMode; - return this; - } - - /** - * Get the outputStartTime value. - * - * @return the outputStartTime value - */ - public DateTime outputStartTime() { - return this.outputStartTime; - } - - /** - * Set the outputStartTime value. - * - * @param outputStartTime the outputStartTime value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withOutputStartTime(DateTime outputStartTime) { - this.outputStartTime = outputStartTime; - return this; - } - - /** - * Get the lastOutputEventTime value. - * - * @return the lastOutputEventTime value - */ - public DateTime lastOutputEventTime() { - return this.lastOutputEventTime; - } - - /** - * Get the eventsOutOfOrderPolicy value. - * - * @return the eventsOutOfOrderPolicy value - */ - public EventsOutOfOrderPolicy eventsOutOfOrderPolicy() { - return this.eventsOutOfOrderPolicy; - } - - /** - * Set the eventsOutOfOrderPolicy value. - * - * @param eventsOutOfOrderPolicy the eventsOutOfOrderPolicy value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withEventsOutOfOrderPolicy(EventsOutOfOrderPolicy eventsOutOfOrderPolicy) { - this.eventsOutOfOrderPolicy = eventsOutOfOrderPolicy; - return this; - } - - /** - * Get the outputErrorPolicy value. - * - * @return the outputErrorPolicy value - */ - public OutputErrorPolicy outputErrorPolicy() { - return this.outputErrorPolicy; - } - - /** - * Set the outputErrorPolicy value. - * - * @param outputErrorPolicy the outputErrorPolicy value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withOutputErrorPolicy(OutputErrorPolicy outputErrorPolicy) { - this.outputErrorPolicy = outputErrorPolicy; - return this; - } - - /** - * Get the eventsOutOfOrderMaxDelayInSeconds value. - * - * @return the eventsOutOfOrderMaxDelayInSeconds value - */ - public Integer eventsOutOfOrderMaxDelayInSeconds() { - return this.eventsOutOfOrderMaxDelayInSeconds; - } - - /** - * Set the eventsOutOfOrderMaxDelayInSeconds value. - * - * @param eventsOutOfOrderMaxDelayInSeconds the eventsOutOfOrderMaxDelayInSeconds value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withEventsOutOfOrderMaxDelayInSeconds(Integer eventsOutOfOrderMaxDelayInSeconds) { - this.eventsOutOfOrderMaxDelayInSeconds = eventsOutOfOrderMaxDelayInSeconds; - return this; - } - - /** - * Get the eventsLateArrivalMaxDelayInSeconds value. - * - * @return the eventsLateArrivalMaxDelayInSeconds value - */ - public Integer eventsLateArrivalMaxDelayInSeconds() { - return this.eventsLateArrivalMaxDelayInSeconds; - } - - /** - * Set the eventsLateArrivalMaxDelayInSeconds value. - * - * @param eventsLateArrivalMaxDelayInSeconds the eventsLateArrivalMaxDelayInSeconds value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withEventsLateArrivalMaxDelayInSeconds(Integer eventsLateArrivalMaxDelayInSeconds) { - this.eventsLateArrivalMaxDelayInSeconds = eventsLateArrivalMaxDelayInSeconds; - return this; - } - - /** - * Get the dataLocale value. - * - * @return the dataLocale value - */ - public String dataLocale() { - return this.dataLocale; - } - - /** - * Set the dataLocale value. - * - * @param dataLocale the dataLocale value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withDataLocale(String dataLocale) { - this.dataLocale = dataLocale; - return this; - } - - /** - * Get the compatibilityLevel value. - * - * @return the compatibilityLevel value - */ - public CompatibilityLevel compatibilityLevel() { - return this.compatibilityLevel; - } - - /** - * Set the compatibilityLevel value. - * - * @param compatibilityLevel the compatibilityLevel value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withCompatibilityLevel(CompatibilityLevel compatibilityLevel) { - this.compatibilityLevel = compatibilityLevel; - return this; - } - - /** - * Get the createdDate value. - * - * @return the createdDate value - */ - public DateTime createdDate() { - return this.createdDate; - } - - /** - * Get the inputs value. - * - * @return the inputs value - */ - public List inputs() { - return this.inputs; - } - - /** - * Set the inputs value. - * - * @param inputs the inputs value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withInputs(List inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the transformation value. - * - * @return the transformation value - */ - public TransformationInner transformation() { - return this.transformation; - } - - /** - * Set the transformation value. - * - * @param transformation the transformation value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withTransformation(TransformationInner transformation) { - this.transformation = transformation; - return this; - } - - /** - * Get the outputs value. - * - * @return the outputs value - */ - public List outputs() { - return this.outputs; - } - - /** - * Set the outputs value. - * - * @param outputs the outputs value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withOutputs(List outputs) { - this.outputs = outputs; - return this; - } - - /** - * Get the functions value. - * - * @return the functions value - */ - public List functions() { - return this.functions; - } - - /** - * Set the functions value. - * - * @param functions the functions value to set - * @return the StreamingJobInner object itself. - */ - public StreamingJobInner withFunctions(List functions) { - this.functions = functions; - return this; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsCreateOrReplaceHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsCreateOrReplaceHeadersInner.java deleted file mode 100755 index e85095baa2b..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsCreateOrReplaceHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for CreateOrReplace operation. - */ -public class StreamingJobsCreateOrReplaceHeadersInner { - /** - * The current entity tag for the streaming job. This is an opaque string. - * You can use it to detect whether the resource has changed between - * requests. You can also use it in the If-Match or If-None-Match headers - * for write operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the StreamingJobsCreateOrReplaceHeadersInner object itself. - */ - public StreamingJobsCreateOrReplaceHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsGetHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsGetHeadersInner.java deleted file mode 100755 index 16cab783c2f..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsGetHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class StreamingJobsGetHeadersInner { - /** - * The current entity tag for the streaming job. This is an opaque string. - * You can use it to detect whether the resource has changed between - * requests. You can also use it in the If-Match or If-None-Match headers - * for write operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the StreamingJobsGetHeadersInner object itself. - */ - public StreamingJobsGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsInner.java deleted file mode 100755 index dfa75fd6fb0..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsInner.java +++ /dev/null @@ -1,2083 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in StreamingJobs. - */ -public class StreamingJobsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private StreamingJobsService service; - /** The service client containing this operation class. */ - private StreamAnalyticsManagementClientImpl client; - - /** - * Initializes an instance of StreamingJobsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public StreamingJobsInner(Retrofit retrofit, StreamAnalyticsManagementClientImpl client) { - this.service = retrofit.create(StreamingJobsService.class); - this.client = client; - } - - /** - * The interface defining all the services for StreamingJobs to be - * used by Retrofit to perform actually REST calls. - */ - interface StreamingJobsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs createOrReplace" }) - @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}") - Observable> createOrReplace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Body StreamingJobInner streamingJob, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs beginCreateOrReplace" }) - @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}") - Observable> beginCreateOrReplace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Body StreamingJobInner streamingJob, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs update" }) - @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Body StreamingJobInner streamingJob, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}") - Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs") - Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/streamingjobs") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs start" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start") - Observable> start(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Body StartStreamingJobParametersInner startJobParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs beginStart" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start") - Observable> beginStart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Body StartStreamingJobParametersInner startJobParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs stop" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/stop") - Observable> stop(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs beginStop" }) - @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/stop") - Observable> beginStop(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the StreamingJobInner object if successful. - */ - public StreamingJobInner createOrReplace(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).toBlocking().last().body(); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob), serviceCallback); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).map(new Func1, StreamingJobInner>() { - @Override - public StreamingJobInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (streamingJob == null) { - throw new IllegalArgumentException("Parameter streamingJob is required and cannot be null."); - } - Validator.validate(streamingJob); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - final String ifNoneMatch = null; - Observable> observable = service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), StreamingJobsCreateOrReplaceHeadersInner.class); - } - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the StreamingJobInner object if successful. - */ - public StreamingJobInner createOrReplace(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch).toBlocking().last().body(); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch), serviceCallback); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch).map(new Func1, StreamingJobInner>() { - @Override - public StreamingJobInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (streamingJob == null) { - throw new IllegalArgumentException("Parameter streamingJob is required and cannot be null."); - } - Validator.validate(streamingJob); - final String apiVersion = "2016-03-01"; - Observable> observable = service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), StreamingJobsCreateOrReplaceHeadersInner.class); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the StreamingJobInner object if successful. - */ - public StreamingJobInner beginCreateOrReplace(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - return beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).toBlocking().single().body(); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob), serviceCallback); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable beginCreateOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - return beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).map(new Func1, StreamingJobInner>() { - @Override - public StreamingJobInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable> beginCreateOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (streamingJob == null) { - throw new IllegalArgumentException("Parameter streamingJob is required and cannot be null."); - } - Validator.validate(streamingJob); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - final String ifNoneMatch = null; - return service.beginCreateOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = beginCreateOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the StreamingJobInner object if successful. - */ - public StreamingJobInner beginCreateOrReplace(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch) { - return beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch).toBlocking().single().body(); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch), serviceCallback); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable beginCreateOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch) { - return beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch).map(new Func1, StreamingJobInner>() { - @Override - public StreamingJobInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates a streaming job or replaces an already existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob The definition of the streaming job that will be used to create a new streaming job or replace the existing one. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable> beginCreateOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (streamingJob == null) { - throw new IllegalArgumentException("Parameter streamingJob is required and cannot be null."); - } - Validator.validate(streamingJob); - final String apiVersion = "2016-03-01"; - return service.beginCreateOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = beginCreateOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders beginCreateOrReplaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, StreamingJobsCreateOrReplaceHeadersInner.class); - } - - /** - * Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob A streaming job object. The properties specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the StreamingJobInner object if successful. - */ - public StreamingJobInner update(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).toBlocking().single().body(); - } - - /** - * Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob A streaming job object. The properties specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, streamingJob), serviceCallback); - } - - /** - * Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob A streaming job object. The properties specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).map(new Func1, StreamingJobInner>() { - @Override - public StreamingJobInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob A streaming job object. The properties specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (streamingJob == null) { - throw new IllegalArgumentException("Parameter streamingJob is required and cannot be null."); - } - Validator.validate(streamingJob); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, streamingJob, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob A streaming job object. The properties specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the StreamingJobInner object if successful. - */ - public StreamingJobInner update(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob A streaming job object. The properties specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch), serviceCallback); - } - - /** - * Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob A streaming job object. The properties specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch).map(new Func1, StreamingJobInner>() { - @Override - public StreamingJobInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param streamingJob A streaming job object. The properties specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (streamingJob == null) { - throw new IllegalArgumentException("Parameter streamingJob is required and cannot be null."); - } - Validator.validate(streamingJob); - final String apiVersion = "2016-03-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, streamingJob, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, StreamingJobsUpdateHeadersInner.class); - } - - /** - * Deletes a streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String jobName) { - deleteWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().last().body(); - } - - /** - * Deletes a streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); - } - - /** - * Deletes a streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String jobName) { - return deleteWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, jobName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes a streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String jobName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().single().body(); - } - - /** - * Deletes a streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); - } - - /** - * Deletes a streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String jobName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, jobName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets details about the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the StreamingJobInner object if successful. - */ - public StreamingJobInner getByResourceGroup(String resourceGroupName, String jobName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().single().body(); - } - - /** - * Gets details about the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); - } - - /** - * Gets details about the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String jobName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, StreamingJobInner>() { - @Override - public StreamingJobInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets details about the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final String expand = null; - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, jobName, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets details about the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the StreamingJobInner object if successful. - */ - public StreamingJobInner getByResourceGroup(String resourceGroupName, String jobName, String expand) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName, expand).toBlocking().single().body(); - } - - /** - * Gets details about the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String jobName, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName, expand), serviceCallback); - } - - /** - * Gets details about the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String jobName, String expand) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName, expand).map(new Func1, StreamingJobInner>() { - @Override - public StreamingJobInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets details about the specified streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StreamingJobInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String jobName, String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, jobName, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, StreamingJobsGetHeadersInner.class); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<StreamingJobInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<StreamingJobInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final String expand = null; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<StreamingJobInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName, final String expand) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, expand).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String expand, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName, expand), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final String expand) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, expand) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String expand) { - return listByResourceGroupSinglePageAsync(resourceGroupName, expand) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - ServiceResponse> * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<StreamingJobInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<StreamingJobInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<StreamingJobInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final String expand = null; - return service.list(this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<StreamingJobInner> object if successful. - */ - public PagedList list(final String expand) { - ServiceResponse> response = listSinglePageAsync(expand).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String expand, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(expand), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable> listAsync(final String expand) { - return listWithServiceResponseAsync(expand) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable>> listWithServiceResponseAsync(final String expand) { - return listSinglePageAsync(expand) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - ServiceResponse> * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<StreamingJobInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String expand) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.list(this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void start(String resourceGroupName, String jobName) { - startWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().last().body(); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture startAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable startAsync(String resourceGroupName, String jobName) { - return startWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> startWithServiceResponseAsync(String resourceGroupName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final StartStreamingJobParametersInner startJobParameters = null; - Observable> observable = service.start(this.client.subscriptionId(), resourceGroupName, jobName, startJobParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param startJobParameters Parameters applicable to a start streaming job operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void start(String resourceGroupName, String jobName, StartStreamingJobParametersInner startJobParameters) { - startWithServiceResponseAsync(resourceGroupName, jobName, startJobParameters).toBlocking().last().body(); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param startJobParameters Parameters applicable to a start streaming job operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture startAsync(String resourceGroupName, String jobName, StartStreamingJobParametersInner startJobParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, jobName, startJobParameters), serviceCallback); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param startJobParameters Parameters applicable to a start streaming job operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable startAsync(String resourceGroupName, String jobName, StartStreamingJobParametersInner startJobParameters) { - return startWithServiceResponseAsync(resourceGroupName, jobName, startJobParameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param startJobParameters Parameters applicable to a start streaming job operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> startWithServiceResponseAsync(String resourceGroupName, String jobName, StartStreamingJobParametersInner startJobParameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - Validator.validate(startJobParameters); - final String apiVersion = "2016-03-01"; - Observable> observable = service.start(this.client.subscriptionId(), resourceGroupName, jobName, startJobParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginStart(String resourceGroupName, String jobName) { - beginStartWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().single().body(); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginStartAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginStartAsync(String resourceGroupName, String jobName) { - return beginStartWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - final StartStreamingJobParametersInner startJobParameters = null; - return service.beginStart(this.client.subscriptionId(), resourceGroupName, jobName, startJobParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginStartDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param startJobParameters Parameters applicable to a start streaming job operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginStart(String resourceGroupName, String jobName, StartStreamingJobParametersInner startJobParameters) { - beginStartWithServiceResponseAsync(resourceGroupName, jobName, startJobParameters).toBlocking().single().body(); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param startJobParameters Parameters applicable to a start streaming job operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginStartAsync(String resourceGroupName, String jobName, StartStreamingJobParametersInner startJobParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, jobName, startJobParameters), serviceCallback); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param startJobParameters Parameters applicable to a start streaming job operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginStartAsync(String resourceGroupName, String jobName, StartStreamingJobParametersInner startJobParameters) { - return beginStartWithServiceResponseAsync(resourceGroupName, jobName, startJobParameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Starts a streaming job. Once a job is started it will start processing input events and produce output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param startJobParameters Parameters applicable to a start streaming job operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String jobName, StartStreamingJobParametersInner startJobParameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - Validator.validate(startJobParameters); - final String apiVersion = "2016-03-01"; - return service.beginStart(this.client.subscriptionId(), resourceGroupName, jobName, startJobParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginStartDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void stop(String resourceGroupName, String jobName) { - stopWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().last().body(); - } - - /** - * Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture stopAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); - } - - /** - * Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable stopAsync(String resourceGroupName, String jobName) { - return stopWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> stopWithServiceResponseAsync(String resourceGroupName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - Observable> observable = service.stop(this.client.subscriptionId(), resourceGroupName, jobName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginStop(String resourceGroupName, String jobName) { - beginStopWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().single().body(); - } - - /** - * Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginStopAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); - } - - /** - * Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginStopAsync(String resourceGroupName, String jobName) { - return beginStopWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String jobName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.beginStop(this.client.subscriptionId(), resourceGroupName, jobName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginStopDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginStopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<StreamingJobInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the streaming jobs in the specified resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<StreamingJobInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<StreamingJobInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<StreamingJobInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the streaming jobs in the given subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<StreamingJobInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsUpdateHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsUpdateHeadersInner.java deleted file mode 100755 index 949abfe4c7a..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/StreamingJobsUpdateHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Update operation. - */ -public class StreamingJobsUpdateHeadersInner { - /** - * The current entity tag for the streaming job. This is an opaque string. - * You can use it to detect whether the resource has changed between - * requests. You can also use it in the If-Match or If-None-Match headers - * for write operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the StreamingJobsUpdateHeadersInner object itself. - */ - public StreamingJobsUpdateHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionQuotaInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionQuotaInner.java deleted file mode 100755 index cf2327e3761..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionQuotaInner.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; - -/** - * Describes the current quota for the subscription. - */ -@JsonFlatten -public class SubscriptionQuotaInner extends SubResource { - /** - * The max permitted usage of this resource. - */ - @JsonProperty(value = "properties.maxCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer maxCount; - - /** - * The current usage of this resource. - */ - @JsonProperty(value = "properties.currentCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer currentCount; - - /** - * Get the maxCount value. - * - * @return the maxCount value - */ - public Integer maxCount() { - return this.maxCount; - } - - /** - * Get the currentCount value. - * - * @return the currentCount value - */ - public Integer currentCount() { - return this.currentCount; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionQuotasListResultInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionQuotasListResultInner.java deleted file mode 100755 index 90a551b571e..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionQuotasListResultInner.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Result of the GetQuotas operation. It contains a list of quotas for the - * subscription in a particular region. - */ -public class SubscriptionQuotasListResultInner { - /** - * List of quotas for the subscription in a particular region. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionsInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionsInner.java deleted file mode 100755 index 2246aded9de..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/SubscriptionsInner.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Subscriptions. - */ -public class SubscriptionsInner { - /** The Retrofit service to perform REST calls. */ - private SubscriptionsService service; - /** The service client containing this operation class. */ - private StreamAnalyticsManagementClientImpl client; - - /** - * Initializes an instance of SubscriptionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public SubscriptionsInner(Retrofit retrofit, StreamAnalyticsManagementClientImpl client) { - this.service = retrofit.create(SubscriptionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Subscriptions to be - * used by Retrofit to perform actually REST calls. - */ - interface SubscriptionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Subscriptions listQuotas" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/locations/{location}/quotas") - Observable> listQuotas(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Retrieves the subscription's current quota information in a particular region. - * - * @param location The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the SubscriptionQuotasListResultInner object if successful. - */ - public SubscriptionQuotasListResultInner listQuotas(String location) { - return listQuotasWithServiceResponseAsync(location).toBlocking().single().body(); - } - - /** - * Retrieves the subscription's current quota information in a particular region. - * - * @param location The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listQuotasAsync(String location, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listQuotasWithServiceResponseAsync(location), serviceCallback); - } - - /** - * Retrieves the subscription's current quota information in a particular region. - * - * @param location The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SubscriptionQuotasListResultInner object - */ - public Observable listQuotasAsync(String location) { - return listQuotasWithServiceResponseAsync(location).map(new Func1, SubscriptionQuotasListResultInner>() { - @Override - public SubscriptionQuotasListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Retrieves the subscription's current quota information in a particular region. - * - * @param location The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the SubscriptionQuotasListResultInner object - */ - public Observable> listQuotasWithServiceResponseAsync(String location) { - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.listQuotas(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listQuotasDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listQuotasDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationInner.java deleted file mode 100755 index 4009b04a3ea..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationInner.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; - -/** - * A transformation object, containing all information associated with the - * named transformation. All transformations are contained under a streaming - * job. - */ -@JsonFlatten -public class TransformationInner extends SubResource { - /** - * Specifies the number of streaming units that the streaming job uses. - */ - @JsonProperty(value = "properties.streamingUnits") - private Integer streamingUnits; - - /** - * Specifies the query that will be run in the streaming job. You can learn - * more about the Stream Analytics Query Language (SAQL) here: - * https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT - * (CreateOrReplace) requests. - */ - @JsonProperty(value = "properties.query") - private String query; - - /** - * The current entity tag for the transformation. This is an opaque string. - * You can use it to detect whether the resource has changed between - * requests. You can also use it in the If-Match or If-None-Match headers - * for write operations for optimistic concurrency. - */ - @JsonProperty(value = "properties.etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the streamingUnits value. - * - * @return the streamingUnits value - */ - public Integer streamingUnits() { - return this.streamingUnits; - } - - /** - * Set the streamingUnits value. - * - * @param streamingUnits the streamingUnits value to set - * @return the TransformationInner object itself. - */ - public TransformationInner withStreamingUnits(Integer streamingUnits) { - this.streamingUnits = streamingUnits; - return this; - } - - /** - * Get the query value. - * - * @return the query value - */ - public String query() { - return this.query; - } - - /** - * Set the query value. - * - * @param query the query value to set - * @return the TransformationInner object itself. - */ - public TransformationInner withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsCreateOrReplaceHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsCreateOrReplaceHeadersInner.java deleted file mode 100755 index a738715553a..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsCreateOrReplaceHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for CreateOrReplace operation. - */ -public class TransformationsCreateOrReplaceHeadersInner { - /** - * The current entity tag for the transformation. This is an opaque string. - * You can use it to detect whether the resource has changed between - * requests. You can also use it in the If-Match or If-None-Match headers - * for write operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TransformationsCreateOrReplaceHeadersInner object itself. - */ - public TransformationsCreateOrReplaceHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsGetHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsGetHeadersInner.java deleted file mode 100755 index 0061e3c0f76..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsGetHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Get operation. - */ -public class TransformationsGetHeadersInner { - /** - * The current entity tag for the transformation. This is an opaque string. - * You can use it to detect whether the resource has changed between - * requests. You can also use it in the If-Match or If-None-Match headers - * for write operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TransformationsGetHeadersInner object itself. - */ - public TransformationsGetHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsInner.java deleted file mode 100755 index 16c39e85ac6..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsInner.java +++ /dev/null @@ -1,561 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Transformations. - */ -public class TransformationsInner { - /** The Retrofit service to perform REST calls. */ - private TransformationsService service; - /** The service client containing this operation class. */ - private StreamAnalyticsManagementClientImpl client; - - /** - * Initializes an instance of TransformationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public TransformationsInner(Retrofit retrofit, StreamAnalyticsManagementClientImpl client) { - this.service = retrofit.create(TransformationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Transformations to be - * used by Retrofit to perform actually REST calls. - */ - interface TransformationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Transformations createOrReplace" }) - @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}") - Observable> createOrReplace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("transformationName") String transformationName, @Body TransformationInner transformation, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Transformations update" }) - @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("transformationName") String transformationName, @Body TransformationInner transformation, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.Transformations get" }) - @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Path("transformationName") String transformationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Creates a transformation or replaces an already existing transformation under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TransformationInner object if successful. - */ - public TransformationInner createOrReplace(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation).toBlocking().single().body(); - } - - /** - * Creates a transformation or replaces an already existing transformation under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation), serviceCallback); - } - - /** - * Creates a transformation or replaces an already existing transformation under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation).map(new Func1, TransformationInner>() { - @Override - public TransformationInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates a transformation or replaces an already existing transformation under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (transformationName == null) { - throw new IllegalArgumentException("Parameter transformationName is required and cannot be null."); - } - if (transformation == null) { - throw new IllegalArgumentException("Parameter transformation is required and cannot be null."); - } - Validator.validate(transformation); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - final String ifNoneMatch = null; - return service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, transformationName, transformation, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates a transformation or replaces an already existing transformation under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TransformationInner object if successful. - */ - public TransformationInner createOrReplace(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation, ifMatch, ifNoneMatch).toBlocking().single().body(); - } - - /** - * Creates a transformation or replaces an already existing transformation under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrReplaceAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation, ifMatch, ifNoneMatch), serviceCallback); - } - - /** - * Creates a transformation or replaces an already existing transformation under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable createOrReplaceAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch, String ifNoneMatch) { - return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation, ifMatch, ifNoneMatch).map(new Func1, TransformationInner>() { - @Override - public TransformationInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Creates a transformation or replaces an already existing transformation under an existing streaming job. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable> createOrReplaceWithServiceResponseAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch, String ifNoneMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (transformationName == null) { - throw new IllegalArgumentException("Parameter transformationName is required and cannot be null."); - } - if (transformation == null) { - throw new IllegalArgumentException("Parameter transformation is required and cannot be null."); - } - Validator.validate(transformation); - final String apiVersion = "2016-03-01"; - return service.createOrReplace(this.client.subscriptionId(), resourceGroupName, jobName, transformationName, transformation, ifMatch, ifNoneMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = createOrReplaceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders createOrReplaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, TransformationsCreateOrReplaceHeadersInner.class); - } - - /** - * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TransformationInner object if successful. - */ - public TransformationInner update(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation).toBlocking().single().body(); - } - - /** - * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation), serviceCallback); - } - - /** - * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation).map(new Func1, TransformationInner>() { - @Override - public TransformationInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (transformationName == null) { - throw new IllegalArgumentException("Parameter transformationName is required and cannot be null."); - } - if (transformation == null) { - throw new IllegalArgumentException("Parameter transformation is required and cannot be null."); - } - Validator.validate(transformation); - final String apiVersion = "2016-03-01"; - final String ifMatch = null; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, transformationName, transformation, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TransformationInner object if successful. - */ - public TransformationInner update(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation, ifMatch).toBlocking().single().body(); - } - - /** - * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation, ifMatch), serviceCallback); - } - - /** - * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable updateAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch) { - return updateWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation, ifMatch).map(new Func1, TransformationInner>() { - @Override - public TransformationInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param transformation A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (transformationName == null) { - throw new IllegalArgumentException("Parameter transformationName is required and cannot be null."); - } - if (transformation == null) { - throw new IllegalArgumentException("Parameter transformation is required and cannot be null."); - } - Validator.validate(transformation); - final String apiVersion = "2016-03-01"; - return service.update(this.client.subscriptionId(), resourceGroupName, jobName, transformationName, transformation, ifMatch, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, TransformationsUpdateHeadersInner.class); - } - - /** - * Gets details about the specified transformation. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the TransformationInner object if successful. - */ - public TransformationInner get(String resourceGroupName, String jobName, String transformationName) { - return getWithServiceResponseAsync(resourceGroupName, jobName, transformationName).toBlocking().single().body(); - } - - /** - * Gets details about the specified transformation. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String jobName, String transformationName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, jobName, transformationName), serviceCallback); - } - - /** - * Gets details about the specified transformation. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable getAsync(String resourceGroupName, String jobName, String transformationName) { - return getWithServiceResponseAsync(resourceGroupName, jobName, transformationName).map(new Func1, TransformationInner>() { - @Override - public TransformationInner call(ServiceResponseWithHeaders response) { - return response.body(); - } - }); - } - - /** - * Gets details about the specified transformation. - * - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - * @param jobName The name of the streaming job. - * @param transformationName The name of the transformation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TransformationInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String jobName, String transformationName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (jobName == null) { - throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); - } - if (transformationName == null) { - throw new IllegalArgumentException("Parameter transformationName is required and cannot be null."); - } - final String apiVersion = "2016-03-01"; - return service.get(this.client.subscriptionId(), resourceGroupName, jobName, transformationName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponseWithHeaders clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .buildWithHeaders(response, TransformationsGetHeadersInner.class); - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsUpdateHeadersInner.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsUpdateHeadersInner.java deleted file mode 100755 index b9b5a74b641..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/TransformationsUpdateHeadersInner.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.streamanalytics.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines headers for Update operation. - */ -public class TransformationsUpdateHeadersInner { - /** - * The current entity tag for the transformation. This is an opaque string. - * You can use it to detect whether the resource has changed between - * requests. You can also use it in the If-Match or If-None-Match headers - * for write operations for optimistic concurrency. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /** - * Get the eTag value. - * - * @return the eTag value - */ - public String eTag() { - return this.eTag; - } - - /** - * Set the eTag value. - * - * @param eTag the eTag value to set - * @return the TransformationsUpdateHeadersInner object itself. - */ - public TransformationsUpdateHeadersInner withETag(String eTag) { - this.eTag = eTag; - return this; - } - -} diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/package-info.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/package-info.java deleted file mode 100755 index ca1c62e0c8c..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the implementation classes for StreamAnalyticsManagementClient. - * Composite Swagger for Stream Analytics Client. - */ -package com.microsoft.azure.management.streamanalytics.implementation; diff --git a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/package-info.java b/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/package-info.java deleted file mode 100755 index 5cb40ff1c12..00000000000 --- a/azure-mgmt-streamanalytics/src/main/java/com/microsoft/azure/management/streamanalytics/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * This package contains the classes for StreamAnalyticsManagementClient. - * Composite Swagger for Stream Analytics Client. - */ -package com.microsoft.azure.management.streamanalytics; diff --git a/pom.xml b/pom.xml index 2dc747191ec..239f5532429 100644 --- a/pom.xml +++ b/pom.xml @@ -401,47 +401,30 @@ ./azure ./azure-samples - ./azure-mgmt-apimanagement ./azure-mgmt-appservice ./azure-mgmt-batch ./azure-mgmt-batchai - ./azure-mgmt-billing ./azure-mgmt-cdn - ./azure-mgmt-cognitiveservices ./azure-mgmt-compute - ./azure-mgmt-consumption ./azure-mgmt-containerinstance ./azure-mgmt-containerregistry ./azure-mgmt-containerservice ./azure-mgmt-cosmosdb - ./azure-mgmt-customerinsights ./azure-mgmt-datalake-analytics ./azure-mgmt-datalake-store - ./azure-mgmt-devices - ./azure-mgmt-devtestlab ./azure-mgmt-dns ./azure-mgmt-eventhub ./azure-mgmt-graph-rbac - ./azure-mgmt-insights ./azure-mgmt-keyvault - ./azure-mgmt-logic ./azure-mgmt-locks - ./azure-mgmt-machinelearning ./azure-mgmt-monitor ./azure-mgmt-network - ./azure-mgmt-notificationhubs - ./azure-mgmt-powerbi - ./azure-mgmt-recoveryservices ./azure-mgmt-redis - ./azure-mgmt-relay ./azure-mgmt-resources - ./azure-mgmt-scheduler ./azure-mgmt-search ./azure-mgmt-servicebus - ./azure-mgmt-servicefabric ./azure-mgmt-sql ./azure-mgmt-storage - ./azure-mgmt-streamanalytics ./azure-mgmt-trafficmanager ./azure-mgmt-msi